From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 398FBA00BE; Tue, 29 Oct 2019 07:57:18 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8AE8E1BED1; Tue, 29 Oct 2019 07:57:17 +0100 (CET) Received: from huawei.com (szxga06-in.huawei.com [45.249.212.32]) by dpdk.org (Postfix) with ESMTP id 02DD62BF5 for ; Tue, 29 Oct 2019 07:57:15 +0100 (CET) Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 3C9477956092EA413973; Tue, 29 Oct 2019 14:57:14 +0800 (CST) Received: from [127.0.0.1] (10.177.29.98) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.439.0; Tue, 29 Oct 2019 14:57:08 +0800 To: "Gavin Hu (Arm Technology China)" , "ferruh.yigit@intel.com" CC: "dev@dpdk.org" , "xuanziyang2@huawei.com" , "shahar.belkar@huawei.com" , "luoxianjun@huawei.com" , "tanya.brokhman@huawei.com" , "zhouguoyang@huawei.com" , Honnappa Nagarahalli , "Joyce Kong (Arm Technology China)" , nd References: <3af55481f2d4102e230c371a2eed56fdb527e444.1570718029.git.cloud.wangxiaoyun@huawei.com> From: "Wangxiaoyun (Cloud, Network Chip Application Development Dept)" Message-ID: Date: Tue, 29 Oct 2019 14:57:06 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [10.177.29.98] X-CFilter-Loop: Reflected Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v4 01/19] net/hinic/base: add mbox command channel for SRIOV X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Gavin, Thanks for your comments, I will fix the code style issue in Patch v5, and the bit operation for hinic_test_bit and others has beed replaced with common rte_io_XX_bit APIs by Joyce Kong's pathces, I will check other remained bit operations and replace it with the common one. Best Regards Xiaoyun Wang ÔÚ 2019/10/11 17:37, Gavin Hu (Arm Technology China) дµÀ: > 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 On Behalf Of Xiaoyun wang >> Sent: Thursday, October 10, 2019 10:52 PM >> To: ferruh.yigit@intel.com >> Cc: dev@dpdk.org; xuanziyang2@huawei.com; shahar.belkar@huawei.com; >> luoxianjun@huawei.com; tanya.brokhman@huawei.com; >> zhouguoyang@huawei.com; Xiaoyun wang >> >> 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 >> --- >> 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; >> } >>