Re: [PATCH v6 00/26] Net/SPNIC: support SPNIC into DPDK 22.03

2022-01-21 Thread Yanling Song
On Wed, 19 Jan 2022 16:56:52 + Ferruh Yigit wrote: > On 12/30/2021 6:08 AM, Yanling Song wrote: > > The patchsets introduce SPNIC driver for Ramaxel's SPNxx serial NIC > > cards into DPDK 22.03. Ramaxel Memory Technology is a company which > > supply a lot of

Re: [PATCH v6 02/26] net/spnic: initialize the HW interface

2022-01-21 Thread Yanling Song
On Wed, 19 Jan 2022 17:05:14 + Ferruh Yigit wrote: > On 12/30/2021 6:08 AM, Yanling Song wrote: > > Add HW interface registers and initialize the HW > > interface. > > > > Signed-off-by: Yanling Song > > <...> > > > diff --git a/driver

Re: [PATCH v6 05/26] net/spnic: add mgmt module

2022-01-21 Thread Yanling Song
On Wed, 19 Jan 2022 17:22:51 + Ferruh Yigit wrote: > On 12/30/2021 6:08 AM, Yanling Song wrote: > > Mgmt module manage the message gerenated from the hardware. > > This patch implements mgmt module initialization, related event > > processing and message command defini

Re: [PATCH v6 09/26] net/spnic: support MAC and link event handling

2022-01-21 Thread Yanling Song
On Wed, 19 Jan 2022 17:26:47 + Ferruh Yigit wrote: > On 12/30/2021 6:08 AM, Yanling Song wrote: > > This commit adds interfaces to add/remove MAC addresses > > and registers related ops to struct eth_dev_ops. Furthermore, > > this commit adds callback to handle link ev

Re: [PATCH v6 25/26] net/spnic: add doc infrastructure

2022-01-21 Thread Yanling Song
On Wed, 19 Jan 2022 17:27:56 + Ferruh Yigit wrote: > On 12/30/2021 6:09 AM, Yanling Song wrote: > > This patch adds doc infrastructure for spnic PMD driver. > > > > Signed-off-by: Yanling Song > > <...> > > > diff --git a/doc/guides/nics/spn

Re: [PATCH v6 26/26] net/spnic: fixes unsafe C style code

2022-01-21 Thread Yanling Song
On Wed, 19 Jan 2022 17:28:11 + Ferruh Yigit wrote: > On 12/30/2021 6:09 AM, Yanling Song wrote: > > Use the hardware structure instead of void* as parameter of > > function to keep the type information > > Hi Yanling, > > This is a new driver and first patchse

Re: [PATCH v6 00/26] Net/SPNIC: support SPNIC into DPDK 22.03

2022-02-12 Thread Yanling Song
On Fri, 21 Jan 2022 10:22:10 + Ferruh Yigit wrote: > On 1/21/2022 9:27 AM, Yanling Song wrote: > > On Wed, 19 Jan 2022 16:56:52 + > > Ferruh Yigit wrote: > > > >> On 12/30/2021 6:08 AM, Yanling Song wrote: > >>> The patchsets introdu

Ramaxel roadmap for 22.03

2021-12-17 Thread Yanling Song
Please find below Ramaxel roadmap for v22.03 release: Introduce SPNIC driver for Ramaxel's SPNxx serial NIC cards into DPDK 22.03. Ramaxel Memory Technology is a company which supply a lot of electric products in several fields: storage, communication, PCB... SPNxxx is a serial PCIE interface NIC

[PATCH v1 01/25] drivers/net: introduce a new PMD driver

2021-12-17 Thread Yanling Song
Introduce a new PMD driver which names spnic. Now, this driver only implements module entry without doing anything else. Signed-off-by: Yanling Song --- drivers/net/meson.build | 1 + drivers/net/spnic/base/meson.build| 26 drivers/net/spnic/base/spnic_compat.h | 188

[PATCH v1 00/25] Net/SPNIC: support SPNIC into DPDK 22.03

2021-12-17 Thread Yanling Song
PN130: 2 PORTs *100G The following is main features of our SPNIC: - TSO - LRO - Flow control - SR-IOV(Partially supported) - VLAN offload - VLAN filter - CRC offload - Promiscuous mode - RSS Yanling Song (25): drivers/net: introduce a new PMD driver net/spnic: initialize the HW interface net/

[PATCH v1 02/25] net/spnic: initialize the HW interface

2021-12-17 Thread Yanling Song
Add HW interface registers and initialize the HW interface. Signed-off-by: Yanling Song --- drivers/net/spnic/base/meson.build | 2 + drivers/net/spnic/base/spnic_csr.h | 104 drivers/net/spnic/base/spnic_hwdev.c | 41 ++ drivers/net/spnic/base/spnic_hwdev.h | 29 + drivers/net

[PATCH v1 05/25] net/spnic: add mgmt module

2021-12-17 Thread Yanling Song
Mgmt module manage the message gerenated from the hardware. This patch implements mgmt module initialization, related event processing and message command definition. Signed-off-by: Yanling Song --- drivers/net/spnic/base/meson.build | 4 +- drivers/net/spnic/base/spnic_cmd.h

