mbox series

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

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

Message

Yanling Song Dec. 30, 2021, 6:08 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

v6->v5, No real changes:
1. Move the fix of RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS from patch 26 to patch 2;
2. Change the description of patch 26.

v5->v4:
1. Add prefix "spinc_" for external functions;
2. Remove temporary MACRO: RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS
3. Do not use void* for keeping the type information

v3->v4:
1. Fix ABI test failure;
2. Remove some descriptions in spnic.rst.

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 (26):
  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
  net/spnic: fixes unsafe C style code

 MAINTAINERS                              |    6 +
 doc/guides/nics/features/spnic.ini       |   39 +
 doc/guides/nics/index.rst                |    1 +
 doc/guides/nics/spnic.rst                |   55 +
 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    |  201 ++
 drivers/net/spnic/base/spnic_hw_cfg.h    |  125 +
 drivers/net/spnic/base/spnic_hw_comm.c   |  483 ++++
 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      |  770 ++++++
 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      |  366 +++
 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 |  183 ++
 drivers/net/spnic/base/spnic_nic_event.h |   24 +
 drivers/net/spnic/base/spnic_wq.c        |  138 +
 drivers/net/spnic/base/spnic_wq.h        |  123 +
 drivers/net/spnic/meson.build            |   20 +
 drivers/net/spnic/spnic_ethdev.c         | 3211 ++++++++++++++++++++++
 drivers/net/spnic/spnic_ethdev.h         |   95 +
 drivers/net/spnic/spnic_io.c             |  728 +++++
 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, 16557 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

Ferruh Yigit Jan. 19, 2022, 4:56 p.m. UTC | #1
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 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
> 

Hi Yanling,

As far as I can see hnic (from Huawei) and this spnic drivers are alike,
what is the relation between these two?

> 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
> 
> v6->v5, No real changes:
> 1. Move the fix of RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS from patch 26 to patch 2;
> 2. Change the description of patch 26.
> 
> v5->v4:
> 1. Add prefix "spinc_" for external functions;
> 2. Remove temporary MACRO: RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS
> 3. Do not use void* for keeping the type information
> 
> v3->v4:
> 1. Fix ABI test failure;
> 2. Remove some descriptions in spnic.rst.
> 
> 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 (26):
>    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
>    net/spnic: fixes unsafe C style code

<...>
  
Yanling Song Jan. 21, 2022, 9:27 a.m. UTC | #2
On Wed, 19 Jan 2022 16:56:52 +0000
Ferruh Yigit <ferruh.yigit@intel.com> 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 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
> >   
> 
> Hi Yanling,
> 
> As far as I can see hnic (from Huawei) and this spnic drivers are
> alike, what is the relation between these two?
> 
It is hard to create a brand new driver from scratch, so we referenced
to hinic driver when developing spnic.

> > 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
> > 
> > v6->v5, No real changes:
> > 1. Move the fix of RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS from patch 26
> > to patch 2; 2. Change the description of patch 26.
> > 
> > v5->v4:
> > 1. Add prefix "spinc_" for external functions;
> > 2. Remove temporary MACRO: RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS
> > 3. Do not use void* for keeping the type information
> > 
> > v3->v4:
> > 1. Fix ABI test failure;
> > 2. Remove some descriptions in spnic.rst.
> > 
> > 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 (26):
> >    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
> >    net/spnic: fixes unsafe C style code  
> 
> <...>
  
Ferruh Yigit Jan. 21, 2022, 10:22 a.m. UTC | #3
On 1/21/2022 9:27 AM, Yanling Song wrote:
> On Wed, 19 Jan 2022 16:56:52 +0000
> Ferruh Yigit <ferruh.yigit@intel.com> 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 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
>>>    
>>
>> Hi Yanling,
>>
>> As far as I can see hnic (from Huawei) and this spnic drivers are
>> alike, what is the relation between these two?
>>
> It is hard to create a brand new driver from scratch, so we referenced
> to hinic driver when developing spnic.
> 

That is OK, but based on the familiarity of the code you may consider
keeping the original code Copyright, I didn't investigate in
that level but cc'ed hinic maintainers for info.
Also cc'ed Hemant for guidance.


But my question was more related to the HW, is there any relation between
the hinic HW and spnic HW? Like one is derived from other etc...

>>> 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
>>>
>>> v6->v5, No real changes:
>>> 1. Move the fix of RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS from patch 26
>>> to patch 2; 2. Change the description of patch 26.
>>>
>>> v5->v4:
>>> 1. Add prefix "spinc_" for external functions;
>>> 2. Remove temporary MACRO: RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS
>>> 3. Do not use void* for keeping the type information
>>>
>>> v3->v4:
>>> 1. Fix ABI test failure;
>>> 2. Remove some descriptions in spnic.rst.
>>>
>>> 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 (26):
>>>     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
>>>     net/spnic: fixes unsafe C style code
>>
>> <...>
>
  
