[v6,1/8] net/rnp: add skeleton

Message ID 20230901023050.40893-2-caowenbo@mucse.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers
Series drivers/net Add Support mucse N10 Pmd Driver |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

11 Sept. 1, 2023, 2:30 a.m. UTC
  Add Basic PMD library and doc build infrastructure
Update maintainers file to claim responsibility.

Signed-off-by: Wenbo Cao <caowenbo@mucse.com>
---
 MAINTAINERS                      |  6 +++++
 doc/guides/nics/features/rnp.ini |  8 +++++++
 doc/guides/nics/index.rst        |  1 +
 doc/guides/nics/rnp.rst          | 38 ++++++++++++++++++++++++++++++++
 drivers/net/meson.build          |  1 +
 drivers/net/rnp/meson.build      | 11 +++++++++
 drivers/net/rnp/rnp_ethdev.c     |  3 +++
 7 files changed, 68 insertions(+)
 create mode 100644 doc/guides/nics/features/rnp.ini
 create mode 100644 doc/guides/nics/rnp.rst
 create mode 100644 drivers/net/rnp/meson.build
 create mode 100644 drivers/net/rnp/rnp_ethdev.c
  

Comments

Ferruh Yigit Sept. 5, 2023, 3:35 p.m. UTC | #1
Unaddressed
On 9/1/2023 3:30 AM, Wenbo Cao wrote:
> Add Basic PMD library and doc build infrastructure
> Update maintainers file to claim responsibility.
> 
> Signed-off-by: Wenbo Cao <caowenbo@mucse.com>

<...>

> diff --git a/doc/guides/nics/rnp.rst b/doc/guides/nics/rnp.rst
> new file mode 100644
> index 0000000000..0eb8f2d415
> --- /dev/null
> +++ b/doc/guides/nics/rnp.rst
> @@ -0,0 +1,38 @@
> +..  SPADIX-License-Identifier: BSD-3-Clause

s/SPADIX/SPDX/

> +    Copyright(c) 2023 Mucse IC Design Ltd.
> +
> +RNP Poll Mode driver
> +====================
> +
> +The RNP ETHDEV PMD (**librte_net_rnp**) provides poll mode ethdev
> +driver support for the inbuilt network device found in the **Mucse RNP**
> +
> +Prerequisites
> +-------------
> +More information can be found at `Mucse, Official Website
> +<https://mucse.com/productDetail>`_.
> +
> +Supported Chipsets and NICs
> +---------------------------
> +
> +- MUCSE Ethernet Controller N10 Series for 10GbE or 40GbE (Dual-port)
> +

Can you provide a link for the product, and if there is an English
version it can reach to more people?

> +Limitations or Known issues
> +---------------------------
> +
> +Build with ICC is not supported yet.
>

I know this is documented in other PMDs too, but at this stage ICC is
supported with best effort, and I am not sure if anybody testing with
it, so I think it is OK to drop this as limitation.


> +BSD are not supported yet.
>

FreeBSD is not supported.
Also Windows seems not supported, you may document that too.

> +
> +CRC stripping
> +~~~~~~~~~~~~~
> +
> +The RNP Soc family Nic strip the CRC for every packets coming into the

s/Soc/SoC/
s/Nic/NIC/

> +host interface irrespective of the offload configuration.
> +When you want to disable CRC_OFFLOAD the operate will influence the rxCksum offload.
>

I didn't understand the second sentences, from first one I understand
'RTE_ETH_RX_OFFLOAD_KEEP_CRC' is not supported by the PMD, but can you
please clarify more?


> +
> +VLAN Strip/Filter
> +~~~~~~~~~~~~~~~~~
> +
> +For VLAN strip/filter, RNP just support vlan is CVLAN(0x8100).If the outvlan type is SVLAN(0X88a8)

s/vlan/VLAN/
Please put space, " ", after '.' in documentation. Same comment for all
document.

> +VLAN filter or strip will not effort for this packet.It will bypass filter to the host default queue,
> +whatever the other filter rule is.
>

VLAN strip/filter doesn't work for double-tag (QinQ), it only works for
single VLAN tag, is this correct? If so can you please update above
sentences to clarify this?
  
11 Sept. 6, 2023, 8:15 a.m. UTC | #2
Addressed
Hi Ferruh,

Thanks for your kindly review, please see the below comment.

Regards Wenbo	

> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@amd.com>
> Sent: 2023年9月5日 23:35
> To: Wenbo Cao <caowenbo@mucse.com>; Thomas Monjalon
> <thomas@monjalon.net>
> Cc: dev@dpdk.org; andrew.rybchenko@oktetlabs.ru; yaojun@mucse.com
> Subject: Re: [PATCH v6 1/8] net/rnp: add skeleton
> 
> On 9/1/2023 3:30 AM, Wenbo Cao wrote:
> > Add Basic PMD library and doc build infrastructure Update maintainers
> > file to claim responsibility.
> >
> > Signed-off-by: Wenbo Cao <caowenbo@mucse.com>
> 
> <...>
> 
> > diff --git a/doc/guides/nics/rnp.rst b/doc/guides/nics/rnp.rst new
> > file mode 100644 index 0000000000..0eb8f2d415
> > --- /dev/null
> > +++ b/doc/guides/nics/rnp.rst
> > @@ -0,0 +1,38 @@
> > +..  SPADIX-License-Identifier: BSD-3-Clause
> 
> s/SPADIX/SPDX/
I get it.
> 
> > +    Copyright(c) 2023 Mucse IC Design Ltd.
> > +
> > +RNP Poll Mode driver
> > +====================
> > +
> > +The RNP ETHDEV PMD (**librte_net_rnp**) provides poll mode ethdev
> > +driver support for the inbuilt network device found in the **Mucse
> > +RNP**
> > +
> > +Prerequisites
> > +-------------
> > +More information can be found at `Mucse, Official Website
> > +<https://mucse.com/productDetail>`_.
> > +
> > +Supported Chipsets and NICs
> > +---------------------------
> > +
> > +- MUCSE Ethernet Controller N10 Series for 10GbE or 40GbE (Dual-port)
> > +
> 
> Can you provide a link for the product, and if there is an English version it can
> reach to more people?
> 
For English version, it will be coming  soon in a month about.
we will provide a html link of pdf for the time.
> > +Limitations or Known issues
> > +---------------------------
> > +
> > +Build with ICC is not supported yet.
> >
> 
> I know this is documented in other PMDs too, but at this stage ICC is supported
> with best effort, and I am not sure if anybody testing with it, so I think it is OK to
> drop this as limitation.
> 
> 
We have never test the code use icc-compile-tool, just use gcc-compile-tool,
I'm going to try to test it with icc :)
> > +BSD are not supported yet.
> >
> 
> FreeBSD is not supported.
> Also Windows seems not supported, you may document that too.
> 
> > +
> > +CRC stripping
> > +~~~~~~~~~~~~~
> > +
> > +The RNP Soc family Nic strip the CRC for every packets coming into
> > +the
> 
> s/Soc/SoC/
> s/Nic/NIC/
> 
For this spell issue, is there exist tool I can use to check it ?
Thanks a lot.
> > +host interface irrespective of the offload configuration.
> > +When you want to disable CRC_OFFLOAD the operate will influence the
> rxCksum offload.
> >
> 
> I didn't understand the second sentences, from first one I understand
> 'RTE_ETH_RX_OFFLOAD_KEEP_CRC' is not supported by the PMD, but can you
> please clarify more?
> 
> 
disable CRC_OFFLOAD will trigger SOC bug,
which causing bad-cksum bit in rx description always be 1 ,even package has no cksum  error.
> > +
> > +VLAN Strip/Filter
> > +~~~~~~~~~~~~~~~~~
> > +
> > +For VLAN strip/filter, RNP just support vlan is CVLAN(0x8100).If the
> > +outvlan type is SVLAN(0X88a8)
> 
> s/vlan/VLAN/
> Please put space, " ", after '.' in documentation. Same comment for all document.
> 
I forgot the format before.
> > +VLAN filter or strip will not effort for this packet.It will bypass
> > +filter to the host default queue, whatever the other filter rule is.
> >
> 
> VLAN strip/filter doesn't work for double-tag (QinQ), it only works for single VLAN
> tag, is this correct? If so can you please update above sentences to clarify this?
> 
For VLAN strip/filter, if the VLAN type have (0x88a8), the feature of hardware isn't effect.
  
Ferruh Yigit March 29, 2024, 11:28 a.m. UTC | #3
On 9/1/2023 3:30 AM, Wenbo Cao wrote:
> Add Basic PMD library and doc build infrastructure
> Update maintainers file to claim responsibility.
> 
> Signed-off-by: Wenbo Cao <caowenbo@mucse.com>
>

Hi Wenbo,

