[PATCH v9 01/14] common/idpf: introduce common library
Andrew Rybchenko
andrew.rybchenko at oktetlabs.ru
Fri Oct 21 08:40:10 CEST 2022
On 10/21/22 08:18, Junfeng Guo wrote:
> Introduce common library for IDPF (Infrastructure Data Path Function)
> PMD.
>
> Also add OS specific implementation about some MACRO definitions and
> small functions which are specific for DPDK.
Common drivers are required when different class drivers need
to share some code. So, it must be expalined here why do you
create common driver instead of usage of base/ driver in your
net driver.
Note that common driver is a DPDK driver and it must follow
DPDK coding style. If the code is actually shared with
something else and do not follow DPDK coding style from the
very beginning (since it is an existing code), it should be
in base/ subdir in either common driver or net driver.
Also you should not use own trivial wrappers for DPDK API
in DPDK-specific code. It just complicates reading.
E.g. BIT() vs RTE_BIT32().
So, I need an answer on above questions before I continue
review.
>
> Signed-off-by: Beilei Xing <beilei.xing at intel.com>
> Signed-off-by: Xiao Wang <xiao.w.wang at intel.com>
> Signed-off-by: Junfeng Guo <junfeng.guo at intel.com>
[snip]
> diff --git a/drivers/common/idpf/idpf_alloc.h b/drivers/common/idpf/idpf_alloc.h
> new file mode 100644
> index 0000000000..bc054851b3
> --- /dev/null
> +++ b/drivers/common/idpf/idpf_alloc.h
> @@ -0,0 +1,22 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(c) 2001-2022 Intel Corporation
> + */
> +
> +#ifndef _IDPF_ALLOC_H_
> +#define _IDPF_ALLOC_H_
> +
> +/* Memory types */
If it is a DPDK-specific driver and it is an interface provided
by common driver, it should use Doxygen-style comments to be a
part of genereated API documentation.
More information about the dev
mailing list