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

Message ID 20230807021615.3663034-2-caowenbo@mucse.com (mailing list archive)
State Superseded, 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 Aug. 7, 2023, 2:16 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          | 43 ++++++++++++++++++++++++++++++++
 drivers/net/meson.build          |  1 +
 drivers/net/rnp/meson.build      | 11 ++++++++
 drivers/net/rnp/rnp_ethdev.c     |  3 +++
 7 files changed, 73 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

Thomas Monjalon Aug. 15, 2023, 11:10 a.m. UTC | #1
Unaddressed
Hi,

Wenbo Cao:
> --- /dev/null
> +++ b/doc/guides/nics/rnp.rst
> @@ -0,0 +1,43 @@
> +..  SPDX-License-Identifier: BSD-3-Clause
> +    Copyright(c) 2023 Mucse IC Design Ltd.
> +
> +RNP Poll Mode driver
> +==========================

Please keep underlining the same size as the text above.

> +
> +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 RNP SoCs
> +------------------------
> +
> +- N10
> +
> +Driver compilation and testing
> +------------------------------
> +
> +Refer to the document :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
> +for details.

It was a mistake to originally introduce the anchor "pmd_build_and_test".
You should achieve the same result with the shorter syntax :doc:`build_and_test`

> +
> +#. Running testpmd:
> +
> +   Follow instructions available in the document
> +   :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
> +   to run testpmd.

Do we really need that referencing the same document as above?

> +
> +Limitations or Known issues
> +----------------------------
> +Build with ICC is not supported yet.
> +CRC stripping
> +~~~~~~~~~~~~~~
> +The RNP SoC family NICs strip the CRC for every packets coming into the
> +host interface irrespective of the offload configuration.
> +When You Want To Disable CRC_OFFLOAD The Feature Will Influence The RxCksum Offload
> +VLAN Strip
> +~~~~~~~~~~~
> +For VLAN Strip RNP Just Support CVLAN(0x8100) Type If The Vlan Type Is SVLAN(0X88a8)
> +VLAN Filter Or Strip Will Not Effert For This Packet It Will Bypass To The Host.

Please check the doc contribution guide.
You should add spaces before and after titles.
  
11 Aug. 21, 2023, 9:32 a.m. UTC | #2
Unaddressed
Hi Thomas,

Thanks for your useful advice, previously only focused on code format
and Ignored document format.

Regards Wenbo	

> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: 2023年8月15日 19:11
> To: Wenbo Cao <caowenbo@mucse.com>
> Cc: dev@dpdk.org; ferruh.yigit@amd.com; andrew.rybchenko@oktetlabs.ru;
> yaojun@mucse.com
> Subject: Re: [PATCH v5 1/8] net/rnp: add skeleton
> 
> Hi,
> 
> Wenbo Cao:
> > --- /dev/null
> > +++ b/doc/guides/nics/rnp.rst
> > @@ -0,0 +1,43 @@
> > +..  SPDX-License-Identifier: BSD-3-Clause
> > +    Copyright(c) 2023 Mucse IC Design Ltd.
> > +
> > +RNP Poll Mode driver
> > +==========================
> 
> Please keep underlining the same size as the text above.
Thanks for your kindly comment,  the format  of document  I must lake of
this knowledge
> 
> > +
> > +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 RNP SoCs
> > +------------------------
> > +
> > +- N10
> > +
> > +Driver compilation and testing
> > +------------------------------
> > +
> > +Refer to the document :ref:`compiling and testing a PMD for a NIC
> > +<pmd_build_and_test>` for details.
> 
> It was a mistake to originally introduce the anchor "pmd_build_and_test".
> You should achieve the same result with the shorter
> syntax :doc:`build_and_test`
> 
> > +
> > +#. Running testpmd:
> > +
> > +   Follow instructions available in the document
> > +   :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
> > +   to run testpmd.
> 
> Do we really need that referencing the same document as above?
For this block,  there's really no need to add this.
Previous ideas I want to add new content as the subsequent code is
submitted.
Do I need to add full features and NIC Description at the first code commit
?
> 
> > +
> > +Limitations or Known issues
> > +----------------------------
> > +Build with ICC is not supported yet.
> > +CRC stripping
> > +~~~~~~~~~~~~~~
> > +The RNP SoC family NICs strip the CRC for every packets coming into
> > +the host interface irrespective of the offload configuration.
> > +When You Want To Disable CRC_OFFLOAD The Feature Will Influence The
> > +RxCksum Offload VLAN Strip ~~~~~~~~~~~ For VLAN Strip RNP Just
> > +Support CVLAN(0x8100) Type If The Vlan Type Is SVLAN(0X88a8) VLAN
> > +Filter Or Strip Will Not Effert For This Packet It Will Bypass To The
Host.
> 
> Please check the doc contribution guide.
> You should add spaces before and after titles.
Yes this is my fault, :) , I have read the document  and  known that
Add 2 blank lines before each section header.
Add 1 blank line after each section header.
> 
>
  
Thomas Monjalon Aug. 30, 2023, 4:27 p.m. UTC | #3
Unaddressed
21/08/2023 11:32, 11:
> Hi Thomas,
> 
> Thanks for your useful advice, previously only focused on code format
> and Ignored document format.

no worries

> > > +#. Running testpmd:
> > > +
> > > +   Follow instructions available in the document
> > > +   :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
> > > +   to run testpmd.
> > 
> > Do we really need that referencing the same document as above?
> For this block,  there's really no need to add this.
> Previous ideas I want to add new content as the subsequent code is
> submitted.
> Do I need to add full features and NIC Description at the first code commit
> ?

The best is to introduce doc when code is added, in the same patch.
So no full features in the first patch :)
  

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..5b3a3d0483
--- /dev/null
+++ b/doc/guides/nics/rnp.rst
@@ -0,0 +1,43 @@ 
+..  SPDX-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 RNP SoCs
+------------------------
+
+- N10
+
+Driver compilation and testing
+------------------------------
+
+Refer to the document :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
+for details.
+
+#. Running testpmd:
+
+   Follow instructions available in the document
+   :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
+   to run testpmd.
+
+Limitations or Known issues
+----------------------------
+Build with ICC is not supported yet.
+CRC stripping
+~~~~~~~~~~~~~~
+The RNP SoC family NICs strip the CRC for every packets coming into the
+host interface irrespective of the offload configuration.
+When You Want To Disable CRC_OFFLOAD The Feature Will Influence The RxCksum Offload
+VLAN Strip
+~~~~~~~~~~~
+For VLAN Strip RNP Just Support CVLAN(0x8100) Type If The Vlan Type Is SVLAN(0X88a8)
+VLAN Filter Or Strip Will Not Effert For This Packet It Will Bypass To The Host.
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.
+ */