Hi Xiaoyun,

Please pay attention to the coding style issue, and some other inline comments.
For the bit operation functions, we are consolidating the bit operations 
functions into a common eal API family, when it is ready,
the cpu_to_be32 and vice versa APIs scattered here and there can be replaced 
with the common one. This can
largely reduce code duplications. The work was started and is ongoing, I don't 
intend to block the proceeding of your patches, 
Just keep an eye on it and please do the replacement after the common bit APIs 
are accepted.
/Gavin

> -----Original Message-----
> From: dev <dev-boun...@dpdk.org> On Behalf Of Xiaoyun wang
> Sent: Thursday, October 10, 2019 10:52 PM
> To: ferruh.yi...@intel.com
> Cc: dev@dpdk.org; xuanziya...@huawei.com; shahar.bel...@huawei.com;
> luoxian...@huawei.com; tanya.brokh...@huawei.com;
> zhouguoy...@huawei.com; Xiaoyun wang
> <cloud.wangxiao...@huawei.com>
> Subject: [dpdk-dev] [PATCH v4 01/19] net/hinic/base: add mbox command
> channel for SRIOV
> 
> Add mbox command channel for SR-IOV, which is used to
> communicate between VF and VF, VF and PF. This patch
> introduces data structures, initialization, interfaces
> and commands of mbox channel.
> 
> Signed-off-by: Xiaoyun wang <cloud.wangxiao...@huawei.com>
> ---
>  doc/guides/nics/features/hinic.ini       |   1 +
>  doc/guides/nics/hinic.rst                |   1 +
>  drivers/net/hinic/Makefile               |   1 +
>  drivers/net/hinic/base/hinic_compat.h    |  36 +-
>  drivers/net/hinic/base/hinic_pmd_hwdev.h |   5 +-
>  drivers/net/hinic/base/hinic_pmd_mbox.c  | 937
> +++++++++++++++++++++++++++++++
>  drivers/net/hinic/base/hinic_pmd_mbox.h  |  93 +++
>  drivers/net/hinic/base/meson.build       |   1 +
>  8 files changed, 1070 insertions(+), 5 deletions(-)
>  create mode 100644 drivers/net/hinic/base/hinic_pmd_mbox.c
>  create mode 100644 drivers/net/hinic/base/hinic_pmd_mbox.h
> 
> diff --git a/doc/guides/nics/features/hinic.ini
> b/doc/guides/nics/features/hinic.ini
> index fe063d6..c858411 100644
> --- a/doc/guides/nics/features/hinic.ini
> +++ b/doc/guides/nics/features/hinic.ini
> @@ -19,6 +19,7 @@ RSS hash             = Y
>  RSS key update       = Y
>  RSS reta update      = Y
>  Inner RSS            = Y
> +SR-IOV               = Y
>  CRC offload          = Y
>  L3 checksum offload  = Y
>  L4 checksum offload  = Y
> diff --git a/doc/guides/nics/hinic.rst b/doc/guides/nics/hinic.rst
> index c9329bc..c3ce101 100644
> --- a/doc/guides/nics/hinic.rst
> +++ b/doc/guides/nics/hinic.rst
> @@ -24,6 +24,7 @@ Features
>  - Link state information
>  - Link flow control
>  - Scattered and gather for TX and RX
> +- SR-IOV - Partially supported at this point, VFIO only
> 
>  Prerequisites
>  -------------
> diff --git a/drivers/net/hinic/Makefile b/drivers/net/hinic/Makefile
> index 42b4a78..20a338e 100644
> --- a/drivers/net/hinic/Makefile
> +++ b/drivers/net/hinic/Makefile
> @@ -59,6 +59,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) +=
> hinic_pmd_mgmt.c
>  SRCS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) += hinic_pmd_niccfg.c
>  SRCS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) += hinic_pmd_nicio.c
>  SRCS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) += hinic_pmd_wq.c
> +SRCS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) += hinic_pmd_mbox.c
> 
>  SRCS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) += hinic_pmd_ethdev.c
>  SRCS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) += hinic_pmd_rx.c
> diff --git a/drivers/net/hinic/base/hinic_compat.h
> b/drivers/net/hinic/base/hinic_compat.h
> index f599947..fe26aad 100644
> --- a/drivers/net/hinic/base/hinic_compat.h
> +++ b/drivers/net/hinic/base/hinic_compat.h
> @@ -121,9 +121,7 @@ static inline int hinic_test_bit(int nr, volatile unsigned
> long *addr)
>  {
>       int res;
> 
> -     rte_mb();
Why is the barrier removed? 
If the barrier is moved outside, it should also be reflected in the commit log, 
as this is a critical change. 
/Gavin
>       res = ((*addr) & (1UL << nr)) != 0;
> -     rte_mb();
Ditto.
>       return res;
>  }
> 

Reply via email to