From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id BC3A9A00E6 for ; Tue, 11 Jun 2019 18:07:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BE95E1C51D; Tue, 11 Jun 2019 17:56:23 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id D054E1C544 for ; Tue, 11 Jun 2019 17:56:21 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jun 2019 08:56:20 -0700 X-ExtLoop1: 1 Received: from fyigit-mobl.ger.corp.intel.com (HELO [10.237.221.26]) ([10.237.221.26]) by fmsmga005.fm.intel.com with ESMTP; 11 Jun 2019 08:56:18 -0700 To: Ziyang Xuan , dev@dpdk.org Cc: cloud.wangxiaoyun@huawei.com, zhouguoyang@huawei.com, shahar.belkar@huawei.com, stephen@networkplumber.org, luoxianjun@huawei.com References: <74886a52875fbfc99e45c9ae9fd6b549cfcb33a6.1559818024.git.xuanziyang2@huawei.com> From: Ferruh Yigit Openpgp: preference=signencrypt Autocrypt: addr=ferruh.yigit@intel.com; prefer-encrypt=mutual; keydata= mQINBFXZCFABEADCujshBOAaqPZpwShdkzkyGpJ15lmxiSr3jVMqOtQS/sB3FYLT0/d3+bvy qbL9YnlbPyRvZfnP3pXiKwkRoR1RJwEo2BOf6hxdzTmLRtGtwWzI9MwrUPj6n/ldiD58VAGQ +iR1I/z9UBUN/ZMksElA2D7Jgg7vZ78iKwNnd+vLBD6I61kVrZ45Vjo3r+pPOByUBXOUlxp9 GWEKKIrJ4eogqkVNSixN16VYK7xR+5OUkBYUO+sE6etSxCr7BahMPKxH+XPlZZjKrxciaW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c9nGzcE4MTaLAI3E8TjIXAO0cPqUNLyp g0DXezmTw5BU+SKZ51+jSKOtFmzJCHOJZQaMeCHD+G3CrdUHQVQBb5AeuH3KFv9ltgDcWsc8 YO70o3+tGHwcEnyXLdrI0q05wV7ncnLdkgVo+VUN4092bNMPwYly1TZWcU3Jw5gczOUEfTY7 sgo6E/sGX3B+FzgIs5t4yi1XOweCAQ/mPnb6uFeNENEFyGKyMG1HtjwBqnftbiFO3qitEIUY xWGQH23oKscv7i9lT0gg2D+ktzZhVWwHJVY/2vWSB9aCSWChcH2BT+lWrkwSpoPhy+almM84 Qz2wF72/d4ce4L27pSrS+vOXtXHLGOOGcAn8yr9TV0kM4aR+NbGBRXGKhG6w4lY54uNd9IBa ARIPUhij5JSygxZCBaJKo+X64AHGkk5bXq+f0anwAMNuJXbYC/lz4DEdKmPgQGShOWNs1Y1a N3cI87Hun/RBVwQ0a3Tr1g6OWJ6xK8cYbMcoR8NZ7L9ALMeJeuUDQR39+fEeHg/6sQN0P0mv 0sL+//BAJphCzDk8ztbrFw+JaPtgzZpRSM6JhxnY+YMAsatJRXA0WSpYP5zzl7yu/GZJIgsv VQ== Message-ID: <8433f9bb-7c3c-97e5-1214-d44851150287@intel.com> Date: Tue, 11 Jun 2019 16:56:17 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <74886a52875fbfc99e45c9ae9fd6b549cfcb33a6.1559818024.git.xuanziyang2@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v4 08/11] net/hinic: add hinic PMD build and doc files 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" On 6/6/2019 12:06 PM, Ziyang Xuan wrote: > Add build and doc files, and common code files. > > Signed-off-by: Ziyang Xuan > --- > MAINTAINERS | 9 + > config/common_base | 5 + > config/common_linux | 5 + > config/defconfig_arm-armv7a-linuxapp-gcc | 1 + > config/defconfig_i686-native-linuxapp-gcc | 5 + > config/defconfig_i686-native-linuxapp-icc | 5 + > config/defconfig_ppc_64-power8-linuxapp-gcc | 1 + > config/defconfig_x86_64-native-linuxapp-icc | 5 + > config/defconfig_x86_x32-native-linuxapp-gcc | 5 + > doc/guides/nics/features/hinic.ini | 37 + > doc/guides/nics/hinic.rst | 55 ++ Can you also update the release notes documentation (doc/guides/rel_notes/release_19_08.rst) to announce new driver? <...> > @@ -0,0 +1,55 @@ > +.. SPDX-License-Identifier: BSD-3-Clause > + Copyright(c) 2017 Huawei Technologies Co., Ltd > + > + > +HINIC Poll Mode Driver > +====================== > + > +The hinic PMD (librte_pmd_hinic) provides poll mode driver support for > +25 Gbps Huawei Intelligent PCIE Network Adapters based on > +the Huawei Ethernet Controller Hi1822. Can you please provide a link to product documentation? > + > + > +Features > +-------- > + > +- Multi arch support: x86_64, ARMv8. > +- Multiple queues for TX and RX > +- Receiver Side Scaling (RSS) > +- MAC/VLAN filtering > +- Checksum offload > +- TSO offload > +- Promiscuous mode > +- Port hardware statistics > +- Jumbo frames Jumbo frame marked as not supported in above .ini file? > +- Link state information > +- Link flow control > +- Scattered and gather for TX and RX > + > +Prerequisites > +------------- > + > +- Follow the DPDK :ref:`Getting Started Guide for Linux ` to setup the basic DPDK environment. > + > +Requires firmware 1.6.2.5 Please provide some link for this prerequisite. <...> > +# > +# Add extra flags for base driver files (also known as shared code) > +# to disable warnings > +# > +ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y) > +CFLAGS_BASE_DRIVER = -diag-disable 593 > +else > +CFLAGS_BASE_DRIVER = -Wno-sign-compare > +CFLAGS_BASE_DRIVER += -Wno-unused-parameter > +CFLAGS_BASE_DRIVER += -Wno-strict-aliasing > +CFLAGS_BASE_DRIVER += -Wno-missing-field-initializers > +CFLAGS_BASE_DRIVER += -Wno-pointer-to-int-cast > +endif Since icc is not supported (yet), can drop this part. > + > +OBJS_BASE_DRIVER=$(sort $(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c)))) > +$(foreach obj, $(OBJS_BASE_DRIVER), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER))) And when icc part removed, I think nothing is left to set "CFLAGS_BASE_DRIVER", so this part can be removed too. > + > +VPATH += $(SRCDIR)/base > + > +# > +# all source are stored in SRCS-y > +# > +SRCS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) += hinic_pmd_api_cmd.c > +SRCS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) += hinic_pmd_cfg.c > +SRCS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) += hinic_pmd_cmdq.c > +SRCS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) += hinic_pmd_eqs.c > +SRCS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) += hinic_pmd_hwdev.c > +SRCS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) += hinic_pmd_hwif.c > +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_qp.c > +SRCS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) += hinic_pmd_wq.c > + > +SRCS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) += hinic_pmd_dpdev.c > +SRCS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) += hinic_pmd_ethdev.c > +#SRCS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) += hinic_pmd_rx.c > +#SRCS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) += hinic_pmd_tx.c Please remove commented lines. > + > +# this lib depends upon: > +DEPDIRS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) += lib/librte_eal lib/librte_ether > +DEPDIRS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) += lib/librte_mempool lib/librte_mbuf > +DEPDIRS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) += lib/librte_net lib/librte_hash > +DEPDIRS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) += lib/librte_kvargs > +DEPDIRS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) += lib/librte_net > +DEPDIRS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) += lib/librte_ring We stop using DEPDIRS, below LDLIBS is replacing it, can drop above lines. <...> > +headers = [ > + 'hinic_compat.h', > + 'hinic_csr.h', > + 'hinic_ctx_def.h', > + 'hinic_pmd_api_cmd.h', > + 'hinic_pmd_cfg.h', > + 'hinic_pmd_cmdq.h', > + 'hinic_pmd_dpdev.h', > + 'hinic_pmd_eqs.h', > + 'hinic_pmd_hwdev.h', > + 'hinic_pmd_hw.h', > + 'hinic_pmd_hwif.h', > + 'hinic_pmd_hw_mgmt.h', > + 'hinic_pmd_mgmt.h', > + 'hinic_pmd_mgmt_interface.h', > + 'hinic_pmd_niccfg.h', > + 'hinic_pmd_nic.h', > + 'hinic_pmd_nicio.h', > + 'hinic_pmd_qp.h', > + 'hinic_pmd_wq.h', > + 'hinic_port_cmd.h', > + 'hinic_qe_def.h', > +] Does headers need to be defined for the PMD? <...> > + > +void *hinic_dma_mem_zalloc(void *dev, size_t size, dma_addr_t *dma_handle, > + unsigned int flag, unsigned int align) Why not many of the functions are not 'static'? Please make them 'static' as much as possible. <...> > +int32_t hinic_nic_dev_create(struct rte_eth_dev *eth_dev) > +{ > + struct hinic_nic_dev *nic_dev = > + HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV(eth_dev); > + int rc; > + > + nic_dev->hwdev = > + (struct hinic_hwdev *)rte_zmalloc("hinic_hwdev", > + sizeof(*nic_dev->hwdev), > + RTE_CACHE_LINE_SIZE); There was a patch by Stephen [1] very recently to remove the casting from and to the "void *" which is not required by 'C'. To not need similar cleanups later, can you please check them at first place. [1]https://patches.dpdk.org/project/dpdk/list/?series=4816 <...> > +sources = files( > + 'hinic_pmd_dpdev.c', > + 'hinic_pmd_ethdev.c', > +# 'hinic_pmd_rx.c', > +# 'hinic_pmd_tx.c' Please don't have commented code. > + ) > + > +deps += 'ethdev' > +deps += 'pci' > +deps += 'hash' Is hash a dependency?