[v3,01/17] net/ionic: add skeleton

Message ID 20191209214656.27347-2-cardigliano@ntop.org (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series Introduces net/ionic PMD |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS

Commit Message

Alfredo Cardigliano Dec. 9, 2019, 9:46 p.m. UTC
  Add makefile and config file options to compile the Pensando ionic PMD.
Add feature and version map file.
Update maintainers file.

Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
---
 MAINTAINERS                                 |  6 ++++
 config/common_base                          |  5 +++
 doc/guides/nics/features/ionic.ini          |  8 +++++
 doc/guides/nics/index.rst                   |  1 +
 doc/guides/nics/ionic.rst                   | 37 ++++++++++++++++++++
 doc/guides/rel_notes/release_20_02.rst      |  4 +++
 drivers/net/Makefile                        |  1 +
 drivers/net/ionic/Makefile                  | 38 +++++++++++++++++++++
 drivers/net/ionic/meson.build               |  6 ++++
 drivers/net/ionic/rte_pmd_ionic_version.map |  5 +++
 mk/rte.app.mk                               |  1 +
 11 files changed, 112 insertions(+)
 create mode 100644 doc/guides/nics/features/ionic.ini
 create mode 100644 doc/guides/nics/ionic.rst
 create mode 100644 drivers/net/ionic/Makefile
 create mode 100644 drivers/net/ionic/meson.build
 create mode 100644 drivers/net/ionic/rte_pmd_ionic_version.map
  

Comments

Ferruh Yigit Dec. 10, 2019, 6:48 p.m. UTC | #1
On 12/9/2019 9:46 PM, Alfredo Cardigliano wrote:
> Add makefile and config file options to compile the Pensando ionic PMD.
> Add feature and version map file.
> Update maintainers file.
> 
> Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
> Reviewed-by: Shannon Nelson <snelson@pensando.io>

<...>

> @@ -277,6 +277,11 @@ CONFIG_RTE_LIBRTE_E1000_DEBUG_TX=n
>  CONFIG_RTE_LIBRTE_E1000_DEBUG_TX_FREE=n
>  CONFIG_RTE_LIBRTE_E1000_PF_DISABLE_STRIP_CRC=n
>  
> +#
> +# Compile Pensando IONIC PMD driver
> +#
> +CONFIG_RTE_LIBRTE_IONIC_PMD=y
> +

Is the driver supported by BSD platform or i686, arm, PPC architectures? If not
can you please disable the PMD on those config files?

<...>

> diff --git a/doc/guides/nics/ionic.rst b/doc/guides/nics/ionic.rst
> new file mode 100644
> index 000000000..41eac0f6b
> --- /dev/null
> +++ b/doc/guides/nics/ionic.rst
> @@ -0,0 +1,37 @@
> +..  SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
> +    Copyright(c) 2018-2019 Pensando Systems, Inc. All rights reserved.
> +
> +IONIC Driver
> +============
> +
> +The ionic driver provides support for Pensando server adapters.
> +Please visit https://pensando.io for more information about the
> +adapters.

Thanks for providing the company link, that was useful. But also can you please
provide a link that has the details of the device that 'ionic' driver is for.
I can see some documentation related to Naples DSC-xx devices but I assume they
are something else.
Btw, related to the HW you are providing the driver for, is it publicly
available now or are the documentation like specs/datasheets provided publicly?

<...>

> diff --git a/drivers/net/ionic/Makefile b/drivers/net/ionic/Makefile
> new file mode 100644
> index 000000000..d2c2b53b3
> --- /dev/null
> +++ b/drivers/net/ionic/Makefile
> @@ -0,0 +1,38 @@
> +# SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
> +# Copyright(c) 2018-2019 Pensando Systems, Inc. All rights reserved.
> +
> +include $(RTE_SDK)/mk/rte.vars.mk
> +
> +#
> +# library name
> +#
> +LIB = librte_pmd_ionic.a
> +
> +CFLAGS += -O3
> +CFLAGS += $(WERROR_FLAGS)
> +
> +EXPORT_MAP := rte_pmd_ionic_version.map
> +
> +ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
> +#
> +# CFLAGS for icc
> +#
> +
> +else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)
> +#
> +# CFLAGS for clang
> +#
> +
> +else
> +#
> +# CFLAGS for gcc
> +#
> +
> +endif

I would suggest only add these when you really have some CFLAGS to add.

> +
> +#
> +# all source are stored in SRCS-y
> +#
> +SRCS-$(CONFIG_RTE_LIBRTE_IONIC_PMD) +=

