DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v4 00/11] A new net PMD - hinic
@ 2019-06-06 11:04 Ziyang Xuan
  2019-06-06 11:05 ` [dpdk-dev] [PATCH v4 05/11] net/hinic/base: add eqs and context code Ziyang Xuan
                   ` (10 more replies)
  0 siblings, 11 replies; 24+ messages in thread
From: Ziyang Xuan @ 2019-06-06 11:04 UTC (permalink / raw)
  To: dev
  Cc: ferruh.yigit, cloud.wangxiaoyun, zhouguoyang, shahar.belkar,
	stephen, luoxianjun, Ziyang Xuan

This patch set adds support of a new net PMD
for Huawei Intelligent nic. This patch provides supoort
for basic RX/TX and the contorl path needed for it.
Later on new features will be added like VLAN, VFs, etc.

Basic features:
1. Basic device operations: probe, initialization, start/stop,
   configure, info get.
2. RX/TX queue operations: setup/release, start/stop.
3. RX/TX.

Stats:
1. statistics and extended  statistics.

---
v2:
 - Fix arm64 compilation issue.
 - Fix some checkpatch checks issues
 - Fix patches thread issue.
 - Fit to the newest rte_ prefix patch

v3:
 - Remove Rami from hinic pmd maintainers
 - Remove hinic_logs.* files and move log codes to other files
 - Remove the C++ guards within hinic pmd codes
 - Remove variable related errors shields from compilation files
 - Use lib link statu related functions but selfdefined
 - Fix x86_64-native-linuxapp-clang compilation errors
 - Fix i686-native-linuxapp-gcc compilation errors

v4:
 - Update doc hinic.ini and hini.rst
 - Remove x86-32, i686, BSD, Power8, ARMv7 compilations
 - Fit to newest IPV4 and IPV6 uppercase

