mbox series

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

Message ID cover.1640332922.git.songyl@ramaxel.com (mailing list archive)
Headers
Series Net/SPNIC: support SPNIC into DPDK 22.03 |

Message

Yanling Song Dec. 24, 2021, 8:32 a.m. UTC
  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 electric products: 
storage, communication, PCB...
SPNxxx is a serial PCIE interface NIC cards:
SPN110: 2 PORTs *25G
SPN120: 4 PORTs *25G
SPN130: 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

v2->v3:
1. Fix clang 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/net: introduce a new PMD driver
  net/spnic: initialize the HW interface
  net/spnic: add mbox message channel
  net/spnic: introduce event queue
  net/spnic: add mgmt module
  net/spnic: add cmdq and work queue
  net/spnic: add interface handling cmdq message
  net/spnic: add hardware info initialization
  net/spnic: support MAC and link event handling
  net/spnic: add function info initialization
  net/spnic: add queue pairs context initialization
  net/spnic: support mbuf handling of Tx/Rx
  net/spnic: support Rx congfiguration
  net/spnic: add port/vport enable
  net/spnic: support IO packets handling
  net/spnic: add device configure/version/info
  net/spnic: support RSS configuration update and get
  net/spnic: support VLAN filtering and offloading
  net/spnic: support promiscuous and allmulticast Rx modes
  net/spnic: support flow control
  net/spnic: support getting Tx/Rx queues info
  net/spnic: net/spnic: support xstats statistics
  net/spnic: support VFIO interrupt
  net/spnic: support Tx/Rx queue start/stop
  net/spnic: add doc infrastructure

 MAINTAINERS                              |    6 +
 doc/guides/nics/features/spnic.ini       |   39 +
 doc/guides/nics/index.rst                |    1 +
 doc/guides/nics/spnic.rst                |   61 +
 drivers/net/meson.build                  |    1 +
 drivers/net/spnic/base/meson.build       |   37 +
 drivers/net/spnic/base/spnic_cmd.h       |  222 ++
 drivers/net/spnic/base/spnic_cmdq.c      |  875 ++++++
 drivers/net/spnic/base/spnic_cmdq.h      |  248 ++
 drivers/net/spnic/base/spnic_compat.h    |  184 ++
 drivers/net/spnic/base/spnic_csr.h       |  104 +
 drivers/net/spnic/base/spnic_eqs.c       |  661 +++++
 drivers/net/spnic/base/spnic_eqs.h       |  102 +
 drivers/net/spnic/base/spnic_hw_cfg.c    |  212 ++
 drivers/net/spnic/base/spnic_hw_cfg.h    |  125 +
 drivers/net/spnic/base/spnic_hw_comm.c   |  485 ++++
 drivers/net/spnic/base/spnic_hw_comm.h   |  204 ++
 drivers/net/spnic/base/spnic_hwdev.c     |  514 ++++
 drivers/net/spnic/base/spnic_hwdev.h     |  143 +
 drivers/net/spnic/base/spnic_hwif.c      |  774 ++++++
 drivers/net/spnic/base/spnic_hwif.h      |  155 ++
 drivers/net/spnic/base/spnic_mbox.c      | 1194 ++++++++
 drivers/net/spnic/base/spnic_mbox.h      |  202 ++
 drivers/net/spnic/base/spnic_mgmt.c      |  367 +++
 drivers/net/spnic/base/spnic_mgmt.h      |  110 +
 drivers/net/spnic/base/spnic_nic_cfg.c   | 1348 +++++++++
 drivers/net/spnic/base/spnic_nic_cfg.h   | 1110 ++++++++
 drivers/net/spnic/base/spnic_nic_event.c |  185 ++
 drivers/net/spnic/base/spnic_nic_event.h |   24 +
 drivers/net/spnic/base/spnic_wq.c        |  139 +
 drivers/net/spnic/base/spnic_wq.h        |  123 +
 drivers/net/spnic/meson.build            |   20 +
 drivers/net/spnic/spnic_ethdev.c         | 3212 ++++++++++++++++++++++
 drivers/net/spnic/spnic_ethdev.h         |   95 +
 drivers/net/spnic/spnic_io.c             |  738 +++++
 drivers/net/spnic/spnic_io.h             |  154 ++
 drivers/net/spnic/spnic_rx.c             |  937 +++++++
 drivers/net/spnic/spnic_rx.h             |  326 +++
 drivers/net/spnic/spnic_tx.c             |  858 ++++++
 drivers/net/spnic/spnic_tx.h             |  297 ++
 drivers/net/spnic/version.map            |    3 +
 41 files changed, 16595 insertions(+)
 create mode 100644 doc/guides/nics/features/spnic.ini
 create mode 100644 doc/guides/nics/spnic.rst
 create mode 100644 drivers/net/spnic/base/meson.build
 create mode 100644 drivers/net/spnic/base/spnic_cmd.h
 create mode 100644 drivers/net/spnic/base/spnic_cmdq.c
 create mode 100644 drivers/net/spnic/base/spnic_cmdq.h
 create mode 100644 drivers/net/spnic/base/spnic_compat.h
 create mode 100644 drivers/net/spnic/base/spnic_csr.h
 create mode 100644 drivers/net/spnic/base/spnic_eqs.c
 create mode 100644 drivers/net/spnic/base/spnic_eqs.h
 create mode 100644 drivers/net/spnic/base/spnic_hw_cfg.c
 create mode 100644 drivers/net/spnic/base/spnic_hw_cfg.h
 create mode 100644 drivers/net/spnic/base/spnic_hw_comm.c
 create mode 100644 drivers/net/spnic/base/spnic_hw_comm.h
 create mode 100644 drivers/net/spnic/base/spnic_hwdev.c
 create mode 100644 drivers/net/spnic/base/spnic_hwdev.h
 create mode 100644 drivers/net/spnic/base/spnic_hwif.c
 create mode 100644 drivers/net/spnic/base/spnic_hwif.h
 create mode 100644 drivers/net/spnic/base/spnic_mbox.c
 create mode 100644 drivers/net/spnic/base/spnic_mbox.h
 create mode 100644 drivers/net/spnic/base/spnic_mgmt.c
 create mode 100644 drivers/net/spnic/base/spnic_mgmt.h
 create mode 100644 drivers/net/spnic/base/spnic_nic_cfg.c
 create mode 100644 drivers/net/spnic/base/spnic_nic_cfg.h
 create mode 100644 drivers/net/spnic/base/spnic_nic_event.c
 create mode 100644 drivers/net/spnic/base/spnic_nic_event.h
 create mode 100644 drivers/net/spnic/base/spnic_wq.c
 create mode 100644 drivers/net/spnic/base/spnic_wq.h
 create mode 100644 drivers/net/spnic/meson.build
 create mode 100644 drivers/net/spnic/spnic_ethdev.c
 create mode 100644 drivers/net/spnic/spnic_ethdev.h
 create mode 100644 drivers/net/spnic/spnic_io.c
 create mode 100644 drivers/net/spnic/spnic_io.h
 create mode 100644 drivers/net/spnic/spnic_rx.c
 create mode 100644 drivers/net/spnic/spnic_rx.h
 create mode 100644 drivers/net/spnic/spnic_tx.c
 create mode 100644 drivers/net/spnic/spnic_tx.h
 create mode 100644 drivers/net/spnic/version.map
  

