From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id DDF75343C for ; Mon, 1 Apr 2019 16:22:50 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Apr 2019 07:22:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,296,1549958400"; d="scan'208";a="333946429" Received: from fyigit-mobl.ger.corp.intel.com (HELO [10.237.221.46]) ([10.237.221.46]) by fmsmga005.fm.intel.com with ESMTP; 01 Apr 2019 07:22:48 -0700 To: =?UTF-8?Q?Rastislav_=c4=8cernay?= Cc: dev , Luca Boccassi References: <1551185824-5501-2-git-send-email-cernay@netcope.com> <1553256767-135084-1-git-send-email-cernay@netcope.com> From: Ferruh Yigit Openpgp: preference=signencrypt Autocrypt: addr=ferruh.yigit@intel.com; prefer-encrypt=mutual; keydata= mQINBFXZCFABEADCujshBOAaqPZpwShdkzkyGpJ15lmxiSr3jVMqOtQS/sB3FYLT0/d3+bvy qbL9YnlbPyRvZfnP3pXiKwkRoR1RJwEo2BOf6hxdzTmLRtGtwWzI9MwrUPj6n/ldiD58VAGQ +iR1I/z9UBUN/ZMksElA2D7Jgg7vZ78iKwNnd+vLBD6I61kVrZ45Vjo3r+pPOByUBXOUlxp9 GWEKKIrJ4eogqkVNSixN16VYK7xR+5OUkBYUO+sE6etSxCr7BahMPKxH+XPlZZjKrxciaWQb +dElz3Ab4Opl+ZT/bK2huX+W+NJBEBVzjTkhjSTjcyRdxvS1gwWRuXqAml/sh+KQjPV1PPHF YK5LcqLkle+OKTCa82OvUb7cr+ALxATIZXQkgmn+zFT8UzSS3aiBBohg3BtbTIWy51jNlYdy ezUZ4UxKSsFuUTPt+JjHQBvF7WKbmNGS3fCid5Iag4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Or1NLvN5+kUBiEStHFxBpgSCvYY9sNV8FS6N24CAWMBl+10W+D 2h1yiiP5dOdPcBDYKsgqDD91/sP0WdyMJkwdQJtD49f9f+lYloxHnSAxMleOpyscg1pldw+i mPaUY1bmIknLhhkqfMmjywQOXpac5LRMibAAYkcB8v7y3kwELnt8mhqqZy6LUsqcWygNbH/W K3GGt5tRpeIXeJ25x8gg5EBQ0Jnvp/IbBYQfPLtXH0Myq2QuAhk/1q2yEIbVjS+7iowEZNyE 56K63WBJxsJPB2mvmLgn98GqB4G6GufP1ndS0XDti/2K0o8rep9xoY/JDGi0n0L0tk9BHyoP Y7kaEpu7UyY3nVdRLe5H1/MnFG8hdJ97WqnPS0buYZlrbTV0nRFL/NI2VABl18vEEXvNQiO+ vM8= Message-ID: Date: Mon, 1 Apr 2019 15:22:47 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v5] net/nfb: new netcope driver X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Apr 2019 14:22:51 -0000 On 4/1/2019 3:55 PM, Rastislav Černay wrote: > Hi Ferruh, > > I fixed most of issues you wrote, but before I send v6, I would like to make > sure everything is in order, mainly the experimental issue. > > I have a problem here, this requires 'netcope-common-6.4.0-1.x86_64.rpm' rpm to > be installed [1], meanwhile szedata requires > 'netcope-common-light-3.0.5-1.x86_64.rpm' to be installed, and these two > packages conflicts with eachother. > > What is the way of having an environment that dependencies of two netcope HW can > be provided at same time? This is really time consuming each time update system > for it. > > <...> > Sadly, szedata2 and nfb dirvers can not coexist in same enviroment. There is no > way to provide dependecies at same time. Isn't this also problem for you too? What is your solution when testing both? > > Is rpm only option, how people using Ubuntu for example will use your devices? > <...> > For now, yes, only option is rpm and support for Ubuntu will be added later. Is this limitation in driver document? If not can you please update it. > > > Why allow_experimental only in meson, but not Makefile? > <...> > It is in Makefile too. > CFLAGS += -DALLOW_EXPERIMENTAL_API > > Can you please add list of experimental APIs called just below this as comment? > <...> > No experimental API is called in driver. OK, so please clean the meson file. > > btw, why do you prefer to have driver as experimental? > What does it mean it being experimental from your point of view exactly? > <...> > I do not prefer to have driver experimental, only reason it is there is > this mail: > > Luca Boccassi bluca@debian.org > Tue, Mar 5, 11:41 PM > to me, dev > <...> >> diff --git a/drivers/net/nfb/rte_nfb_pmd_version.map >> b/drivers/net/nfb/rte_nfb_pmd_version.map >> new file mode 100644 >> index 0000000..97fd251 >> --- /dev/null >> +++ b/drivers/net/nfb/rte_nfb_pmd_version.map >> @@ -0,0 +1,4 @@ >> +DPDK_19.02 { >> + >> +        local: *; >> +}; > > These are all new symbols so they should be marked as experimental, > please see doc/guides/contributing/versioning.rst > > So after reading doc/guides/contributing/versioning.rst I thought that > all new drivers should be experimental as they are new before they stabilize, > and during this time changes can be done to public functions without much hassle. > Should I keep driver experimental? No please don't keep it experimental. Luca is right new symbols should be marked as experimental, here news symbols are APIs and this PMD doesn't have any, all it has is 'local' symbols. cc'ed Luca if I am missing anything. And if this is the only reason you documented the PMD as experimental, you can clean MAINTAINERS file, release notes etc... > > * > > *Rastislav Černay I /Software Developer/* > Netcope Technologies, a.s. > > *T:* +420 530 510 680 > *A:* Sochorova 3232/34, Brno, 616 00, Czech Republic > > *W: www.netcope.com > >  * > > * > ** > > > > On Thu, Mar 28, 2019 at 5:01 PM Ferruh Yigit > wrote: > > On 3/22/2019 12:12 PM, Rastislav Cernay wrote: > > From: Rastislav Cernay > > > > > Added new net driver for Netcope nfb cards > > > > Signed-off-by: Rastislav Cernay > > > --- > > v2: remove unnecessary cast > >     remove unnecessary zeroing > >     move declaration to not mix with code > >     restore skeleton example > > v3: add release notes > >     add doc to doc index > >     add architecture limits to doc > >     edit features list > >     add .map file > >     change link to dependecies to official vendor site > >     move declarations out of code > >     remove false comments (rte_errno is set) > >     comments to c89 style > >     remove log from main rx loop > >     remove redundant code > > v4: API is experimental > >     fixed meson build dependency > >     random initial MAC > >     stats->q_errors is for intput err only > >     move more declarations to a beginning > >     fixed err log in TX > >     use of pkg-config > > v5: fixed pkg-config for new version of netcope-common > >  MAINTAINERS                             |   7 + > >  config/common_base                      |   4 + > >  devtools/test-build.sh                  |   1 + > >  doc/guides/nics/features/nfb.ini        |  18 + > >  doc/guides/nics/index.rst               |   1 + > >  doc/guides/nics/nfb.rst                 | 143 +++++++ > >  doc/guides/rel_notes/release_19_02.rst  |   5 + > > Can you update the 19.05 release notes please? > > >  drivers/net/Makefile                    |   1 + > >  drivers/net/meson.build                 |   1 + > >  drivers/net/nfb/Makefile                |  44 +++ > >  drivers/net/nfb/meson.build             |  15 + > >  drivers/net/nfb/nfb.h                   |  50 +++ > >  drivers/net/nfb/nfb_ethdev.c            | 647 > ++++++++++++++++++++++++++++++++ > >  drivers/net/nfb/nfb_rx.c                | 127 +++++++ > >  drivers/net/nfb/nfb_rx.h                | 231 ++++++++++++ > >  drivers/net/nfb/nfb_rxmode.c            | 100 +++++ > >  drivers/net/nfb/nfb_rxmode.h            |  96 +++++ > >  drivers/net/nfb/nfb_stats.c             |  77 ++++ > >  drivers/net/nfb/nfb_stats.h             |  56 +++ > >  drivers/net/nfb/nfb_tx.c                | 113 ++++++ > >  drivers/net/nfb/nfb_tx.h                | 222 +++++++++++ > >  drivers/net/nfb/rte_nfb_pmd_version.map |   4 + > > The filename should be "rte_pmd_nfb_version.map" as stated in Makefile. > This brings the question, did you ever build dpdk as shared library or with > meson build system with this PMD enabled :) > Because it fails because of this wrong naming.. > > > Even after renaming the .map file, meson build fails, I haven't dig the problem, > can you please check it? > > <...> > > > @@ -360,6 +360,10 @@ CONFIG_RTE_LIBRTE_SFC_EFX_DEBUG=n > >  # Compile software PMD backed by SZEDATA2 device > >  # > >  CONFIG_RTE_LIBRTE_PMD_SZEDATA2=n > > +# > > +# Compile software PMD backed by NFB device > > +# > > +CONFIG_RTE_LIBRTE_PMD_NFB=n > > Can you please rename the config option to "CONFIG_RTE_LIBRTE_NFB_PMD"? > I guess unintentionally, there is an convension, > Physical PMDs have the config name: CONFIG_RTE_LIBRTE_.*_PMD > Virtual PMDs have the config name:  CONFIG_RTE_LIBRTE_PMD_.*=y > I perfer same syntax for all, but it is what it is now, and I believe it doesn't > worth the hassle of changing them. > > I think only 'SZEDATA2' breaks current login, and I guess you copied from it, > but let's start NFB according convention: CONFIG_RTE_LIBRTE_NFB_PMD > > > Also please leave a blank line between previous config block. > > <...> > > > +Prerequisites > > +------------- > > + > > +This PMD requires kernel modules which are responsible for initialization and > > +allocation of resources needed for nfb layer function. > > +Communication between PMD and kernel modules is mediated by libnfb library. > > +These kernel modules and library are not part of DPDK and must be installed > > +separately: > > + > > +*  **libnfb library** > > + > > +   The library provides API for initialization of nfb transfers, > receiving and > > +   transmitting data segments. > > + > > +*  **Kernel modules** > > + > > +   * nfb > > + > > +   Kernel modules manage initialization of hardware, allocation and > > +   sharing of resources for user space applications. > > + > > +Dependencies can be found here: > > +`Netcope common > `_. > > I have a problem here, this requires 'netcope-common-6.4.0-1.x86_64.rpm' rpm to > be installed [1], meanwhile szedata requires > 'netcope-common-light-3.0.5-1.x86_64.rpm' to be installed, and these two > packages conflicts with eachother. > > What is the way of having an environment that dependencies of two netcope HW can > be provided at same time? This is really time consuming each time update system > for it. > > [1] > Is rpm only option, how people using Ubuntu for example will use your devices? > > > + > > +Versions of the packages > > +~~~~~~~~~~~~~~~~~~~~~~~~ > > + > > +The minimum version of the provided packages: > > + > > +* for DPDK from 19.02 > > Is it 19.05 now? > > <...> > > > +Example output: > > + > > +.. code-block:: console > > + > > +   [...] > > +   EAL: PCI device 0000:06:00.0 on NUMA socket -1 > > +   EAL:   probe driver: 1b26:c1c1 net_nfb > > +   PMD: Initializing NFB device (0000:06:00.0) > > +   PMD: Available DMA queues RX: 8 TX: 8 > > +   PMD: NFB device (0000:06:00.0) successfully initialized > > +   Interactive-mode selected > > +   Auto-start selected > > +   Configuring Port 0 (socket 0) > > +   Port 0: 00:11:17:00:00:00 > > +   Checking link statuses... > > +   Port 0 Link Up - speed 10000 Mbps - full-duplex > > +   Done > > +   Start automatic packet forwarding > > +     io packet forwarding - CRC stripping disabled - packets/burst=32 > > +     nb forwarding cores=2 - nb forwarding ports=1 > > +     RX queues=2 - RX desc=128 - RX free threshold=0 > > +     RX threshold registers: pthresh=0 hthresh=0 wthresh=0 > > +     TX queues=2 - TX desc=512 - TX free threshold=0 > > +     TX threshold registers: pthresh=0 hthresh=0 wthresh=0 > > +     TX RS bit threshold=0 - TXQ flags=0x0 > > +   testpmd> > > I think testpmd logging is not like this any more, can you please update the app > log with latest code. > > <...> > > > @@ -0,0 +1,44 @@ > > +# SPDX-License-Identifier: BSD-3-Clause > > +# Copyright(c) 2018 Cesnet > > +# Copyright(c) 2018 Netcope Technologies, a.s. > > > Should year be 2019, or 2018-2019? > > > <...> > > > @@ -0,0 +1,15 @@ > > +# SPDX-License-Identifier: BSD-3-Clause > > +# Copyright(c) 2018 Cesnet > > +# Copyright(c) 2018 Netcope Technologies, a.s. > > > +# All rights reserved. > > + > > +dep = cc.find_library('nfb', required: false) > > + > > +build = dep.found() and cc.has_header('nfb/nfb.h', dependencies: dep) > > + > > +allow_experimental_apis = true > > Why allow_experimental only in meson, but not Makefile? > Can you please add list of experimental APIs called just below this as comment? > > <...> > > > +/** > > + * Default MAC addr > > + */ > > +static struct ether_addr eth_addr = { > > +     .addr_bytes = { 0x00, 0x11, 0x17, 0x00, 0x00, 0x00 } > > +}; > > it looks like this can be static const. > > > + > > +/** > > + * @warning > > + * @b EXPERIMENTAL: this API may change, or be removed, without prior notice > > + * > > Why these tags are added, to say PMD is experimental? > These only makes sense for public APIs which PMD doesn't have at all, these are > doxygen comments for API documentation. Please remove them. > > Also I recognized '__rte_experimental' tags, again which are for internal > checking and warning the applications if they are using experimental public API, > it doesn't apply here. Please remove them. > Last thing, the "EXPERIMENTAL" tag in .map file, that also doesn't apply here, > please make it release version, 'DPDK_19.05" > > I think your note about being experimental in MAINTAINERS file and the note in > release notes is good, > Can you please also update the driver documentation too, nfb.rst, to say driver > is experimental? I think those notes are good enough overall. > > > btw, why do you prefer to have driver as experimental? > What does it mean it being experimental from your point of view exactly? > > > <...> > > > +static int __rte_experimental > > +nfb_eth_mac_addr_set(struct rte_eth_dev *dev, > > +     struct ether_addr *mac_addr) > > +{ > > +     unsigned int i; > > +     unsigned long long mac = 0; > > Would you prefer to use a fixed length deceleration, uint64_t? > > > +     struct rte_eth_dev_data *data = dev->data; > > +     struct pmd_internals *internals = (struct pmd_internals *) > > +             data->dev_private; > > + > > +     if (!is_valid_assigned_ether_addr(mac_addr)) > > +             return -EINVAL; > > + > > +     for (i = 0; i < 6; i++) { > > Can you please use "ETHER_ADDR_LEN" instead of 6? > > <...> > > > +     for (i = 0; i < nb_rx; i++) { > > +             if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) { > > +                     stats->q_ipackets[i] = rx_queue[i].rx_pkts; > > +                     stats->q_ibytes[i] = rx_queue[i].rx_bytes; > > +             } > > +             rx_total += stats->q_ipackets[i]; > > +             rx_total_bytes += stats->q_ibytes[i]; > > Why these are not protected with "RTE_ETHDEV_QUEUE_STAT_CNTRS" check, > if "i >= RTE_ETHDEV_QUEUE_STAT_CNTRS" you shouldn't access to 'stats->q_.*[i]' > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 747F0A0679 for ; Mon, 1 Apr 2019 16:22:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 455483798; Mon, 1 Apr 2019 16:22:53 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id DDF75343C for ; Mon, 1 Apr 2019 16:22:50 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Apr 2019 07:22:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,296,1549958400"; d="scan'208";a="333946429" Received: from fyigit-mobl.ger.corp.intel.com (HELO [10.237.221.46]) ([10.237.221.46]) by fmsmga005.fm.intel.com with ESMTP; 01 Apr 2019 07:22:48 -0700 To: =?UTF-8?Q?Rastislav_=c4=8cernay?= Cc: dev , Luca Boccassi References: <1551185824-5501-2-git-send-email-cernay@netcope.com> <1553256767-135084-1-git-send-email-cernay@netcope.com> From: Ferruh Yigit Openpgp: preference=signencrypt Autocrypt: addr=ferruh.yigit@intel.com; prefer-encrypt=mutual; keydata= mQINBFXZCFABEADCujshBOAaqPZpwShdkzkyGpJ15lmxiSr3jVMqOtQS/sB3FYLT0/d3+bvy qbL9YnlbPyRvZfnP3pXiKwkRoR1RJwEo2BOf6hxdzTmLRtGtwWzI9MwrUPj6n/ldiD58VAGQ +iR1I/z9UBUN/ZMksElA2D7Jgg7vZ78iKwNnd+vLBD6I61kVrZ45Vjo3r+pPOByUBXOUlxp9 GWEKKIrJ4eogqkVNSixN16VYK7xR+5OUkBYUO+sE6etSxCr7BahMPKxH+XPlZZjKrxciaWQb +dElz3Ab4Opl+ZT/bK2huX+W+NJBEBVzjTkhjSTjcyRdxvS1gwWRuXqAml/sh+KQjPV1PPHF YK5LcqLkle+OKTCa82OvUb7cr+ALxATIZXQkgmn+zFT8UzSS3aiBBohg3BtbTIWy51jNlYdy ezUZ4UxKSsFuUTPt+JjHQBvF7WKbmNGS3fCid5Iag4tWOfZoqiCNzxApkVugltxoc6rG2TyX CmI2rP0mQ0GOsGXA3+3c1MCdQFzdIn/5tLBZyKy4F54UFo35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0WdyMJkwdQJtD49f9f+lYloxHnSAxMleOpyscg1pldw+i mPaUY1bmIknLhhkqfMmjywQOXpac5LRMibAAYkcB8v7y3kwELnt8mhqqZy6LUsqcWygNbH/W K3GGt5tRpeIXeJ25x8gg5EBQ0Jnvp/IbBYQfPLtXH0Myq2QuAhk/1q2yEIbVjS+7iowEZNyE 56K63WBJxsJPB2mvmLgn98GqB4G6GufP1ndS0XDti/2K0o8rep9xoY/JDGi0n0L0tk9BHyoP Y7kaEpu7UyY3nVdRLe5H1/MnFG8hdJ97WqnPS0buYZlrbTV0nRFL/NI2VABl18vEEXvNQiO+ vM8= Message-ID: Date: Mon, 1 Apr 2019 15:22:47 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v5] net/nfb: new netcope driver X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190401142247.e9O3z92KfBvH6Ot39WfKB3Le2DKGgd_Ed5xEYCYQ6u8@z> On 4/1/2019 3:55 PM, Rastislav Černay wrote: > Hi Ferruh, > > I fixed most of issues you wrote, but before I send v6, I would like to make > sure everything is in order, mainly the experimental issue. > > I have a problem here, this requires 'netcope-common-6.4.0-1.x86_64.rpm' rpm to > be installed [1], meanwhile szedata requires > 'netcope-common-light-3.0.5-1.x86_64.rpm' to be installed, and these two > packages conflicts with eachother. > > What is the way of having an environment that dependencies of two netcope HW can > be provided at same time? This is really time consuming each time update system > for it. > > <...> > Sadly, szedata2 and nfb dirvers can not coexist in same enviroment. There is no > way to provide dependecies at same time. Isn't this also problem for you too? What is your solution when testing both? > > Is rpm only option, how people using Ubuntu for example will use your devices? > <...> > For now, yes, only option is rpm and support for Ubuntu will be added later. Is this limitation in driver document? If not can you please update it. > > > Why allow_experimental only in meson, but not Makefile? > <...> > It is in Makefile too. > CFLAGS += -DALLOW_EXPERIMENTAL_API > > Can you please add list of experimental APIs called just below this as comment? > <...> > No experimental API is called in driver. OK, so please clean the meson file. > > btw, why do you prefer to have driver as experimental? > What does it mean it being experimental from your point of view exactly? > <...> > I do not prefer to have driver experimental, only reason it is there is > this mail: > > Luca Boccassi bluca@debian.org > Tue, Mar 5, 11:41 PM > to me, dev > <...> >> diff --git a/drivers/net/nfb/rte_nfb_pmd_version.map >> b/drivers/net/nfb/rte_nfb_pmd_version.map >> new file mode 100644 >> index 0000000..97fd251 >> --- /dev/null >> +++ b/drivers/net/nfb/rte_nfb_pmd_version.map >> @@ -0,0 +1,4 @@ >> +DPDK_19.02 { >> + >> +        local: *; >> +}; > > These are all new symbols so they should be marked as experimental, > please see doc/guides/contributing/versioning.rst > > So after reading doc/guides/contributing/versioning.rst I thought that > all new drivers should be experimental as they are new before they stabilize, > and during this time changes can be done to public functions without much hassle. > Should I keep driver experimental? No please don't keep it experimental. Luca is right new symbols should be marked as experimental, here news symbols are APIs and this PMD doesn't have any, all it has is 'local' symbols. cc'ed Luca if I am missing anything. And if this is the only reason you documented the PMD as experimental, you can clean MAINTAINERS file, release notes etc... > > * > > *Rastislav Černay I /Software Developer/* > Netcope Technologies, a.s. > > *T:* +420 530 510 680 > *A:* Sochorova 3232/34, Brno, 616 00, Czech Republic > > *W: www.netcope.com > >  * > > * > ** > > > > On Thu, Mar 28, 2019 at 5:01 PM Ferruh Yigit > wrote: > > On 3/22/2019 12:12 PM, Rastislav Cernay wrote: > > From: Rastislav Cernay > > > > > Added new net driver for Netcope nfb cards > > > > Signed-off-by: Rastislav Cernay > > > --- > > v2: remove unnecessary cast > >     remove unnecessary zeroing > >     move declaration to not mix with code > >     restore skeleton example > > v3: add release notes > >     add doc to doc index > >     add architecture limits to doc > >     edit features list > >     add .map file > >     change link to dependecies to official vendor site > >     move declarations out of code > >     remove false comments (rte_errno is set) > >     comments to c89 style > >     remove log from main rx loop > >     remove redundant code > > v4: API is experimental > >     fixed meson build dependency > >     random initial MAC > >     stats->q_errors is for intput err only > >     move more declarations to a beginning > >     fixed err log in TX > >     use of pkg-config > > v5: fixed pkg-config for new version of netcope-common > >  MAINTAINERS                             |   7 + > >  config/common_base                      |   4 + > >  devtools/test-build.sh                  |   1 + > >  doc/guides/nics/features/nfb.ini        |  18 + > >  doc/guides/nics/index.rst               |   1 + > >  doc/guides/nics/nfb.rst                 | 143 +++++++ > >  doc/guides/rel_notes/release_19_02.rst  |   5 + > > Can you update the 19.05 release notes please? > > >  drivers/net/Makefile                    |   1 + > >  drivers/net/meson.build                 |   1 + > >  drivers/net/nfb/Makefile                |  44 +++ > >  drivers/net/nfb/meson.build             |  15 + > >  drivers/net/nfb/nfb.h                   |  50 +++ > >  drivers/net/nfb/nfb_ethdev.c            | 647 > ++++++++++++++++++++++++++++++++ > >  drivers/net/nfb/nfb_rx.c                | 127 +++++++ > >  drivers/net/nfb/nfb_rx.h                | 231 ++++++++++++ > >  drivers/net/nfb/nfb_rxmode.c            | 100 +++++ > >  drivers/net/nfb/nfb_rxmode.h            |  96 +++++ > >  drivers/net/nfb/nfb_stats.c             |  77 ++++ > >  drivers/net/nfb/nfb_stats.h             |  56 +++ > >  drivers/net/nfb/nfb_tx.c                | 113 ++++++ > >  drivers/net/nfb/nfb_tx.h                | 222 +++++++++++ > >  drivers/net/nfb/rte_nfb_pmd_version.map |   4 + > > The filename should be "rte_pmd_nfb_version.map" as stated in Makefile. > This brings the question, did you ever build dpdk as shared library or with > meson build system with this PMD enabled :) > Because it fails because of this wrong naming.. > > > Even after renaming the .map file, meson build fails, I haven't dig the problem, > can you please check it? > > <...> > > > @@ -360,6 +360,10 @@ CONFIG_RTE_LIBRTE_SFC_EFX_DEBUG=n > >  # Compile software PMD backed by SZEDATA2 device > >  # > >  CONFIG_RTE_LIBRTE_PMD_SZEDATA2=n > > +# > > +# Compile software PMD backed by NFB device > > +# > > +CONFIG_RTE_LIBRTE_PMD_NFB=n > > Can you please rename the config option to "CONFIG_RTE_LIBRTE_NFB_PMD"? > I guess unintentionally, there is an convension, > Physical PMDs have the config name: CONFIG_RTE_LIBRTE_.*_PMD > Virtual PMDs have the config name:  CONFIG_RTE_LIBRTE_PMD_.*=y > I perfer same syntax for all, but it is what it is now, and I believe it doesn't > worth the hassle of changing them. > > I think only 'SZEDATA2' breaks current login, and I guess you copied from it, > but let's start NFB according convention: CONFIG_RTE_LIBRTE_NFB_PMD > > > Also please leave a blank line between previous config block. > > <...> > > > +Prerequisites > > +------------- > > + > > +This PMD requires kernel modules which are responsible for initialization and > > +allocation of resources needed for nfb layer function. > > +Communication between PMD and kernel modules is mediated by libnfb library. > > +These kernel modules and library are not part of DPDK and must be installed > > +separately: > > + > > +*  **libnfb library** > > + > > +   The library provides API for initialization of nfb transfers, > receiving and > > +   transmitting data segments. > > + > > +*  **Kernel modules** > > + > > +   * nfb > > + > > +   Kernel modules manage initialization of hardware, allocation and > > +   sharing of resources for user space applications. > > + > > +Dependencies can be found here: > > +`Netcope common > `_. > > I have a problem here, this requires 'netcope-common-6.4.0-1.x86_64.rpm' rpm to > be installed [1], meanwhile szedata requires > 'netcope-common-light-3.0.5-1.x86_64.rpm' to be installed, and these two > packages conflicts with eachother. > > What is the way of having an environment that dependencies of two netcope HW can > be provided at same time? This is really time consuming each time update system > for it. > > [1] > Is rpm only option, how people using Ubuntu for example will use your devices? > > > + > > +Versions of the packages > > +~~~~~~~~~~~~~~~~~~~~~~~~ > > + > > +The minimum version of the provided packages: > > + > > +* for DPDK from 19.02 > > Is it 19.05 now? > > <...> > > > +Example output: > > + > > +.. code-block:: console > > + > > +   [...] > > +   EAL: PCI device 0000:06:00.0 on NUMA socket -1 > > +   EAL:   probe driver: 1b26:c1c1 net_nfb > > +   PMD: Initializing NFB device (0000:06:00.0) > > +   PMD: Available DMA queues RX: 8 TX: 8 > > +   PMD: NFB device (0000:06:00.0) successfully initialized > > +   Interactive-mode selected > > +   Auto-start selected > > +   Configuring Port 0 (socket 0) > > +   Port 0: 00:11:17:00:00:00 > > +   Checking link statuses... > > +   Port 0 Link Up - speed 10000 Mbps - full-duplex > > +   Done > > +   Start automatic packet forwarding > > +     io packet forwarding - CRC stripping disabled - packets/burst=32 > > +     nb forwarding cores=2 - nb forwarding ports=1 > > +     RX queues=2 - RX desc=128 - RX free threshold=0 > > +     RX threshold registers: pthresh=0 hthresh=0 wthresh=0 > > +     TX queues=2 - TX desc=512 - TX free threshold=0 > > +     TX threshold registers: pthresh=0 hthresh=0 wthresh=0 > > +     TX RS bit threshold=0 - TXQ flags=0x0 > > +   testpmd> > > I think testpmd logging is not like this any more, can you please update the app > log with latest code. > > <...> > > > @@ -0,0 +1,44 @@ > > +# SPDX-License-Identifier: BSD-3-Clause > > +# Copyright(c) 2018 Cesnet > > +# Copyright(c) 2018 Netcope Technologies, a.s. > > > Should year be 2019, or 2018-2019? > > > <...> > > > @@ -0,0 +1,15 @@ > > +# SPDX-License-Identifier: BSD-3-Clause > > +# Copyright(c) 2018 Cesnet > > +# Copyright(c) 2018 Netcope Technologies, a.s. > > > +# All rights reserved. > > + > > +dep = cc.find_library('nfb', required: false) > > + > > +build = dep.found() and cc.has_header('nfb/nfb.h', dependencies: dep) > > + > > +allow_experimental_apis = true > > Why allow_experimental only in meson, but not Makefile? > Can you please add list of experimental APIs called just below this as comment? > > <...> > > > +/** > > + * Default MAC addr > > + */ > > +static struct ether_addr eth_addr = { > > +     .addr_bytes = { 0x00, 0x11, 0x17, 0x00, 0x00, 0x00 } > > +}; > > it looks like this can be static const. > > > + > > +/** > > + * @warning > > + * @b EXPERIMENTAL: this API may change, or be removed, without prior notice > > + * > > Why these tags are added, to say PMD is experimental? > These only makes sense for public APIs which PMD doesn't have at all, these are > doxygen comments for API documentation. Please remove them. > > Also I recognized '__rte_experimental' tags, again which are for internal > checking and warning the applications if they are using experimental public API, > it doesn't apply here. Please remove them. > Last thing, the "EXPERIMENTAL" tag in .map file, that also doesn't apply here, > please make it release version, 'DPDK_19.05" > > I think your note about being experimental in MAINTAINERS file and the note in > release notes is good, > Can you please also update the driver documentation too, nfb.rst, to say driver > is experimental? I think those notes are good enough overall. > > > btw, why do you prefer to have driver as experimental? > What does it mean it being experimental from your point of view exactly? > > > <...> > > > +static int __rte_experimental > > +nfb_eth_mac_addr_set(struct rte_eth_dev *dev, > > +     struct ether_addr *mac_addr) > > +{ > > +     unsigned int i; > > +     unsigned long long mac = 0; > > Would you prefer to use a fixed length deceleration, uint64_t? > > > +     struct rte_eth_dev_data *data = dev->data; > > +     struct pmd_internals *internals = (struct pmd_internals *) > > +             data->dev_private; > > + > > +     if (!is_valid_assigned_ether_addr(mac_addr)) > > +             return -EINVAL; > > + > > +     for (i = 0; i < 6; i++) { > > Can you please use "ETHER_ADDR_LEN" instead of 6? > > <...> > > > +     for (i = 0; i < nb_rx; i++) { > > +             if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) { > > +                     stats->q_ipackets[i] = rx_queue[i].rx_pkts; > > +                     stats->q_ibytes[i] = rx_queue[i].rx_bytes; > > +             } > > +             rx_total += stats->q_ipackets[i]; > > +             rx_total_bytes += stats->q_ibytes[i]; > > Why these are not protected with "RTE_ETHDEV_QUEUE_STAT_CNTRS" check, > if "i >= RTE_ETHDEV_QUEUE_STAT_CNTRS" you shouldn't access to 'stats->q_.*[i]' >