Ziyang Xuan (11):
  net/hinic/base: add registers for Huawei Hi1822 NIC
  net/hinic/base: add command channels code
  net/hinic/base: add mgmt module interactive code
  net/hinic/base: add code about hardware operation
  net/hinic/base: add eqs and context code
  net/hinic/base: add code for nic business
  net/hinic/base: add various headers
  net/hinic: add hinic PMD build and doc files
  net/hinic: add RX module
  net/hinic: add TX module
  net/hinic: add support for basic device operations

 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 +
 drivers/net/Makefile                          |    1 +
 drivers/net/hinic/Makefile                    |   73 +
 drivers/net/hinic/base/hinic_compat.h         |  239 ++
 drivers/net/hinic/base/hinic_csr.h            |  164 ++
 drivers/net/hinic/base/hinic_ctx_def.h        |  184 ++
 drivers/net/hinic/base/hinic_pmd_api_cmd.c    | 1037 ++++++++
 drivers/net/hinic/base/hinic_pmd_api_cmd.h    |  271 +++
 drivers/net/hinic/base/hinic_pmd_cfg.c        |  269 +++
 drivers/net/hinic/base/hinic_pmd_cfg.h        |  264 ++
 drivers/net/hinic/base/hinic_pmd_cmdq.c       |  901 +++++++
 drivers/net/hinic/base/hinic_pmd_cmdq.h       |  190 ++
 drivers/net/hinic/base/hinic_pmd_dpdev.h      |  146 ++
 drivers/net/hinic/base/hinic_pmd_eqs.c        |  725 ++++++
 drivers/net/hinic/base/hinic_pmd_eqs.h        |   94 +
 drivers/net/hinic/base/hinic_pmd_hw.h         |   49 +
 drivers/net/hinic/base/hinic_pmd_hw_mgmt.h    |   85 +
 drivers/net/hinic/base/hinic_pmd_hwdev.c      | 1544 ++++++++++++
 drivers/net/hinic/base/hinic_pmd_hwdev.h      |  205 ++
 drivers/net/hinic/base/hinic_pmd_hwif.c       |  542 +++++
 drivers/net/hinic/base/hinic_pmd_hwif.h       |   90 +
 drivers/net/hinic/base/hinic_pmd_mgmt.c       |  617 +++++
 drivers/net/hinic/base/hinic_pmd_mgmt.h       |  125 +
 .../net/hinic/base/hinic_pmd_mgmt_interface.h |  503 ++++
 drivers/net/hinic/base/hinic_pmd_nic.h        |   85 +
 drivers/net/hinic/base/hinic_pmd_niccfg.c     | 1376 +++++++++++
 drivers/net/hinic/base/hinic_pmd_niccfg.h     |  333 +++
 drivers/net/hinic/base/hinic_pmd_nicio.c      |  919 +++++++
 drivers/net/hinic/base/hinic_pmd_nicio.h      |   53 +
 drivers/net/hinic/base/hinic_pmd_qp.c         |   26 +
 drivers/net/hinic/base/hinic_pmd_qp.h         |   76 +
 drivers/net/hinic/base/hinic_pmd_wq.c         |  164 ++
 drivers/net/hinic/base/hinic_pmd_wq.h         |   52 +
 drivers/net/hinic/base/hinic_port_cmd.h       |  483 ++++
 drivers/net/hinic/base/hinic_qe_def.h         |  450 ++++
 drivers/net/hinic/base/meson.build            |   50 +
 drivers/net/hinic/hinic_pmd_dpdev.c           |  702 ++++++
 drivers/net/hinic/hinic_pmd_ethdev.c          | 2150 +++++++++++++++++
 drivers/net/hinic/hinic_pmd_ethdev.h          |  102 +
 drivers/net/hinic/hinic_pmd_rx.c              |  902 +++++++
 drivers/net/hinic/hinic_pmd_rx.h              |  135 ++
 drivers/net/hinic/hinic_pmd_tx.c              | 1070 ++++++++
 drivers/net/hinic/hinic_pmd_tx.h              |   97 +
 drivers/net/hinic/meson.build                 |   18 +
 drivers/net/hinic/rte_pmd_hinic_version.map   |    4 +
 mk/rte.app.mk                                 |    1 +
 56 files changed, 17699 insertions(+)
 create mode 100644 doc/guides/nics/features/hinic.ini
 create mode 100644 doc/guides/nics/hinic.rst
 create mode 100644 drivers/net/hinic/Makefile
 create mode 100644 drivers/net/hinic/base/hinic_compat.h
 create mode 100644 drivers/net/hinic/base/hinic_csr.h
 create mode 100644 drivers/net/hinic/base/hinic_ctx_def.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_api_cmd.c
 create mode 100644 drivers/net/hinic/base/hinic_pmd_api_cmd.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_cfg.c
 create mode 100644 drivers/net/hinic/base/hinic_pmd_cfg.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_cmdq.c
 create mode 100644 drivers/net/hinic/base/hinic_pmd_cmdq.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_dpdev.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_eqs.c
 create mode 100644 drivers/net/hinic/base/hinic_pmd_eqs.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_hw.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_hw_mgmt.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_hwdev.c
 create mode 100644 drivers/net/hinic/base/hinic_pmd_hwdev.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_hwif.c
 create mode 100644 drivers/net/hinic/base/hinic_pmd_hwif.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_mgmt.c
 create mode 100644 drivers/net/hinic/base/hinic_pmd_mgmt.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_mgmt_interface.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_nic.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_niccfg.c
 create mode 100644 drivers/net/hinic/base/hinic_pmd_niccfg.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_nicio.c
 create mode 100644 drivers/net/hinic/base/hinic_pmd_nicio.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_qp.c
 create mode 100644 drivers/net/hinic/base/hinic_pmd_qp.h
 create mode 100644 drivers/net/hinic/base/hinic_pmd_wq.c
 create mode 100644 drivers/net/hinic/base/hinic_pmd_wq.h
 create mode 100644 drivers/net/hinic/base/hinic_port_cmd.h
 create mode 100644 drivers/net/hinic/base/hinic_qe_def.h
 create mode 100644 drivers/net/hinic/base/meson.build
 create mode 100644 drivers/net/hinic/hinic_pmd_dpdev.c
 create mode 100644 drivers/net/hinic/hinic_pmd_ethdev.c
 create mode 100644 drivers/net/hinic/hinic_pmd_ethdev.h
 create mode 100644 drivers/net/hinic/hinic_pmd_rx.c
 create mode 100644 drivers/net/hinic/hinic_pmd_rx.h
 create mode 100644 drivers/net/hinic/hinic_pmd_tx.c
 create mode 100644 drivers/net/hinic/hinic_pmd_tx.h
 create mode 100644 drivers/net/hinic/meson.build
 create mode 100644 drivers/net/hinic/rte_pmd_hinic_version.map

-- 
2.18.0