The SHARED library build is failing because of "undefined reference" to some
internal libraries.
You need to add "LDLIBS" as you use them in patches, same thing for meson.
  
Alfredo Cardigliano Dec. 12, 2019, 12:01 p.m. UTC | #2
> On 10 Dec 2019, at 19:48, Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> 
> On 12/9/2019 9:46 PM, Alfredo Cardigliano wrote:
>> Add makefile and config file options to compile the Pensando ionic PMD.
>> Add feature and version map file.
>> Update maintainers file.
>> 
>> Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
>> Reviewed-by: Shannon Nelson <snelson@pensando.io>
> 
> <...>
> 
>> @@ -277,6 +277,11 @@ CONFIG_RTE_LIBRTE_E1000_DEBUG_TX=n
>> CONFIG_RTE_LIBRTE_E1000_DEBUG_TX_FREE=n
>> CONFIG_RTE_LIBRTE_E1000_PF_DISABLE_STRIP_CRC=n
>> 
>> +#
>> +# Compile Pensando IONIC PMD driver
>> +#
>> +CONFIG_RTE_LIBRTE_IONIC_PMD=y
>> +
> 
> Is the driver supported by BSD platform or i686, arm, PPC architectures? If not
> can you please disable the PMD on those config files?

I guess setting ’n’ in defconfig_* will override common_base settings.
Is there any documentation that I can check for this? Thank you.

> <...>
> 
>> diff --git a/doc/guides/nics/ionic.rst b/doc/guides/nics/ionic.rst
>> new file mode 100644
>> index 000000000..41eac0f6b
>> --- /dev/null
>> +++ b/doc/guides/nics/ionic.rst
>> @@ -0,0 +1,37 @@
>> +..  SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
>> +    Copyright(c) 2018-2019 Pensando Systems, Inc. All rights reserved.
>> +
>> +IONIC Driver
>> +============
>> +
>> +The ionic driver provides support for Pensando server adapters.
>> +Please visit https://pensando.io for more information about the
>> +adapters.
> 
> Thanks for providing the company link, that was useful. But also can you please
> provide a link that has the details of the device that 'ionic' driver is for.
> I can see some documentation related to Naples DSC-xx devices but I assume they
> are something else.
> Btw, related to the HW you are providing the driver for, is it publicly
> available now or are the documentation like specs/datasheets provided publicly?

The website is fairly new and more docs will be available soon from https://pensando.io/platform
Product briefs are available at the moment from the same page, is it fine to link them?
https://pensando.io/assets/documents/Naples_100_ProductBrief-10-2019.pdf
https://pensando.io/assets/documents/Naples-25_ProductBrief_10-2019.pdf

> <...>
> 
>> diff --git a/drivers/net/ionic/Makefile b/drivers/net/ionic/Makefile
>> new file mode 100644
>> index 000000000..d2c2b53b3
>> --- /dev/null
>> +++ b/drivers/net/ionic/Makefile
>> @@ -0,0 +1,38 @@
>> +# SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
>> +# Copyright(c) 2018-2019 Pensando Systems, Inc. All rights reserved.
>> +
>> +include $(RTE_SDK)/mk/rte.vars.mk
>> +
>> +#
>> +# library name
>> +#
>> +LIB = librte_pmd_ionic.a
>> +
>> +CFLAGS += -O3
>> +CFLAGS += $(WERROR_FLAGS)
>> +
>> +EXPORT_MAP := rte_pmd_ionic_version.map
>> +
>> +ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
>> +#
>> +# CFLAGS for icc
>> +#
>> +
>> +else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)
>> +#
>> +# CFLAGS for clang
>> +#
>> +
>> +else
>> +#
>> +# CFLAGS for gcc
>> +#
>> +
>> +endif
> 
> I would suggest only add these when you really have some CFLAGS to add.
> 
>> +
>> +#
>> +# all source are stored in SRCS-y
>> +#
>> +SRCS-$(CONFIG_RTE_LIBRTE_IONIC_PMD) +=
> 
> The SHARED library build is failing because of "undefined reference" to some
> internal libraries.
> You need to add "LDLIBS" as you use them in patches, same thing for meson.

Thank you
Alfredo
  