Comments

Stephen Hemminger Dec. 24, 2021, 5:44 p.m. UTC | #1
On Fri, 24 Dec 2021 16:32:18 +0800
Yanling Song <songyl@ramaxel.com> 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 electric products: 
> storage, communication, PCB...
> SPNxxx is a serial PCIE interface NIC cards:
> SPN110: 2 PORTs *25G
> SPN120: 4 PORTs *25G
> SPN130: 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
> 
> v2->v3:
> 1. Fix clang 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();

Overall looks good.

Please use a consistent prefix to all globally visible symbols to avoid any
possible name clashes when statically linking.

$ nm ./build/drivers/librte_net_spnic.a |  grep ' t ' | grep -v spnic_ | grep -v rte_
00000000000006f0 t remove_aeq
0000000000000040 t fault_event_handler
0000000000000060 t ffm_event_msg_handler
00000000000016c0 t alloc_mbox_info
0000000000000ca0 t send_mbox_to_func
0000000000000890 t send_tlp_mbox_to_func
00000000000000c0 t pciinitfn_net_spnic
0000000000000890 t clean_queue_offload_ctxt
  
Yanling Song Dec. 28, 2021, 7:01 a.m. UTC | #2
On Fri, 24 Dec 2021 09:44:57 -0800
Stephen Hemminger <stephen@networkplumber.org> wrote:

> On Fri, 24 Dec 2021 16:32:18 +0800
> Yanling Song <songyl@ramaxel.com> 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 electric products: storage, communication, PCB...
> > SPNxxx is a serial PCIE interface NIC cards:
> > SPN110: 2 PORTs *25G
> > SPN120: 4 PORTs *25G
> > SPN130: 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
> > 
> > v2->v3:
> > 1. Fix clang 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();  
> 
> Overall looks good.
> 
> Please use a consistent prefix to all globally visible symbols to
> avoid any possible name clashes when statically linking.
> 
> $ nm ./build/drivers/librte_net_spnic.a |  grep ' t ' | grep -v
> spnic_ | grep -v rte_ 00000000000006f0 t remove_aeq
> 0000000000000040 t fault_event_handler
> 0000000000000060 t ffm_event_msg_handler
> 00000000000016c0 t alloc_mbox_info
> 0000000000000ca0 t send_mbox_to_func
> 0000000000000890 t send_tlp_mbox_to_func
> 00000000000000c0 t pciinitfn_net_spnic
> 0000000000000890 t clean_queue_offload_ctxt
> 
> 
Good point. There are some external functions which have no spnic_
prefix. and there are also some static functions which have no
spnic_ prefix.
Since static functions only works in the file, it doesn't matter to add
prefix or not. My plan is to add spnic_ prefix to those external
functions. Is it ok to you?
  