^ permalink raw reply	[flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [PATCH v4 11/11] net/hinic: add support for basic device operations
@ 2019-06-12 15:10 Xuanziyang (William, Chip Application Design Logic and Hardware Development Dept IT_Products & Solutions)
  0 siblings, 0 replies; 24+ messages in thread
From: Xuanziyang (William, Chip Application Design Logic and Hardware Development Dept IT_Products & Solutions) @ 2019-06-12 15:10 UTC (permalink / raw)
  To: Ferruh Yigit, dev
  Cc: Wangxiaoyun (Cloud, Network Chip Application Development Dept),
	zhouguoyang, Shahar Belkar, stephen, Luoxianjun

> 
> On 6/6/2019 12:07 PM, Ziyang Xuan wrote:
> > Add hinic PMD initialization and ethernet operatioins code.
> 
> Hi Xuan,
> 
> Previous patches puts the code without enabling them, this last patch
> registers the PMD with lots of new code, it is hard to review this PMD.
> 
> I think "OCTEON TX2" which also submitted this release [1] is good sample of
> how building the PMD incrementally, feature by feature, can you please
> check it?
> [1] https://patches.dpdk.org/user/todo/dpdk/?series=4848

OK, thanks.

> 
> >
> > Signed-off-by: Ziyang Xuan <xuanziyang2@huawei.com>
> > ---
> >  drivers/net/hinic/hinic_pmd_ethdev.c        | 2125 +++++++++++++++++++
> >  drivers/net/hinic/rte_pmd_hinic_version.map |    4 +
> 
> .map file needs to be added in the patch that adds "hinic/Makefile",
> otherwise shared build will fail for those patches in between.
> 
> <...>
> 
> > +
> > +/* Hinic PMD parameters */
> > +#define ETH_HINIC_FW_VER	"check_fw_version"
> > +
> > +static const char *const valid_params[] = {
> > +	ETH_HINIC_FW_VER,
> > +	NULL};
> 
> 
> Can you please document this devargs in hinic documentation, describe what
> it does, and perhaps provide a sample command line to use it.
> 
> <...>
> <...>
> 
> > +	snprintf(nic_dev->proc_dev_name,
> > +		 sizeof(nic_dev->proc_dev_name),
> > +		 "hinic-%.4x:%.2x:%.2x.%x",
> > +		 pci_dev->addr.domain, pci_dev->addr.bus,
> > +		 pci_dev->addr.devid, pci_dev->addr.function);
> > +
> > +	rte_eth_copy_pci_info(eth_dev, pci_dev);
> 
> You may not need this, can you please double check?

Yes, we use rte_eth_dev_pci_generic_probe, it can do this. And I will delete it here.

> 
> > +
> > +	/* clear RX ring mbuf allocated failed */
> > +	eth_dev->data->rx_mbuf_alloc_failed = 0;
> 
> At this stage all ethdev->data should be 0, is this assignment required?

I will check it, and delete it if not necessary.

> 
> <...>
> 
> > +/**
> > + * DPDK callback to close the device.
> > + *
> > + * @param dev
> > + *   Pointer to Ethernet device structure.
> > + */
> > +void hinic_dev_close(struct rte_eth_dev *dev) {
> 
> You may want to 'RTE_ETH_DEV_CLOSE_REMOVE' flag to cause
> 'rte_eth_dev_close()'
> clean ethdev resources clean, please check other PMDs and ethdev API for
> sample usage.

Yes, I find it. I will fix it to set 'RTE_ETH_DEV_CLOSE_REMOVE' flag when initialize.

Thank you for your precious comments very much, I will fix these problems carefully.

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2019-06-12 15:10 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-06 11:04 [dpdk-dev] [PATCH v4 00/11] A new net PMD - hinic Ziyang Xuan
2019-06-06 11:05 ` [dpdk-dev] [PATCH v4 05/11] net/hinic/base: add eqs and context code Ziyang Xuan
2019-06-06 11:06 ` [dpdk-dev] [PATCH v4 06/11] net/hinic/base: add code for nic business Ziyang Xuan
2019-06-06 11:06 ` [dpdk-dev] [PATCH v4 08/11] net/hinic: add hinic PMD build and doc files Ziyang Xuan
2019-06-11 15:56   ` Ferruh Yigit
2019-06-06 11:06 ` [dpdk-dev] [PATCH v4 10/11] net/hinic: add TX module Ziyang Xuan
2019-06-06 11:07 ` [dpdk-dev] [PATCH v4 11/11] net/hinic: add support for basic device operations Ziyang Xuan
2019-06-11 16:02   ` Ferruh Yigit
2019-06-06 11:13 ` [dpdk-dev] [PATCH v4 01/11] net/hinic/base: add registers for Huawei Hi1822 NIC Ziyang Xuan
2019-06-06 11:04   ` Ziyang Xuan
2019-06-06 11:14 ` [dpdk-dev] [PATCH v4 02/11] net/hinic/base: add command channels code Ziyang Xuan
2019-06-06 11:05   ` Ziyang Xuan
2019-06-06 11:15 ` [dpdk-dev] [PATCH v4 03/11] net/hinic/base: add mgmt module interactive code Ziyang Xuan
2019-06-06 11:05   ` Ziyang Xuan
2019-06-06 11:15 ` [dpdk-dev] [PATCH v4 04/11] net/hinic/base: add code about hardware operation Ziyang Xuan
2019-06-06 11:05   ` Ziyang Xuan
2019-06-06 11:17 ` [dpdk-dev] [PATCH v4 07/11] net/hinic/base: add various headers Ziyang Xuan
2019-06-06 11:06   ` Ziyang Xuan
2019-06-11 16:04   ` Ferruh Yigit
2019-06-06 11:18 ` [dpdk-dev] [PATCH v4 09/11] net/hinic: add RX module Ziyang Xuan
2019-06-06 11:06   ` Ziyang Xuan
2019-06-11 15:57   ` Ferruh Yigit
2019-06-12 14:36     ` [dpdk-dev] 答复: " Xuanziyang (William, Chip Application Design Logic and Hardware Development Dept IT_Products & Solutions)
2019-06-12 15:10 [dpdk-dev] [PATCH v4 11/11] net/hinic: add support for basic device operations Xuanziyang (William, Chip Application Design Logic and Hardware Development Dept IT_Products & Solutions)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).