Ferruh Yigit Dec. 12, 2019, 12:39 p.m. UTC | #3
On 12/12/2019 12:01 PM, Alfredo Cardigliano wrote:
> 
> 
>> On 10 Dec 2019, at 19:48, Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>>
>> On 12/9/2019 9:46 PM, Alfredo Cardigliano wrote:
>>> Add makefile and config file options to compile the Pensando ionic PMD.
>>> Add feature and version map file.
>>> Update maintainers file.
>>>
>>> Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
>>> Reviewed-by: Shannon Nelson <snelson@pensando.io>
>>
>> <...>
>>
>>> @@ -277,6 +277,11 @@ CONFIG_RTE_LIBRTE_E1000_DEBUG_TX=n
>>> CONFIG_RTE_LIBRTE_E1000_DEBUG_TX_FREE=n
>>> CONFIG_RTE_LIBRTE_E1000_PF_DISABLE_STRIP_CRC=n
>>>
>>> +#
>>> +# Compile Pensando IONIC PMD driver
>>> +#
>>> +CONFIG_RTE_LIBRTE_IONIC_PMD=y
>>> +
>>
>> Is the driver supported by BSD platform or i686, arm, PPC architectures? If not
>> can you please disable the PMD on those config files?
> 
> I guess setting ’n’ in defconfig_* will override common_base settings.

Yes, that should be enough.
It is hierarchical and child overwrites parent's values.

> Is there any documentation that I can check for this? Thank you.
> 
>> <...>
>>
>>> diff --git a/doc/guides/nics/ionic.rst b/doc/guides/nics/ionic.rst
>>> new file mode 100644
>>> index 000000000..41eac0f6b
>>> --- /dev/null
>>> +++ b/doc/guides/nics/ionic.rst
>>> @@ -0,0 +1,37 @@
>>> +..  SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
>>> +    Copyright(c) 2018-2019 Pensando Systems, Inc. All rights reserved.
>>> +
>>> +IONIC Driver
>>> +============
>>> +
>>> +The ionic driver provides support for Pensando server adapters.
>>> +Please visit https://pensando.io for more information about the
>>> +adapters.
>>
>> Thanks for providing the company link, that was useful. But also can you please
>> provide a link that has the details of the device that 'ionic' driver is for.
>> I can see some documentation related to Naples DSC-xx devices but I assume they
>> are something else.
>> Btw, related to the HW you are providing the driver for, is it publicly
>> available now or are the documentation like specs/datasheets provided publicly?
> 
> The website is fairly new and more docs will be available soon from https://pensando.io/platform
> Product briefs are available at the moment from the same page, is it fine to link them?
> https://pensando.io/assets/documents/Naples_100_ProductBrief-10-2019.pdf
> https://pensando.io/assets/documents/Naples-25_ProductBrief_10-2019.pdf

Is the device this driver for "naples"? It wasn't clear to me. If it is, yes
please share their link in doc.
  
Alfredo Cardigliano Dec. 12, 2019, 2:09 p.m. UTC | #4
> On 12 Dec 2019, at 13:39, Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> 
> On 12/12/2019 12:01 PM, Alfredo Cardigliano wrote:
>> 
>> 
>>> On 10 Dec 2019, at 19:48, Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>>> 
>>> On 12/9/2019 9:46 PM, Alfredo Cardigliano wrote:
>>>> Add makefile and config file options to compile the Pensando ionic PMD.
>>>> Add feature and version map file.
>>>> Update maintainers file.
>>>> 
>>>> Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
>>>> Reviewed-by: Shannon Nelson <snelson@pensando.io>
>>> 
>>> <...>
>>> 
>>>> @@ -277,6 +277,11 @@ CONFIG_RTE_LIBRTE_E1000_DEBUG_TX=n
>>>> CONFIG_RTE_LIBRTE_E1000_DEBUG_TX_FREE=n
>>>> CONFIG_RTE_LIBRTE_E1000_PF_DISABLE_STRIP_CRC=n
>>>> 
>>>> +#
>>>> +# Compile Pensando IONIC PMD driver
>>>> +#
>>>> +CONFIG_RTE_LIBRTE_IONIC_PMD=y
>>>> +
>>> 
>>> Is the driver supported by BSD platform or i686, arm, PPC architectures? If not
>>> can you please disable the PMD on those config files?
>> 
>> I guess setting ’n’ in defconfig_* will override common_base settings.
> 
> Yes, that should be enough.
> It is hierarchical and child overwrites parent's values.
> 
>> Is there any documentation that I can check for this? Thank you.
>> 
>>> <...>
>>> 
>>>> diff --git a/doc/guides/nics/ionic.rst b/doc/guides/nics/ionic.rst
>>>> new file mode 100644
>>>> index 000000000..41eac0f6b
>>>> --- /dev/null
>>>> +++ b/doc/guides/nics/ionic.rst
>>>> @@ -0,0 +1,37 @@
>>>> +..  SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
>>>> +    Copyright(c) 2018-2019 Pensando Systems, Inc. All rights reserved.
>>>> +
>>>> +IONIC Driver
>>>> +============
>>>> +
>>>> +The ionic driver provides support for Pensando server adapters.
>>>> +Please visit https://pensando.io for more information about the
>>>> +adapters.
>>> 
>>> Thanks for providing the company link, that was useful. But also can you please
>>> provide a link that has the details of the device that 'ionic' driver is for.
>>> I can see some documentation related to Naples DSC-xx devices but I assume they
>>> are something else.
>>> Btw, related to the HW you are providing the driver for, is it publicly
>>> available now or are the documentation like specs/datasheets provided publicly?
>> 
>> The website is fairly new and more docs will be available soon from https://pensando.io/platform
>> Product briefs are available at the moment from the same page, is it fine to link them?
>> https://pensando.io/assets/documents/Naples_100_ProductBrief-10-2019.pdf
>> https://pensando.io/assets/documents/Naples-25_ProductBrief_10-2019.pdf
> 
> Is the device this driver for "naples"? It wasn't clear to me. If it is, yes
> please share their link in doc.