[PATCH v1 07/25] net/spnic: add interface handling cmdq message

2021-12-17 Thread Yanling Song
This commit adds cmdq_sync_cmd_direct_resp() and cmdq_sync_cmd_detail_resp() interfaces by which driver can send cmdq message using wqe a data structure describe the buffer. Signed-off-by: Yanling Song --- drivers/net/spnic/base/meson.build | 1 + drivers/net/spnic/base/spnic_cmdq.c

[PATCH v1 06/25] net/spnic: add cmdq and work queue

2021-12-17 Thread Yanling Song
description, ctrl info, header info and response message data buffer. This patch implements the initialization and data structure. Signed-off-by: Yanling Song --- drivers/net/spnic/base/meson.build | 4 +- drivers/net/spnic/base/spnic_cmdq.c| 202 ++ drivers/net/spnic/base

[PATCH v1 03/25] net/spnic: add mbox message channel

2021-12-17 Thread Yanling Song
This patch adds a message channel named mbox which can send message form PF/VF driver to hardware or sned message from VF to PF. Signed-off-by: Yanling Song --- drivers/net/spnic/base/meson.build |3 +- drivers/net/spnic/base/spnic_hwdev.c | 69 ++ drivers/net/spnic/base/spnic_hwdev.h

[PATCH v1 04/25] net/spnic: introduce event queue

2021-12-17 Thread Yanling Song
This patch introduce event queue to receive response message from hardware or destiation function when a source function send mbox to it. This commit implements the related data structure, initialization and interfaces handling the message. Signed-off-by: Yanling Song --- drivers/net/spnic/base

[PATCH v1 08/25] net/spnic: add hardware info initialization

2021-12-17 Thread Yanling Song
This commits add hardware info initialization, including that device capability initialization, common feature negotiation, and two interfaces spnic_get_board_info(), spnic_get_mgmt_version() to get hardware info and firmware version. Signed-off-by: Yanling Song --- drivers/net/spnic/base

[PATCH v1 09/25] net/spnic: support MAC and link event handling

2021-12-17 Thread Yanling Song
This commit adds interfaces to add/remove MAC addresses and registers related ops to struct eth_dev_ops. Furthermore, this commit adds callback to handle link events. Signed-off-by: Yanling Song --- drivers/net/spnic/base/meson.build | 3 +- drivers/net/spnic/base/spnic_hw_cfg.c

[PATCH v1 11/25] net/spnic: add queue pairs context initialization

2021-12-17 Thread Yanling Song
This patch adds the initialization of Tx/Rx queues context and negotiation of NIC features. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_hw_comm.c | 101 drivers/net/spnic/base/spnic_hw_comm.h | 6 + drivers/net/spnic/base/spnic_nic_cfg.c | 76 +++ drivers/net/spnic/base

[PATCH v1 10/25] net/spnic: add function info initialization

2021-12-17 Thread Yanling Song
This patch mainly implements function info initialization including mtu, link state, port state, port info and cos as well as the definition of the corresponding data structure. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_hw_cfg.c | 43 +++ drivers/net/spnic/base

[PATCH v1 13/25] net/spnic: support Rx congfiguration

2021-12-17 Thread Yanling Song
This patch Rx/Tx configuration including Rx csum offload, LRO, RSS, VLAN filter and VLAN offload. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_nic_cfg.c | 525 + drivers/net/spnic/base/spnic_nic_cfg.h | 387 ++ drivers/net/spnic

[PATCH v1 14/25] net/spnic: add port/vport enable

2021-12-17 Thread Yanling Song
This patch adds interface to enable port/vport so that the hardware would receive packets to host. Signed-off-by: Yanling Song --- drivers/net/spnic/spnic_ethdev.c | 46 1 file changed, 46 insertions(+) diff --git a/drivers/net/spnic/spnic_ethdev.c b/drivers

[PATCH v1 12/25] net/spnic: support mbuf handling of Tx/Rx

2021-12-17 Thread Yanling Song
This patch defines a wqe data structure for hardware to learn the sge info and offload info of packet. Furthermore, this commit implements the interfaces to fill wqe with DPDK mbuf. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_nic_cfg.c | 23 ++ drivers/net/spnic/base

[PATCH v1 18/25] net/spnic: support VLAN filtering and offloading

2021-12-17 Thread Yanling Song
This commit implements vlan_filter_set() and vlan_offload_set() to support VLAN filtering and offloading. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_nic_cfg.c | 8 ++ drivers/net/spnic/spnic_ethdev.c | 121 + 2 files changed, 129 insertions

[PATCH v1 15/25] net/spnic: support IO packets handling

2021-12-17 Thread Yanling Song
too many mbufs for one packet. For Rx packets, this commit implements filling ol_flags of mbuf and rearming new mbuf and rq wqe. Signed-off-by: Yanling Song --- drivers/net/spnic/spnic_ethdev.c | 48 +++ drivers/net/spnic/spnic_ethdev.h | 7 + drivers/net/spnic/spnic_rx.c | 209