Hemant Agrawal Jan. 24, 2022, 5:12 a.m. UTC | #4
On 1/21/2022 3:52 PM, Ferruh Yigit wrote:
> On 1/21/2022 9:27 AM, Yanling Song wrote:
>> On Wed, 19 Jan 2022 16:56:52 +0000
>> Ferruh Yigit <ferruh.yigit@intel.com> 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 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
>>>
>>> Hi Yanling,
>>>
>>> As far as I can see hnic (from Huawei) and this spnic drivers are
>>> alike, what is the relation between these two?
>>>
>> It is hard to create a brand new driver from scratch, so we referenced
>> to hinic driver when developing spnic.
>>
>
> That is OK, but based on the familiarity of the code you may consider
> keeping the original code Copyright, I didn't investigate in
> that level but cc'ed hinic maintainers for info.
> Also cc'ed Hemant for guidance.
>
>
Yes, if large part of code is driven from an existing driver, it is 
advisable to keep the original copyright. You can add your copyright as 
well, if you have changed the code.

Alternately, you provide reference in the file header, that this file id 
driver from xx file having license type Y.


> But my question was more related to the HW, is there any relation between
> the hinic HW and spnic HW? Like one is derived from other etc...
>
>>>> 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
>>>>
>>>> v6->v5, No real changes:
>>>> 1. Move the fix of RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS from patch 26
>>>> to patch 2; 2. Change the description of patch 26.
>>>>
>>>> v5->v4:
>>>> 1. Add prefix "spinc_" for external functions;
>>>> 2. Remove temporary MACRO: RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS
>>>> 3. Do not use void* for keeping the type information
>>>>
>>>> v3->v4:
>>>> 1. Fix ABI test failure;
>>>> 2. Remove some descriptions in spnic.rst.
>>>>
>>>> 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 (26):
>>>>     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
>>>>     net/spnic: fixes unsafe C style code
>>>
>>> <...>
>>
>
  
Yanling Song Feb. 12, 2022, 2:01 p.m. UTC | #5
On Fri, 21 Jan 2022 10:22:10 +0000
Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> On 1/21/2022 9:27 AM, Yanling Song wrote:
> > On Wed, 19 Jan 2022 16:56:52 +0000
> > Ferruh Yigit <ferruh.yigit@intel.com> 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 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
> >>>      
> >>
> >> Hi Yanling,
> >>
> >> As far as I can see hnic (from Huawei) and this spnic drivers are
> >> alike, what is the relation between these two?
> >>  
> > It is hard to create a brand new driver from scratch, so we
> > referenced to hinic driver when developing spnic.
> >   
> 
> That is OK, but based on the familiarity of the code you may consider
> keeping the original code Copyright, I didn't investigate in
> that level but cc'ed hinic maintainers for info.
> Also cc'ed Hemant for guidance.
> 
> 
Sorry for late reponse since it was Spring Festival and I was in
vacation, just back to work.

Hemant gave the guidance already, but we do not want to keep another
company's copyright in our code. How should we modify code so that the
code meet DPDK's requirment and can be accepted with our copyright
only? 


> But my question was more related to the HW, is there any relation
> between the hinic HW and spnic HW? Like one is derived from other
> etc...

I'm not clear what's the relation between hinic/spnic hw since we do
not know what's the hinic hw.

> 
> >>> 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
> >>>
> >>> v6->v5, No real changes:
> >>> 1. Move the fix of RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS from patch 26
> >>> to patch 2; 2. Change the description of patch 26.
> >>>
> >>> v5->v4:
> >>> 1. Add prefix "spinc_" for external functions;
> >>> 2. Remove temporary MACRO: RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS
> >>> 3. Do not use void* for keeping the type information
> >>>
> >>> v3->v4:
> >>> 1. Fix ABI test failure;
> >>> 2. Remove some descriptions in spnic.rst.
> >>>
> >>> 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 (26):
> >>>     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
> >>>     net/spnic: fixes unsafe C style code  
> >>
> >> <...>  
> >   
>
  
Thomas Monjalon Feb. 13, 2022, 6:07 p.m. UTC | #6
12/02/2022 15:01, Yanling Song:
> On Fri, 21 Jan 2022 10:22:10 +0000
> Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> 
> > On 1/21/2022 9:27 AM, Yanling Song wrote:
> > > On Wed, 19 Jan 2022 16:56:52 +0000
> > > Ferruh Yigit <ferruh.yigit@intel.com> 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 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
> > >>>      
> > >>
> > >> Hi Yanling,
> > >>
> > >> As far as I can see hnic (from Huawei) and this spnic drivers are
> > >> alike, what is the relation between these two?
> > > 
> > > It is hard to create a brand new driver from scratch, so we
> > > referenced to hinic driver when developing spnic.
> > 
> > That is OK, but based on the familiarity of the code you may consider
> > keeping the original code Copyright, I didn't investigate in
> > that level but cc'ed hinic maintainers for info.
> > Also cc'ed Hemant for guidance.

What is the percentage of familiarity in the code?

> Sorry for late reponse since it was Spring Festival and I was in
> vacation, just back to work.
> 
> Hemant gave the guidance already, but we do not want to keep another
> company's copyright in our code.
> How should we modify code so that the
> code meet DPDK's requirment and can be accepted with our copyright
> only? 