Yes, Naples

Alfredo
  

Patch

diff --git a/MAINTAINERS b/MAINTAINERS
index 4395d8df1..bb4422344 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -810,6 +810,12 @@  F: doc/guides/nics/pfe.rst
 F: drivers/net/pfe/
 F: doc/guides/nics/features/pfe.ini
 
+Pensando ionic
+M: Alfredo Cardigliano <cardigliano@ntop.org>
+F: drivers/net/ionic/
+F: doc/guides/nics/ionic.rst
+F: doc/guides/nics/features/ionic.ini
+
 QLogic bnx2x
 M: Rasesh Mody <rmody@marvell.com>
 M: Shahed Shaikh <shshaikh@marvell.com>
diff --git a/config/common_base b/config/common_base
index 7dec7ed45..626c83d05 100644
--- a/config/common_base
+++ b/config/common_base
@@ -277,6 +277,11 @@  CONFIG_RTE_LIBRTE_E1000_DEBUG_TX=n
 CONFIG_RTE_LIBRTE_E1000_DEBUG_TX_FREE=n
 CONFIG_RTE_LIBRTE_E1000_PF_DISABLE_STRIP_CRC=n
 
+#
+# Compile Pensando IONIC PMD driver
+#
+CONFIG_RTE_LIBRTE_IONIC_PMD=y
+
 #
 # Compile burst-oriented HINIC PMD driver
 #
diff --git a/doc/guides/nics/features/ionic.ini b/doc/guides/nics/features/ionic.ini
new file mode 100644
index 000000000..3a92eedc7
--- /dev/null
+++ b/doc/guides/nics/features/ionic.ini
@@ -0,0 +1,8 @@ 
+;
+; Supported features of the 'ionic' network poll mode driver.
+;
+; Refer to default.ini for the full list of available PMD features.
+;
+[Features]
+x86-64               = Y
+Usage doc            = Y
diff --git a/doc/guides/nics/index.rst b/doc/guides/nics/index.rst
index d61c27fdf..7b5fea029 100644
--- a/doc/guides/nics/index.rst
+++ b/doc/guides/nics/index.rst
@@ -33,6 +33,7 @@  Network Interface Controller Drivers
     ice
     ifc
     igb
+    ionic
     ipn3ke
     ixgbe
     intel_vf
