[v6,01/19] net/ngbe: add build and doc infrastructure
Checks
Commit Message
Adding bare minimum PMD library and doc build infrastructure
and claim the maintainership for ngbe PMD.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
MAINTAINERS | 6 +++++
doc/guides/nics/features/ngbe.ini | 10 +++++++++
doc/guides/nics/index.rst | 1 +
doc/guides/nics/ngbe.rst | 31 ++++++++++++++++++++++++++
doc/guides/rel_notes/release_21_08.rst | 6 +++++
drivers/net/meson.build | 1 +
drivers/net/ngbe/meson.build | 12 ++++++++++
drivers/net/ngbe/ngbe_ethdev.c | 29 ++++++++++++++++++++++++
drivers/net/ngbe/version.map | 3 +++
9 files changed, 99 insertions(+)
create mode 100644 doc/guides/nics/features/ngbe.ini
create mode 100644 doc/guides/nics/ngbe.rst
create mode 100644 drivers/net/ngbe/meson.build
create mode 100644 drivers/net/ngbe/ngbe_ethdev.c
create mode 100644 drivers/net/ngbe/version.map
Comments
On 6/17/21 1:59 PM, Jiawen Wu wrote:
> Adding bare minimum PMD library and doc build infrastructure
> and claim the maintainership for ngbe PMD.
>
> Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Just one nit below.
[snip]
> diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
> new file mode 100644
> index 0000000000..f8e19066de
> --- /dev/null
> +++ b/drivers/net/ngbe/ngbe_ethdev.c
> @@ -0,0 +1,29 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(c) 2018-2020 Beijing WangXun Technology Co., Ltd.
> + * Copyright(c) 2010-2017 Intel Corporation
> + */
> +
> +#include <errno.h>
> +#include <rte_common.h>
> +#include <ethdev_pci.h>
> +
> +static int
> +eth_ngbe_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
> + struct rte_pci_device *pci_dev)
> +{
> + RTE_SET_USED(pci_dev);
> + return -EINVAL;
> +}
> +
> +static int eth_ngbe_pci_remove(struct rte_pci_device *pci_dev)
> +{
> + RTE_SET_USED(pci_dev);
> + return -EINVAL;
> +}
Why is different style of unused suppression is used
above: __rte_unused vs RTE_SET_USED'?
[snip]
On July 2, 2021 9:08 PM, Andrew Rybchenko wrote:
> On 6/17/21 1:59 PM, Jiawen Wu wrote:
> > Adding bare minimum PMD library and doc build infrastructure and claim
> > the maintainership for ngbe PMD.
> >
> > Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
>
> Just one nit below.
>
> [snip]
>
> > diff --git a/drivers/net/ngbe/ngbe_ethdev.c
> > b/drivers/net/ngbe/ngbe_ethdev.c new file mode 100644 index
> > 0000000000..f8e19066de
> > --- /dev/null
> > +++ b/drivers/net/ngbe/ngbe_ethdev.c
> > @@ -0,0 +1,29 @@
> > +/* SPDX-License-Identifier: BSD-3-Clause
> > + * Copyright(c) 2018-2020 Beijing WangXun Technology Co., Ltd.
> > + * Copyright(c) 2010-2017 Intel Corporation */
> > +
> > +#include <errno.h>
> > +#include <rte_common.h>
> > +#include <ethdev_pci.h>
> > +
> > +static int
> > +eth_ngbe_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
> > + struct rte_pci_device *pci_dev)
> > +{
> > + RTE_SET_USED(pci_dev);
> > + return -EINVAL;
> > +}
> > +
> > +static int eth_ngbe_pci_remove(struct rte_pci_device *pci_dev) {
> > + RTE_SET_USED(pci_dev);
> > + return -EINVAL;
> > +}
>
> Why is different style of unused suppression is used
> above: __rte_unused vs RTE_SET_USED'?
>
> [snip]
I guess, 'pci_drv' will not be used in future implement the probe function.
So I just gave '__rte_unused' when I separated the patches.
Does this have to be corrected?
On 7/5/21 5:52 AM, Jiawen Wu wrote:
> On July 2, 2021 9:08 PM, Andrew Rybchenko wrote:
>> On 6/17/21 1:59 PM, Jiawen Wu wrote:
>>> Adding bare minimum PMD library and doc build infrastructure and claim
>>> the maintainership for ngbe PMD.
>>>
>>> Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
>>
>> Just one nit below.
>>
>> [snip]
>>
>>> diff --git a/drivers/net/ngbe/ngbe_ethdev.c
>>> b/drivers/net/ngbe/ngbe_ethdev.c new file mode 100644 index
>>> 0000000000..f8e19066de
>>> --- /dev/null
>>> +++ b/drivers/net/ngbe/ngbe_ethdev.c
>>> @@ -0,0 +1,29 @@
>>> +/* SPDX-License-Identifier: BSD-3-Clause
>>> + * Copyright(c) 2018-2020 Beijing WangXun Technology Co., Ltd.
>>> + * Copyright(c) 2010-2017 Intel Corporation */
>>> +
>>> +#include <errno.h>
>>> +#include <rte_common.h>
>>> +#include <ethdev_pci.h>
>>> +
>>> +static int
>>> +eth_ngbe_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
>>> + struct rte_pci_device *pci_dev)
>>> +{
>>> + RTE_SET_USED(pci_dev);
>>> + return -EINVAL;
>>> +}
>>> +
>>> +static int eth_ngbe_pci_remove(struct rte_pci_device *pci_dev) {
>>> + RTE_SET_USED(pci_dev);
>>> + return -EINVAL;
>>> +}
>>
>> Why is different style of unused suppression is used
>> above: __rte_unused vs RTE_SET_USED'?
>>
>> [snip]
>
> I guess, 'pci_drv' will not be used in future implement the probe function.
> So I just gave '__rte_unused' when I separated the patches.
> Does this have to be corrected?
You never know. So, it is better to be consistent. Yes, please.
@@ -896,6 +896,12 @@ F: drivers/net/sfc/
F: doc/guides/nics/sfc_efx.rst
F: doc/guides/nics/features/sfc.ini
+Wangxun ngbe
+M: Jiawen Wu <jiawenwu@trustnetic.com>
+F: drivers/net/ngbe/
+F: doc/guides/nics/ngbe.rst
+F: doc/guides/nics/features/ngbe.ini
+
Wangxun txgbe
M: Jiawen Wu <jiawenwu@trustnetic.com>
M: Jian Wang <jianwang@trustnetic.com>
new file mode 100644
@@ -0,0 +1,10 @@
+;
+; Supported features of the 'ngbe' network poll mode driver.
+;
+; Refer to default.ini for the full list of available PMD features.
+;
+[Features]
+Linux = Y
+ARMv8 = Y
+x86-32 = Y
+x86-64 = Y
@@ -47,6 +47,7 @@ Network Interface Controller Drivers
netvsc
nfb
nfp
+ ngbe
null
octeontx
octeontx2
new file mode 100644
@@ -0,0 +1,31 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright(c) 2018-2020 Beijing WangXun Technology Co., Ltd.
+
+NGBE Poll Mode Driver
+======================
+
+The NGBE PMD (librte_pmd_ngbe) provides poll mode driver support
+for Wangxun 1 Gigabit Ethernet NICs.
+
+
+Prerequisites
+-------------
+
+- Learning about Wangxun 1 Gigabit Ethernet NICs using
+ `<https://www.net-swift.com/a/386.html>`_.
+
+- Follow the DPDK :ref:`Getting Started Guide for Linux <linux_gsg>` to setup the basic DPDK environment.
+
+
+Driver compilation and testing
+------------------------------
+
+Refer to the document :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
+for details.
+
+
+Limitations or Known issues
+---------------------------
+
+Build with ICC is not supported yet.
+Power8, ARMv7 and BSD are not supported yet.
@@ -55,6 +55,12 @@ New Features
Also, make sure to start the actual text at the margin.
=======================================================
+* **Added Wangxun ngbe PMD.**
+
+ Added a new PMD driver for Wangxun 1 Gigabit Ethernet NICs.
+
+ See the :doc:`../nics/ngbe` for more details.
+
Removed Items
-------------
@@ -40,6 +40,7 @@ drivers = [
'netvsc',
'nfb',
'nfp',
+ 'ngbe',
'null',
'octeontx',
'octeontx2',
new file mode 100644
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018-2020 Beijing WangXun Technology Co., Ltd.
+
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
+sources = files(
+ 'ngbe_ethdev.c',
+)
new file mode 100644
@@ -0,0 +1,29 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2018-2020 Beijing WangXun Technology Co., Ltd.
+ * Copyright(c) 2010-2017 Intel Corporation
+ */
+
+#include <errno.h>
+#include <rte_common.h>
+#include <ethdev_pci.h>
+
+static int
+eth_ngbe_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
+ struct rte_pci_device *pci_dev)
+{
+ RTE_SET_USED(pci_dev);
+ return -EINVAL;
+}
+
+static int eth_ngbe_pci_remove(struct rte_pci_device *pci_dev)
+{
+ RTE_SET_USED(pci_dev);
+ return -EINVAL;
+}
+
+static struct rte_pci_driver rte_ngbe_pmd = {
+ .probe = eth_ngbe_pci_probe,
+ .remove = eth_ngbe_pci_remove,
+};
+
+RTE_PMD_REGISTER_PCI(net_ngbe, rte_ngbe_pmd);
new file mode 100644
@@ -0,0 +1,3 @@
+DPDK_21 {
+ local: *;
+};