If you don't want to keep a copyright, don't copy the code.

> > But my question was more related to the HW, is there any relation
> > between the hinic HW and spnic HW? Like one is derived from other
> > etc...
> 
> I'm not clear what's the relation between hinic/spnic hw since we do
> not know what's the hinic hw.

Do you mean you are copying a driver and its design choices
without understanding what it does?
  
Ferruh Yigit Feb. 16, 2022, 2:19 p.m. UTC | #7
On 2/12/2022 2:01 PM, Yanling Song wrote:
>> But my question was more related to the HW, is there any relation
>> between the hinic HW and spnic HW? Like one is derived from other
>> etc...
> I'm not clear what's the relation between hinic/spnic hw since we do
> not know what's the hinic hw.
> 

So there is no relation between HW, thanks for clarification.
  
Yanling Song Feb. 18, 2022, 9:30 a.m. UTC | #8
On Sun, 13 Feb 2022 19:07:09 +0100
Thomas Monjalon <thomas@monjalon.net> wrote:

> 12/02/2022 15:01, Yanling Song:
> > On Fri, 21 Jan 2022 10:22:10 +0000
> > Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> >   
> > > On 1/21/2022 9:27 AM, Yanling Song wrote:  
> > > > On Wed, 19 Jan 2022 16:56:52 +0000
> > > > Ferruh Yigit <ferruh.yigit@intel.com> 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 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
> > > >>>        
> > > >>
> > > >> Hi Yanling,
> > > >>
> > > >> As far as I can see hnic (from Huawei) and this spnic drivers
> > > >> are alike, what is the relation between these two?  
> > > > 
> > > > It is hard to create a brand new driver from scratch, so we
> > > > referenced to hinic driver when developing spnic.  
> > > 
> > > That is OK, but based on the familiarity of the code you may
> > > consider keeping the original code Copyright, I didn't
> > > investigate in that level but cc'ed hinic maintainers for info.
> > > Also cc'ed Hemant for guidance.  
> 
> What is the percentage of familiarity in the code?
> 
Scanned by tools: There are 0.8k similar code.

> > Sorry for late reponse since it was Spring Festival and I was in
> > vacation, just back to work.
> > 
> > Hemant gave the guidance already, but we do not want to keep another
> > company's copyright in our code.
> > How should we modify code so that the
> > code meet DPDK's requirment and can be accepted with our copyright
> > only?   
> 
> If you don't want to keep a copyright, don't copy the code.
> 
Got it. We will modify the code to meet the requirement of community
and upstream it again. Since the change is great, I'm afraid that the
new code maybe cannot meet the schedule of 22.03.

> > > But my question was more related to the HW, is there any relation
> > > between the hinic HW and spnic HW? Like one is derived from other
> > > etc...  
> > 
> > I'm not clear what's the relation between hinic/spnic hw since we do
> > not know what's the hinic hw.  
> 
> Do you mean you are copying a driver and its design choices
> without understanding what it does?
> 
In my opinion, it does not conflict with open source: we can develop the
driver on our own without referring to other driver and will do it
this way.
  
Ferruh Yigit April 13, 2023, 9:02 a.m. UTC | #9
On 2/18/2022 9:30 AM, Yanling Song wrote:
> On Sun, 13 Feb 2022 19:07:09 +0100
> Thomas Monjalon <thomas@monjalon.net> wrote:
> 
>> 12/02/2022 15:01, Yanling Song:
>>> On Fri, 21 Jan 2022 10:22:10 +0000
>>> Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>>>   
>>>> On 1/21/2022 9:27 AM, Yanling Song wrote:  
>>>>> On Wed, 19 Jan 2022 16:56:52 +0000
>>>>> Ferruh Yigit <ferruh.yigit@intel.com> 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 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
>>>>>>>        
>>>>>>
>>>>>> Hi Yanling,
>>>>>>
>>>>>> As far as I can see hnic (from Huawei) and this spnic drivers
>>>>>> are alike, what is the relation between these two?  
>>>>>
>>>>> It is hard to create a brand new driver from scratch, so we
>>>>> referenced to hinic driver when developing spnic.  
>>>>
>>>> That is OK, but based on the familiarity of the code you may
>>>> consider keeping the original code Copyright, I didn't
>>>> investigate in that level but cc'ed hinic maintainers for info.
>>>> Also cc'ed Hemant for guidance.  
>>
>> What is the percentage of familiarity in the code?
>>
> Scanned by tools: There are 0.8k similar code.
> 
>>> Sorry for late reponse since it was Spring Festival and I was in
>>> vacation, just back to work.
>>>
>>> Hemant gave the guidance already, but we do not want to keep another
>>> company's copyright in our code.
>>> How should we modify code so that the
>>> code meet DPDK's requirment and can be accepted with our copyright
>>> only?   
>>
>> If you don't want to keep a copyright, don't copy the code.
>>
> Got it. We will modify the code to meet the requirement of community
> and upstream it again. Since the change is great, I'm afraid that the
> new code maybe cannot meet the schedule of 22.03.
> 

Hi Yanling,

What is the status of the driver? Will there be a new version?