diff --git a/doc/guides/nics/ionic.rst b/doc/guides/nics/ionic.rst
new file mode 100644
index 000000000..41eac0f6b
--- /dev/null
+++ b/doc/guides/nics/ionic.rst
@@ -0,0 +1,37 @@ 
+..  SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
+    Copyright(c) 2018-2019 Pensando Systems, Inc. All rights reserved.
+
+IONIC Driver
+============
+
+The ionic driver provides support for Pensando server adapters.
+Please visit https://pensando.io for more information about the
+adapters.
+
+Identifying the Adapter
+-----------------------
+
+To find if one or more Pensando PCI Ethernet devices are installed
+on the host, check for the PCI devices:
+
+   .. code-block:: console
+
+      lspci -d 1dd8:
+      b5:00.0 Ethernet controller: Device 1dd8:1002
+      b6:00.0 Ethernet controller: Device 1dd8:1002
+
+Pre-Installation Configuration
+------------------------------
+
+The following options can be modified in the ``config`` file.
+
+- ``CONFIG_RTE_LIBRTE_IONIC_PMD`` (default ``y``)
+
+  Toggle compilation of ionic PMD.
+
+Building DPDK
+-------------
+
+The ionic PMD driver supports UIO and VFIO, please refer to the
+:ref:`DPDK documentation that comes with the DPDK suite <linux_gsg>`
+for instructions on how to build DPDK.
diff --git a/doc/guides/rel_notes/release_20_02.rst b/doc/guides/rel_notes/release_20_02.rst
index 0eaa45a76..133c34e50 100644
--- a/doc/guides/rel_notes/release_20_02.rst
+++ b/doc/guides/rel_notes/release_20_02.rst
@@ -56,6 +56,10 @@  New Features
      Also, make sure to start the actual text at the margin.
      =========================================================
 
+* **Added IONIC net PMD.**
+
+  Added the new ``ionic`` net driver for Pensando Ethernet Network Adapters.
+  See the :doc:`../nics/ionic` NIC guide for more details on this new driver.
 
 Removed Items
 -------------
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index cee30367a..63a52ee79 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -34,6 +34,7 @@  DIRS-$(CONFIG_RTE_LIBRTE_HNS3_PMD) += hns3
 DIRS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e
 DIRS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf
 DIRS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice
+DIRS-$(CONFIG_RTE_LIBRTE_IONIC_PMD) += ionic
 DIRS-$(CONFIG_RTE_LIBRTE_IPN3KE_PMD) += ipn3ke
 DIRS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += ixgbe
 DIRS-$(CONFIG_RTE_LIBRTE_LIO_PMD) += liquidio
diff --git a/drivers/net/ionic/Makefile b/drivers/net/ionic/Makefile
new file mode 100644
index 000000000..d2c2b53b3
--- /dev/null
+++ b/drivers/net/ionic/Makefile
@@ -0,0 +1,38 @@ 
+# SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
+# Copyright(c) 2018-2019 Pensando Systems, Inc. All rights reserved.
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+#
+# library name
+#
+LIB = librte_pmd_ionic.a
+
+CFLAGS += -O3
+CFLAGS += $(WERROR_FLAGS)
+
+EXPORT_MAP := rte_pmd_ionic_version.map
+
+ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
+#
+# CFLAGS for icc
+#
+
+else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)
+#
+# CFLAGS for clang
+#
+
+else
+#
+# CFLAGS for gcc
+#
+
+endif
+
+#
+# all source are stored in SRCS-y
+#
+SRCS-$(CONFIG_RTE_LIBRTE_IONIC_PMD) +=
+
+include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/drivers/net/ionic/meson.build b/drivers/net/ionic/meson.build
new file mode 100644
index 000000000..5386e23ca
--- /dev/null
+++ b/drivers/net/ionic/meson.build
@@ -0,0 +1,6 @@ 
+# SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
+# Copyright(c) 2019 Pensando
+
+sources = files(
+)
+
diff --git a/drivers/net/ionic/rte_pmd_ionic_version.map b/drivers/net/ionic/rte_pmd_ionic_version.map
new file mode 100644
index 000000000..3fb4ff7eb
--- /dev/null
+++ b/drivers/net/ionic/rte_pmd_ionic_version.map
@@ -0,0 +1,5 @@ 
+DPDK_20.0 {
+
+	local: *;
+};
+
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 05ea034b9..57f5f77de 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -183,6 +183,7 @@  _LDLIBS-$(CONFIG_RTE_LIBRTE_HNS3_PMD)       += -lrte_pmd_hns3
 _LDLIBS-$(CONFIG_RTE_LIBRTE_I40E_PMD)       += -lrte_pmd_i40e
 _LDLIBS-$(CONFIG_RTE_LIBRTE_IAVF_PMD)       += -lrte_pmd_iavf
 _LDLIBS-$(CONFIG_RTE_LIBRTE_ICE_PMD)        += -lrte_pmd_ice
+_LDLIBS-$(CONFIG_RTE_LIBRTE_IONIC_PMD)      += -lrte_pmd_ionic
 _LDLIBS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD)      += -lrte_pmd_ixgbe
 ifeq ($(CONFIG_RTE_LIBRTE_KNI),y)
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_KNI)        += -lrte_pmd_kni