[PATCH v1 16/25] net/spnic: add device configure/version/info

2021-12-17 Thread Yanling Song
This commit adds the callbacks to configure queue number and mtu as well as query configuration information and firmware version. Signed-off-by: Yanling Song --- drivers/net/spnic/spnic_ethdev.c | 148 ++- 1 file changed, 146 insertions(+), 2 deletions(-) diff --git

[PATCH v1 19/25] net/spnic: support promiscuous and allmulticast Rx modes

2021-12-17 Thread Yanling Song
This commit implements promiscuous_enable/disable() and allmulticast_enable/disable() to configure promiscuous or allmulticast Rx modes. Note: promiscuous rx mode is only supported by PF. Signed-off-by: Yanling Song --- drivers/net/spnic/spnic_ethdev.c | 156 +++ 1

[PATCH v1 17/25] net/spnic: support RSS configuration update and get

2021-12-17 Thread Yanling Song
This commit implements rss_hash_update and rss_hash_conf_get. Signed-off-by: Yanling Song --- drivers/net/spnic/spnic_ethdev.c | 235 +++ 1 file changed, 235 insertions(+) diff --git a/drivers/net/spnic/spnic_ethdev.c b/drivers/net/spnic/spnic_ethdev.c index

[PATCH v1 21/25] net/spnic: support getting Tx/Rx queues info

2021-12-17 Thread Yanling Song
This patch implements rxq_info_get() and txq_info_get() to support getting queue depth and mbuf pool info of specified Tx/Rx queue. Signed-off-by: Yanling Song --- drivers/net/spnic/spnic_ethdev.c | 21 + 1 file changed, 21 insertions(+) diff --git a/drivers/net/spnic

[PATCH v1 20/25] net/spnic: support flow control

2021-12-17 Thread Yanling Song
This commit implements flow control operations to support related syscalls. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_nic_cfg.c | 53 ++ drivers/net/spnic/base/spnic_nic_cfg.h | 25 + drivers/net/spnic/spnic_ethdev.c | 77

[PATCH v1 23/25] net/spnic: support VFIO interrupt

2021-12-17 Thread Yanling Song
This commit supports VFIO interrupt for Rx queue and asynchronous event, and implements rx_queue_intr_disable() and rx_queue_intr_enable() to disable/enable the interrupt of specified Rx queue. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_eqs.c | 11 ++ drivers/net/spnic

[PATCH v1 22/25] net/spnic: net/spnic: support xstats statistics

2021-12-17 Thread Yanling Song
This commit implements DFX statistics of physical port, function, Rx queues and Tx queues, which includes MAC statistic, unicast/multicast/broadcast packets statistic, rx_mbuf, tx_busy and etc. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_nic_cfg.c | 118 ++ drivers/net

[PATCH v1 24/25] net/spnic: support Tx/Rx queue start/stop

2021-12-17 Thread Yanling Song
: when stopping tx queue, the PMD driver will wait until all tx packets are sent and then releases all mbuf. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_nic_cfg.c | 33 drivers/net/spnic/base/spnic_nic_cfg.h | 13 ++ drivers/net/spnic/spnic_ethdev.c | 82

[PATCH v1 25/25] net/spnic: add doc infrastructure

2021-12-17 Thread Yanling Song
This patch adds doc infrastructure for spnic PMD driver. Signed-off-by: Yanling Song --- MAINTAINERS| 6 +++ doc/guides/nics/features/spnic.ini | 40 doc/guides/nics/spnic.rst | 61 ++ 3 files changed, 107

Re: [PATCH v1 01/25] drivers/net: introduce a new PMD driver

2021-12-21 Thread Yanling Song
On Sun, 19 Dec 2021 11:40:31 -0800 Stephen Hemminger wrote: > On Sat, 18 Dec 2021 10:51:28 +0800 > Yanling Song wrote: > > > +#ifdef CLOCK_MONOTONIC_RAW /* Defined in glibc bits/time.h */ > > +#define CLOCK_TYPE CLOCK_MONOTONIC_RAW > > +#else > > +#define CLOCK

Re: [PATCH v1 16/25] net/spnic: add device configure/version/info