Stephen Hemminger Dec. 28, 2021, 3:55 p.m. UTC | #3
On Tue, 28 Dec 2021 15:01:20 +0800
Yanling Song <songyl@ramaxel.com> wrote:

> On Fri, 24 Dec 2021 09:44:57 -0800
> Stephen Hemminger <stephen@networkplumber.org> wrote:
> 
> > On Fri, 24 Dec 2021 16:32:18 +0800
> > Yanling Song <songyl@ramaxel.com> 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 electric products: storage, communication, PCB...
> > > SPNxxx is a serial PCIE interface NIC cards:
> > > SPN110: 2 PORTs *25G
> > > SPN120: 4 PORTs *25G
> > > SPN130: 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
> > > 
> > > v2->v3:
> > > 1. Fix clang 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();    
> > 
> > Overall looks good.
> > 
> > Please use a consistent prefix to all globally visible symbols to
> > avoid any possible name clashes when statically linking.
> > 
> > $ nm ./build/drivers/librte_net_spnic.a |  grep ' t ' | grep -v
> > spnic_ | grep -v rte_ 00000000000006f0 t remove_aeq
> > 0000000000000040 t fault_event_handler
> > 0000000000000060 t ffm_event_msg_handler
> > 00000000000016c0 t alloc_mbox_info
> > 0000000000000ca0 t send_mbox_to_func
> > 0000000000000890 t send_tlp_mbox_to_func
> > 00000000000000c0 t pciinitfn_net_spnic
> > 0000000000000890 t clean_queue_offload_ctxt
> > 
> >   
> Good point. There are some external functions which have no spnic_
> prefix. and there are also some static functions which have no
> spnic_ prefix.
> Since static functions only works in the file, it doesn't matter to add
> prefix or not. My plan is to add spnic_ prefix to those external
> functions. Is it ok to you?
> 
> 

Yes, that is what this script was looking for, external functions with no prefix
  
Yanling Song Dec. 29, 2021, 12:11 p.m. UTC | #4
On Tue, 28 Dec 2021 07:55:23 -0800
Stephen Hemminger <stephen@networkplumber.org> wrote:

> On Tue, 28 Dec 2021 15:01:20 +0800
> Yanling Song <songyl@ramaxel.com> wrote:
> 
> > On Fri, 24 Dec 2021 09:44:57 -0800
> > Stephen Hemminger <stephen@networkplumber.org> wrote:
> >   
> > > On Fri, 24 Dec 2021 16:32:18 +0800
> > > Yanling Song <songyl@ramaxel.com> 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 electric products: storage,
> > > > communication, PCB... SPNxxx is a serial PCIE interface NIC
> > > > cards: SPN110: 2 PORTs *25G
> > > > SPN120: 4 PORTs *25G
> > > > SPN130: 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
> > > > 
> > > > v2->v3:
> > > > 1. Fix clang 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();      
> > > 
> > > Overall looks good.
> > > 
> > > Please use a consistent prefix to all globally visible symbols to
> > > avoid any possible name clashes when statically linking.
> > > 
> > > $ nm ./build/drivers/librte_net_spnic.a |  grep ' t ' | grep -v
> > > spnic_ | grep -v rte_ 00000000000006f0 t remove_aeq
> > > 0000000000000040 t fault_event_handler
> > > 0000000000000060 t ffm_event_msg_handler
> > > 00000000000016c0 t alloc_mbox_info
> > > 0000000000000ca0 t send_mbox_to_func
> > > 0000000000000890 t send_tlp_mbox_to_func
> > > 00000000000000c0 t pciinitfn_net_spnic
> > > 0000000000000890 t clean_queue_offload_ctxt
> > > 
> > >     
> > Good point. There are some external functions which have no spnic_
> > prefix. and there are also some static functions which have no
> > spnic_ prefix.
> > Since static functions only works in the file, it doesn't matter to
> > add prefix or not. My plan is to add spnic_ prefix to those external
> > functions. Is it ok to you?
> > 
> >   
> 
> Yes, that is what this script was looking for, external functions
> with no prefix

Ok. Changes will be included in V5.