What is the status of the 'rnp' driver, v7 was expected but not
received, will upstreaming continue for v24.03?
  
11 March 29, 2024, 2:45 p.m. UTC | #4
Hi Ferruh,

Thanks for your  reminder, I'm sorry for that I had been work on anothing before.
Recendly, I have been reworked on this work. It will miss on release of v24.03.

For another thing, I'm always confused for the secondary process call like hw->mac_ops this function pointer.
is this method can work normally on secondary process ?
For example,ixgbe on secondary process call ixgbe_get_module_eeprom I fond that it  will cause process core-dump.
because of secondary process use primary process function-point address.
Is dpdk plaform  allowed user call the eth_dev_ops on secondary process?
I don't find any limit and don't know wether or not to protect this function call work normally.
My driver eth_dev_ops achieve will used some function-pointer, so I'm confued about this.
Wish your kind guidance.

Regadrs Wenbo


> -----Original Message-----
> From: Ferruh.Yigit@amd.com <Ferruh.Yigit@amd.com>
> Sent: 2024年3月29日 19:28
> To: Wenbo Cao <caowenbo@mucse.com>; Thomas Monjalon
> <thomas@monjalon.net>
> Cc: dev@dpdk.org; andrew.rybchenko@oktetlabs.ru; yaojun@mucse.com
> Subject: Re: [PATCH v6 1/8] net/rnp: add skeleton
> 
> On 9/1/2023 3:30 AM, Wenbo Cao wrote:
> > Add Basic PMD library and doc build infrastructure Update maintainers
> > file to claim responsibility.
> >
> > Signed-off-by: Wenbo Cao <caowenbo@mucse.com>
> >
> 
> Hi Wenbo,
> 
> What is the status of the 'rnp' driver, v7 was expected but not received, will
> upstreaming continue for v24.03?
  
Ferruh Yigit April 2, 2024, 10:15 a.m. UTC | #5
On 3/29/2024 2:45 PM, 11 wrote:
> Hi Ferruh,
> 
> Thanks for your  reminder, I'm sorry for that I had been work on anothing before.
> Recendly, I have been reworked on this work. It will miss on release of v24.03.
> 
> For another thing, I'm always confused for the secondary process call like hw->mac_ops this function pointer.
> is this method can work normally on secondary process ?
> For example,ixgbe on secondary process call ixgbe_get_module_eeprom I fond that it  will cause process core-dump.
> because of secondary process use primary process function-point address.
> Is dpdk plaform  allowed user call the eth_dev_ops on secondary process?
> I don't find any limit and don't know wether or not to protect this function call work normally.
> My driver eth_dev_ops achieve will used some function-pointer, so I'm confued about this.
> Wish your kind guidance.
> 

Hi Wenbo,

"struct rte_eth_dev" is per process, not shared, so both primary and and
secondary has a copy of it.
And during driver initialization, 'eth_dev->dev_ops' is set, so both
primary and secondary processes has correct function pointers.
("struct rte_eth_dev_data" is shared, so any pointer withing that struct
should be in a shared memory between primary and secondaries.)

And there is no restriction for secondary process call 'eth_dev_ops' but
this call needs to be synchronized by application, since there is no
locking around those functions.
Common usecase is primary process runs the control path, uses
'eth_dev_ops' calls, and secondaries only does the datapath on specific
set of queues.


If you are referring to 'mac_ops', that is another layer of abstraction
some drivers use, but those should be tied to ethdev control path
functions eventually, so same rule for using ethdev control path applies
to them.

> 
> 
>> -----Original Message-----
>> From: Ferruh.Yigit@amd.com <Ferruh.Yigit@amd.com>
>> Sent: 2024年3月29日 19:28
>> To: Wenbo Cao <caowenbo@mucse.com>; Thomas Monjalon
>> <thomas@monjalon.net>
>> Cc: dev@dpdk.org; andrew.rybchenko@oktetlabs.ru; yaojun@mucse.com
>> Subject: Re: [PATCH v6 1/8] net/rnp: add skeleton
>>
>> On 9/1/2023 3:30 AM, Wenbo Cao wrote:
>>> Add Basic PMD library and doc build infrastructure Update maintainers
>>> file to claim responsibility.
>>>
>>> Signed-off-by: Wenbo Cao <caowenbo@mucse.com>
>>>
>>
>> Hi Wenbo,
>>
>> What is the status of the 'rnp' driver, v7 was expected but not received, will
>> upstreaming continue for v24.03?
> 
>
  