2021-12-21 Thread Yanling Song
On Mon, 20 Dec 2021 08:23:56 +0800 Stephen Hemminger wrote: > On Sat, 18 Dec 2021 10:51:43 +0800 > Yanling Song wrote: > > > +static int spnic_dev_configure(struct rte_eth_dev *dev) > > +{ > > + struct spnic_nic_dev *nic_dev = > > SPNIC_ETH_DEV_TO_PRIVAT

Re: [PATCH v1 01/25] drivers/net: introduce a new PMD driver

2021-12-23 Thread Yanling Song
On Wed, 22 Dec 2021 08:55:22 -0800 Stephen Hemminger wrote: > On Wed, 22 Dec 2021 08:54:00 +0800 > Yanling Song wrote: > > > > If all you want is jiffie accuracy, you could use > > > CLOCK_MONOTONIC_COARSE. > > > > > I did not get your po

[PATCH v2 01/25] drivers/net: introduce a new PMD driver

2021-12-23 Thread Yanling Song
Introduce a new PMD driver which names spnic. Now, this driver only implements module entry without doing anything else. Signed-off-by: Yanling Song --- drivers/net/meson.build | 1 + drivers/net/spnic/base/meson.build| 26 drivers/net/spnic/base/spnic_compat.h | 184

[PATCH v2 02/25] net/spnic: initialize the HW interface

2021-12-23 Thread Yanling Song
Add HW interface registers and initialize the HW interface. Signed-off-by: Yanling Song --- drivers/net/spnic/base/meson.build | 2 + drivers/net/spnic/base/spnic_csr.h | 104 drivers/net/spnic/base/spnic_hwdev.c | 41 ++ drivers/net/spnic/base/spnic_hwdev.h | 29 + drivers/net

[PATCH v2 00/25] Net/SPNIC: support SPNIC into DPDK 22.03

2021-12-23 Thread Yanling Song
; 3. Use CLOCK_MONOTONIC_COARSE instead of CLOCK_MONOTONIC/CLOCK_MONOTONIC_RAW; 4. Fix time_before(); 5. Remove redundant checks in spnic_dev_configure(); Yanling Song (25): drivers/net: introduce a new PMD driver net/spnic: initialize the HW interface net/spnic: add mbox message channel net/spnic: i

[PATCH v2 04/25] net/spnic: introduce event queue

2021-12-23 Thread Yanling Song
This patch introduce event queue to receive response message from hardware or destiation function when a source function send mbox to it. This commit implements the related data structure, initialization and interfaces handling the message. Signed-off-by: Yanling Song --- drivers/net/spnic/base

[PATCH v2 08/25] net/spnic: add hardware info initialization

2021-12-23 Thread Yanling Song
This commits add hardware info initialization, including that device capability initialization, common feature negotiation, and two interfaces spnic_get_board_info(), spnic_get_mgmt_version() to get hardware info and firmware version. Signed-off-by: Yanling Song --- drivers/net/spnic/base

[PATCH v2 05/25] net/spnic: add mgmt module

2021-12-23 Thread Yanling Song
Mgmt module manage the message gerenated from the hardware. This patch implements mgmt module initialization, related event processing and message command definition. Signed-off-by: Yanling Song --- drivers/net/spnic/base/meson.build | 4 +- drivers/net/spnic/base/spnic_cmd.h

[PATCH v2 07/25] net/spnic: add interface handling cmdq message

2021-12-23 Thread Yanling Song
This commit adds cmdq_sync_cmd_direct_resp() and cmdq_sync_cmd_detail_resp() interfaces by which driver can send cmdq message using wqe a data structure describe the buffer. Signed-off-by: Yanling Song --- drivers/net/spnic/base/meson.build | 1 + drivers/net/spnic/base/spnic_cmdq.c

[PATCH v2 06/25] net/spnic: add cmdq and work queue

2021-12-23 Thread Yanling Song
description, ctrl info, header info and response message data buffer. This patch implements the initialization and data structure. Signed-off-by: Yanling Song --- drivers/net/spnic/base/meson.build | 4 +- drivers/net/spnic/base/spnic_cmdq.c| 202 ++ drivers/net/spnic/base

[PATCH v2 03/25] net/spnic: add mbox message channel

2021-12-23 Thread Yanling Song
This patch adds a message channel named mbox which can send message form PF/VF driver to hardware or sned message from VF to PF. Signed-off-by: Yanling Song --- drivers/net/spnic/base/meson.build |3 +- drivers/net/spnic/base/spnic_hwdev.c | 69 ++ drivers/net/spnic/base/spnic_hwdev.h

[PATCH v2 12/25] net/spnic: support mbuf handling of Tx/Rx

2021-12-23 Thread Yanling Song
This patch defines a wqe data structure for hardware to learn the sge info and offload info of packet. Furthermore, this commit implements the interfaces to fill wqe with DPDK mbuf. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_nic_cfg.c | 23 ++ drivers/net/spnic/base

[PATCH v2 14/25] net/spnic: add port/vport enable

2021-12-23 Thread Yanling Song
This patch adds interface to enable port/vport so that the hardware would receive packets to host. Signed-off-by: Yanling Song --- drivers/net/spnic/spnic_ethdev.c | 46 1 file changed, 46 insertions(+) diff --git a/drivers/net/spnic/spnic_ethdev.c b/drivers

[PATCH v2 11/25] net/spnic: add queue pairs context initialization

2021-12-23 Thread Yanling Song
This patch adds the initialization of Tx/Rx queues context and negotiation of NIC features. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_hw_comm.c | 101 drivers/net/spnic/base/spnic_hw_comm.h | 6 + drivers/net/spnic/base/spnic_nic_cfg.c | 76 +++ drivers/net/spnic/base

[PATCH v2 13/25] net/spnic: support Rx congfiguration

2021-12-23 Thread Yanling Song
This patch Rx/Tx configuration including Rx csum offload, LRO, RSS, VLAN filter and VLAN offload. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_nic_cfg.c | 525 + drivers/net/spnic/base/spnic_nic_cfg.h | 387 ++ drivers/net/spnic

[PATCH v2 09/25] net/spnic: support MAC and link event handling

2021-12-23 Thread Yanling Song
This commit adds interfaces to add/remove MAC addresses and registers related ops to struct eth_dev_ops. Furthermore, this commit adds callback to handle link events. Signed-off-by: Yanling Song --- drivers/net/spnic/base/meson.build | 3 +- drivers/net/spnic/base/spnic_hw_cfg.c

[PATCH v2 10/25] net/spnic: add function info initialization

2021-12-23 Thread Yanling Song
This patch mainly implements function info initialization including mtu, link state, port state, port info and cos as well as the definition of the corresponding data structure. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_hw_cfg.c | 43 +++ drivers/net/spnic/base

[PATCH v2 18/25] net/spnic: support VLAN filtering and offloading

2021-12-23 Thread Yanling Song
This commit implements vlan_filter_set() and vlan_offload_set() to support VLAN filtering and offloading. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_nic_cfg.c | 8 ++ drivers/net/spnic/spnic_ethdev.c | 121 + 2 files changed, 129 insertions

[PATCH v2 21/25] net/spnic: support getting Tx/Rx queues info

2021-12-23 Thread Yanling Song
This patch implements rxq_info_get() and txq_info_get() to support getting queue depth and mbuf pool info of specified Tx/Rx queue. Signed-off-by: Yanling Song --- drivers/net/spnic/spnic_ethdev.c | 21 + 1 file changed, 21 insertions(+) diff --git a/drivers/net/spnic

[PATCH v2 15/25] net/spnic: support IO packets handling

2021-12-23 Thread Yanling Song
too many mbufs for one packet. For Rx packets, this commit implements filling ol_flags of mbuf and rearming new mbuf and rq wqe. Signed-off-by: Yanling Song --- drivers/net/spnic/spnic_ethdev.c | 48 +++ drivers/net/spnic/spnic_ethdev.h | 7 + drivers/net/spnic/spnic_rx.c | 209

[PATCH v2 19/25] net/spnic: support promiscuous and allmulticast Rx modes

2021-12-23 Thread Yanling Song
This commit implements promiscuous_enable/disable() and allmulticast_enable/disable() to configure promiscuous or allmulticast Rx modes. Note: promiscuous rx mode is only supported by PF. Signed-off-by: Yanling Song --- drivers/net/spnic/spnic_ethdev.c | 156 +++ 1

[PATCH v2 20/25] net/spnic: support flow control

2021-12-23 Thread Yanling Song
This commit implements flow control operations to support related syscalls. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_nic_cfg.c | 53 ++ drivers/net/spnic/base/spnic_nic_cfg.h | 25 + drivers/net/spnic/spnic_ethdev.c | 77

[PATCH v2 23/25] net/spnic: support VFIO interrupt

2021-12-23 Thread Yanling Song
This commit supports VFIO interrupt for Rx queue and asynchronous event, and implements rx_queue_intr_disable() and rx_queue_intr_enable() to disable/enable the interrupt of specified Rx queue. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_eqs.c | 11 ++ drivers/net/spnic

[PATCH v2 22/25] net/spnic: net/spnic: support xstats statistics

2021-12-23 Thread Yanling Song
This commit implements DFX statistics of physical port, function, Rx queues and Tx queues, which includes MAC statistic, unicast/multicast/broadcast packets statistic, rx_mbuf, tx_busy and etc. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_nic_cfg.c | 118 ++ drivers/net

[PATCH v2 24/25] net/spnic: support Tx/Rx queue start/stop

2021-12-23 Thread Yanling Song
: when stopping tx queue, the PMD driver will wait until all tx packets are sent and then releases all mbuf. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_nic_cfg.c | 33 drivers/net/spnic/base/spnic_nic_cfg.h | 13 ++ drivers/net/spnic/spnic_ethdev.c | 82

[PATCH v2 25/25] net/spnic: add doc infrastructure

2021-12-23 Thread Yanling Song
This patch adds doc infrastructure for spnic PMD driver. Signed-off-by: Yanling Song --- MAINTAINERS| 6 +++ doc/guides/nics/features/spnic.ini | 39 +++ doc/guides/nics/index.rst | 1 + doc/guides/nics/spnic.rst | 61

[PATCH v2 16/25] net/spnic: add device configure/version/info

2021-12-23 Thread Yanling Song
This commit adds the callbacks to configure queue number and mtu as well as query configuration information and firmware version. Signed-off-by: Yanling Song --- drivers/net/spnic/spnic_ethdev.c | 129 ++- 1 file changed, 127 insertions(+), 2 deletions(-) diff --git

[PATCH v2 17/25] net/spnic: support RSS configuration update and get

2021-12-23 Thread Yanling Song
This commit implements rss_hash_update and rss_hash_conf_get. Signed-off-by: Yanling Song --- drivers/net/spnic/spnic_ethdev.c | 235 +++ 1 file changed, 235 insertions(+) diff --git a/drivers/net/spnic/spnic_ethdev.c b/drivers/net/spnic/spnic_ethdev.c index

[PATCH v3 00/25] Net/SPNIC: support SPNIC into DPDK 22.03

2021-12-24 Thread Yanling Song
es; 2. Only support linux in meson.build; 3. Use CLOCK_MONOTONIC_COARSE instead of CLOCK_MONOTONIC/CLOCK_MONOTONIC_RAW; 4. Fix time_before(); 5. Remove redundant checks in spnic_dev_configure(); Yanling Song (25): drivers/net: introduce a new PMD driver net/spnic: initialize the HW interface net

[PATCH v3 01/25] drivers/net: introduce a new PMD driver

2021-12-24 Thread Yanling Song
Introduce a new PMD driver which names spnic. Now, this driver only implements module entry without doing anything else. Signed-off-by: Yanling Song --- drivers/net/meson.build | 1 + drivers/net/spnic/base/meson.build| 26 drivers/net/spnic/base/spnic_compat.h | 184

[PATCH v3 03/25] net/spnic: add mbox message channel

2021-12-24 Thread Yanling Song
This patch adds a message channel named mbox which can send message form PF/VF driver to hardware or sned message from VF to PF. Signed-off-by: Yanling Song --- drivers/net/spnic/base/meson.build |3 +- drivers/net/spnic/base/spnic_hwdev.c | 69 ++ drivers/net/spnic/base/spnic_hwdev.h

[PATCH v3 02/25] net/spnic: initialize the HW interface

2021-12-24 Thread Yanling Song
Add HW interface registers and initialize the HW interface. Signed-off-by: Yanling Song --- drivers/net/spnic/base/meson.build | 2 + drivers/net/spnic/base/spnic_csr.h | 104 drivers/net/spnic/base/spnic_hwdev.c | 41 ++ drivers/net/spnic/base/spnic_hwdev.h | 29 + drivers/net

[PATCH v3 04/25] net/spnic: introduce event queue

2021-12-24 Thread Yanling Song
This patch introduce event queue to receive response message from hardware or destiation function when a source function send mbox to it. This commit implements the related data structure, initialization and interfaces handling the message. Signed-off-by: Yanling Song --- drivers/net/spnic/base

[PATCH v3 06/25] net/spnic: add cmdq and work queue

2021-12-24 Thread Yanling Song
description, ctrl info, header info and response message data buffer. This patch implements the initialization and data structure. Signed-off-by: Yanling Song --- drivers/net/spnic/base/meson.build | 4 +- drivers/net/spnic/base/spnic_cmdq.c| 202 ++ drivers/net/spnic/base

[PATCH v3 05/25] net/spnic: add mgmt module

2021-12-24 Thread Yanling Song
Mgmt module manage the message gerenated from the hardware. This patch implements mgmt module initialization, related event processing and message command definition. Signed-off-by: Yanling Song --- drivers/net/spnic/base/meson.build | 4 +- drivers/net/spnic/base/spnic_cmd.h

[PATCH v3 07/25] net/spnic: add interface handling cmdq message

2021-12-24 Thread Yanling Song
This commit adds cmdq_sync_cmd_direct_resp() and cmdq_sync_cmd_detail_resp() interfaces by which driver can send cmdq message using wqe a data structure describe the buffer. Signed-off-by: Yanling Song --- drivers/net/spnic/base/meson.build | 1 + drivers/net/spnic/base/spnic_cmdq.c

[PATCH v3 09/25] net/spnic: support MAC and link event handling

2021-12-24 Thread Yanling Song
This commit adds interfaces to add/remove MAC addresses and registers related ops to struct eth_dev_ops. Furthermore, this commit adds callback to handle link events. Signed-off-by: Yanling Song --- drivers/net/spnic/base/meson.build | 3 +- drivers/net/spnic/base/spnic_hw_cfg.c

[PATCH v3 08/25] net/spnic: add hardware info initialization

2021-12-24 Thread Yanling Song
This commits add hardware info initialization, including that device capability initialization, common feature negotiation, and two interfaces spnic_get_board_info(), spnic_get_mgmt_version() to get hardware info and firmware version. Signed-off-by: Yanling Song --- drivers/net/spnic/base

[PATCH v3 12/25] net/spnic: support mbuf handling of Tx/Rx

2021-12-24 Thread Yanling Song
This patch defines a wqe data structure for hardware to learn the sge info and offload info of packet. Furthermore, this commit implements the interfaces to fill wqe with DPDK mbuf. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_nic_cfg.c | 23 ++ drivers/net/spnic/base

[PATCH v3 10/25] net/spnic: add function info initialization

2021-12-24 Thread Yanling Song
This patch mainly implements function info initialization including mtu, link state, port state, port info and cos as well as the definition of the corresponding data structure. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_hw_cfg.c | 43 +++ drivers/net/spnic/base

[PATCH v3 11/25] net/spnic: add queue pairs context initialization

2021-12-24 Thread Yanling Song
This patch adds the initialization of Tx/Rx queues context and negotiation of NIC features. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_hw_comm.c | 101 drivers/net/spnic/base/spnic_hw_comm.h | 6 + drivers/net/spnic/base/spnic_nic_cfg.c | 76 +++ drivers/net/spnic/base

[PATCH v3 14/25] net/spnic: add port/vport enable

2021-12-24 Thread Yanling Song
This patch adds interface to enable port/vport so that the hardware would receive packets to host. Signed-off-by: Yanling Song --- drivers/net/spnic/spnic_ethdev.c | 46 1 file changed, 46 insertions(+) diff --git a/drivers/net/spnic/spnic_ethdev.c b/drivers

[PATCH v3 13/25] net/spnic: support Rx congfiguration

2021-12-24 Thread Yanling Song
This patch Rx/Tx configuration including Rx csum offload, LRO, RSS, VLAN filter and VLAN offload. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_nic_cfg.c | 525 + drivers/net/spnic/base/spnic_nic_cfg.h | 387 ++ drivers/net/spnic

[PATCH v3 15/25] net/spnic: support IO packets handling

2021-12-24 Thread Yanling Song
too many mbufs for one packet. For Rx packets, this commit implements filling ol_flags of mbuf and rearming new mbuf and rq wqe. Signed-off-by: Yanling Song --- drivers/net/spnic/spnic_ethdev.c | 48 +++ drivers/net/spnic/spnic_ethdev.h | 7 + drivers/net/spnic/spnic_rx.c | 209

[PATCH v3 17/25] net/spnic: support RSS configuration update and get

2021-12-24 Thread Yanling Song
This commit implements rss_hash_update and rss_hash_conf_get. Signed-off-by: Yanling Song --- drivers/net/spnic/spnic_ethdev.c | 235 +++ 1 file changed, 235 insertions(+) diff --git a/drivers/net/spnic/spnic_ethdev.c b/drivers/net/spnic/spnic_ethdev.c index

[PATCH v3 16/25] net/spnic: add device configure/version/info

2021-12-24 Thread Yanling Song
This commit adds the callbacks to configure queue number and mtu as well as query configuration information and firmware version. Signed-off-by: Yanling Song --- drivers/net/spnic/spnic_ethdev.c | 129 ++- 1 file changed, 127 insertions(+), 2 deletions(-) diff --git

[PATCH v3 21/25] net/spnic: support getting Tx/Rx queues info

2021-12-24 Thread Yanling Song
This patch implements rxq_info_get() and txq_info_get() to support getting queue depth and mbuf pool info of specified Tx/Rx queue. Signed-off-by: Yanling Song --- drivers/net/spnic/spnic_ethdev.c | 21 + 1 file changed, 21 insertions(+) diff --git a/drivers/net/spnic

[PATCH v3 18/25] net/spnic: support VLAN filtering and offloading

2021-12-24 Thread Yanling Song
This commit implements vlan_filter_set() and vlan_offload_set() to support VLAN filtering and offloading. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_nic_cfg.c | 8 ++ drivers/net/spnic/spnic_ethdev.c | 121 + 2 files changed, 129 insertions

[PATCH v3 19/25] net/spnic: support promiscuous and allmulticast Rx modes

2021-12-24 Thread Yanling Song
This commit implements promiscuous_enable/disable() and allmulticast_enable/disable() to configure promiscuous or allmulticast Rx modes. Note: promiscuous rx mode is only supported by PF. Signed-off-by: Yanling Song --- drivers/net/spnic/spnic_ethdev.c | 156 +++ 1

[PATCH v3 23/25] net/spnic: support VFIO interrupt

2021-12-24 Thread Yanling Song
This commit supports VFIO interrupt for Rx queue and asynchronous event, and implements rx_queue_intr_disable() and rx_queue_intr_enable() to disable/enable the interrupt of specified Rx queue. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_eqs.c | 11 ++ drivers/net/spnic

[PATCH v3 20/25] net/spnic: support flow control

2021-12-24 Thread Yanling Song
This commit implements flow control operations to support related syscalls. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_nic_cfg.c | 53 ++ drivers/net/spnic/base/spnic_nic_cfg.h | 25 + drivers/net/spnic/spnic_ethdev.c | 77

[PATCH v3 22/25] net/spnic: net/spnic: support xstats statistics

2021-12-24 Thread Yanling Song
This commit implements DFX statistics of physical port, function, Rx queues and Tx queues, which includes MAC statistic, unicast/multicast/broadcast packets statistic, rx_mbuf, tx_busy and etc. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_nic_cfg.c | 118 ++ drivers/net

[PATCH v3 25/25] net/spnic: add doc infrastructure

2021-12-24 Thread Yanling Song
This patch adds doc infrastructure for spnic PMD driver. Signed-off-by: Yanling Song --- MAINTAINERS| 6 +++ doc/guides/nics/features/spnic.ini | 39 +++ doc/guides/nics/index.rst | 1 + doc/guides/nics/spnic.rst | 61

[PATCH v3 24/25] net/spnic: support Tx/Rx queue start/stop

2021-12-24 Thread Yanling Song
: when stopping tx queue, the PMD driver will wait until all tx packets are sent and then releases all mbuf. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_nic_cfg.c | 33 drivers/net/spnic/base/spnic_nic_cfg.h | 13 ++ drivers/net/spnic/spnic_ethdev.c | 82

[PATCH v4 00/25] Net/SPNIC: support SPNIC into DPDK 22.03

2021-12-25 Thread Yanling Song
g compiling failure. v1->v2: 1. Fix coding style issues and compiling failures; 2. Only support linux in meson.build; 3. Use CLOCK_MONOTONIC_COARSE instead of CLOCK_MONOTONIC/CLOCK_MONOTONIC_RAW; 4. Fix time_before(); 5. Remove redundant checks in spnic_dev_configure(); Yanling Song (25): drivers/ne

[PATCH v4 01/25] drivers/net: introduce a new PMD driver

2021-12-25 Thread Yanling Song
Introduce a new PMD driver which names spnic. Now, this driver only implements module entry without doing anything else. Signed-off-by: Yanling Song --- drivers/net/meson.build | 1 + drivers/net/spnic/base/meson.build| 26 drivers/net/spnic/base/spnic_compat.h | 184

[PATCH v4 03/25] net/spnic: add mbox message channel

2021-12-25 Thread Yanling Song
This patch adds a message channel named mbox which can send message form PF/VF driver to hardware or sned message from VF to PF. Signed-off-by: Yanling Song --- drivers/net/spnic/base/meson.build |3 +- drivers/net/spnic/base/spnic_hwdev.c | 69 ++ drivers/net/spnic/base/spnic_hwdev.h

[PATCH v4 04/25] net/spnic: introduce event queue

2021-12-25 Thread Yanling Song
This patch introduce event queue to receive response message from hardware or destiation function when a source function send mbox to it. This commit implements the related data structure, initialization and interfaces handling the message. Signed-off-by: Yanling Song --- drivers/net/spnic/base

[PATCH v4 06/25] net/spnic: add cmdq and work queue

2021-12-25 Thread Yanling Song
description, ctrl info, header info and response message data buffer. This patch implements the initialization and data structure. Signed-off-by: Yanling Song --- drivers/net/spnic/base/meson.build | 4 +- drivers/net/spnic/base/spnic_cmdq.c| 202 ++ drivers/net/spnic/base

[PATCH v4 05/25] net/spnic: add mgmt module

2021-12-25 Thread Yanling Song
Mgmt module manage the message gerenated from the hardware. This patch implements mgmt module initialization, related event processing and message command definition. Signed-off-by: Yanling Song --- drivers/net/spnic/base/meson.build | 4 +- drivers/net/spnic/base/spnic_cmd.h

[PATCH v4 02/25] net/spnic: initialize the HW interface

2021-12-25 Thread Yanling Song
Add HW interface registers and initialize the HW interface. Signed-off-by: Yanling Song --- drivers/net/spnic/base/meson.build | 2 + drivers/net/spnic/base/spnic_csr.h | 104 drivers/net/spnic/base/spnic_hwdev.c | 41 ++ drivers/net/spnic/base/spnic_hwdev.h | 29 + drivers/net

[PATCH v4 07/25] net/spnic: add interface handling cmdq message

2021-12-25 Thread Yanling Song
This commit adds cmdq_sync_cmd_direct_resp() and cmdq_sync_cmd_detail_resp() interfaces by which driver can send cmdq message using wqe a data structure describe the buffer. Signed-off-by: Yanling Song --- drivers/net/spnic/base/meson.build | 1 + drivers/net/spnic/base/spnic_cmdq.c

[PATCH v4 08/25] net/spnic: add hardware info initialization

2021-12-25 Thread Yanling Song
This commits add hardware info initialization, including that device capability initialization, common feature negotiation, and two interfaces spnic_get_board_info(), spnic_get_mgmt_version() to get hardware info and firmware version. Signed-off-by: Yanling Song --- drivers/net/spnic/base

[PATCH v4 09/25] net/spnic: support MAC and link event handling

2021-12-25 Thread Yanling Song
This commit adds interfaces to add/remove MAC addresses and registers related ops to struct eth_dev_ops. Furthermore, this commit adds callback to handle link events. Signed-off-by: Yanling Song --- drivers/net/spnic/base/meson.build | 3 +- drivers/net/spnic/base/spnic_hw_cfg.c

[PATCH v4 13/25] net/spnic: support Rx congfiguration

2021-12-25 Thread Yanling Song
This patch Rx/Tx configuration including Rx csum offload, LRO, RSS, VLAN filter and VLAN offload. Signed-off-by: Yanling Song --- drivers/net/spnic/base/spnic_nic_cfg.c | 525 + drivers/net/spnic/base/spnic_nic_cfg.h | 387 ++ drivers/net/spnic

  1   2   >