Patch

diff --git a/MAINTAINERS b/MAINTAINERS
index a5219926ab..29c130b280 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -955,6 +955,12 @@  F: drivers/net/qede/
 F: doc/guides/nics/qede.rst
 F: doc/guides/nics/features/qede*.ini
 
+Mucse rnp
+M: Wenbo Cao <caowenbo@mucse.com>
+F: drivers/net/rnp
+F: doc/guides/nics/rnp.rst
+F: doc/guides/nics/features/rnp.ini
+
 Solarflare sfc_efx
 M: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
 F: drivers/common/sfc_efx/
diff --git a/doc/guides/nics/features/rnp.ini b/doc/guides/nics/features/rnp.ini
new file mode 100644
index 0000000000..2ad04ee330
--- /dev/null
+++ b/doc/guides/nics/features/rnp.ini
@@ -0,0 +1,8 @@ 
+;
+; Supported features of the 'rnp' network poll mode driver.
+;
+; Refer to default.ini for the full list of available PMD features.
+;
+[Features]
+Linux                = Y
+x86-64               = Y
diff --git a/doc/guides/nics/index.rst b/doc/guides/nics/index.rst
index 5c9d1edf5e..cc89d3154a 100644
--- a/doc/guides/nics/index.rst
+++ b/doc/guides/nics/index.rst
@@ -61,6 +61,7 @@  Network Interface Controller Drivers
     pcap_ring
     pfe
     qede
+    rnp
     sfc_efx
     softnic
     tap
diff --git a/doc/guides/nics/rnp.rst b/doc/guides/nics/rnp.rst
new file mode 100644
index 0000000000..0eb8f2d415
--- /dev/null
+++ b/doc/guides/nics/rnp.rst
@@ -0,0 +1,38 @@ 
+..  SPADIX-License-Identifier: BSD-3-Clause
+    Copyright(c) 2023 Mucse IC Design Ltd.
+
+RNP Poll Mode driver
+====================
+
+The RNP ETHDEV PMD (**librte_net_rnp**) provides poll mode ethdev
+driver support for the inbuilt network device found in the **Mucse RNP**
+
+Prerequisites
+-------------
+More information can be found at `Mucse, Official Website
+<https://mucse.com/productDetail>`_.
+
+Supported Chipsets and NICs
+---------------------------
+
+- MUCSE Ethernet Controller N10 Series for 10GbE or 40GbE (Dual-port)
+
+Limitations or Known issues
+---------------------------
+
+Build with ICC is not supported yet.
+BSD are not supported yet.
+
+CRC stripping
+~~~~~~~~~~~~~
+
+The RNP Soc family Nic strip the CRC for every packets coming into the
+host interface irrespective of the offload configuration.
+When you want to disable CRC_OFFLOAD the operate will influence the rxCksum offload.
+
+VLAN Strip/Filter
+~~~~~~~~~~~~~~~~~
+
+For VLAN strip/filter, RNP just support vlan is CVLAN(0x8100).If the outvlan type is SVLAN(0X88a8)
+VLAN filter or strip will not effort for this packet.It will bypass filter to the host default queue,
+whatever the other filter rule is.
diff --git a/drivers/net/meson.build b/drivers/net/meson.build
index b1df17ce8c..f9e013d38e 100644
--- a/drivers/net/meson.build
+++ b/drivers/net/meson.build
@@ -54,6 +54,7 @@  drivers = [
         'pfe',
         'qede',
         'ring',
+        'rnp',
         'sfc',
         'softnic',
         'tap',
diff --git a/drivers/net/rnp/meson.build b/drivers/net/rnp/meson.build
new file mode 100644
index 0000000000..4f37c6b456
--- /dev/null
+++ b/drivers/net/rnp/meson.build
@@ -0,0 +1,11 @@ 
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(C) 2023 Mucse IC Design Ltd.
+#
+if not is_linux
+    build = false
+    reason = 'only supported on Linux'
+endif
+
+sources = files(
+		'rnp_ethdev.c',
+)
diff --git a/drivers/net/rnp/rnp_ethdev.c b/drivers/net/rnp/rnp_ethdev.c
new file mode 100644
index 0000000000..9ce3c0b497
--- /dev/null
+++ b/drivers/net/rnp/rnp_ethdev.c
@@ -0,0 +1,3 @@ 
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(C) 2023 Mucse IC Design Ltd.
+ */