From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Rastislav Cernay <cernay@netcope.com>, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v5] net/nfb: new netcope driver
Date: Thu, 28 Mar 2019 16:01:34 +0000 [thread overview]
Message-ID: <befd8c48-ef0b-31d0-7b46-d5af2b20af85@intel.com> (raw)
In-Reply-To: <1553256767-135084-1-git-send-email-cernay@netcope.com>
On 3/22/2019 12:12 PM, Rastislav Cernay wrote:
> From: Rastislav Cernay <cernay@netcope.com>
>
> Added new net driver for Netcope nfb cards
>
> Signed-off-by: Rastislav Cernay <cernay@netcope.com>
> ---
> 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 <https://www.netcope.com/en/company/community-support/dpdk-libsze2#NFB>`_.
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. <info@netcope.com>
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. <info@netcope.com>
> +# 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]'
next prev parent reply other threads:[~2019-03-28 16:01 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-26 12:57 [dpdk-dev] [PATCH] net/nfb: new Netcope driver Rastislav Cernay
2019-02-26 12:57 ` [dpdk-dev] [PATCH] net/nfb: new netcope driver Rastislav Cernay
2019-02-26 14:20 ` Rami Rosen
2019-02-26 16:33 ` Rastislav Černay
2019-02-26 15:46 ` Stephen Hemminger
2019-02-27 11:43 ` [dpdk-dev] [PATCH v2] net/nfb: new Netcope driver Rastislav Cernay
2019-02-27 15:28 ` Ferruh Yigit
2019-03-01 14:37 ` [dpdk-dev] [PATCH v3] net/nfb: new netcope driver Rastislav Cernay
2019-03-01 18:47 ` Stephen Hemminger
2019-03-04 14:07 ` Rastislav Černay
2019-03-01 18:50 ` Stephen Hemminger
2019-03-04 9:53 ` David Marchand
2019-03-04 11:34 ` David Marchand
2019-03-04 14:33 ` Rastislav Černay
2019-03-04 12:35 ` David Marchand
2019-03-04 12:48 ` David Marchand
2019-03-04 15:15 ` Rastislav Černay
2019-03-05 20:31 ` Rami Rosen
2019-03-05 22:41 ` Luca Boccassi
2019-03-06 14:51 ` Rastislav Černay
2019-03-06 13:25 ` Luca Boccassi
2019-03-07 13:24 ` [dpdk-dev] [PATCH v4] " Rastislav Cernay
2019-03-07 13:46 ` Luca Boccassi
2019-03-07 14:14 ` Jan Remeš
2019-03-22 12:12 ` [dpdk-dev] [PATCH v5] " Rastislav Cernay
2019-03-22 12:12 ` Rastislav Cernay
2019-03-28 16:01 ` Ferruh Yigit [this message]
2019-03-28 16:01 ` Ferruh Yigit
2019-04-01 14:55 ` Rastislav Černay
2019-04-01 14:22 ` Ferruh Yigit
2019-04-01 14:22 ` Ferruh Yigit
2019-04-02 16:05 ` Rastislav Černay
2019-04-02 16:05 ` Rastislav Černay
2019-04-01 14:23 ` Luca Boccassi
2019-04-01 14:23 ` Luca Boccassi
2019-04-01 14:55 ` Rastislav Černay
2019-04-04 9:05 ` [dpdk-dev] [PATCH v6] " Rastislav Cernay
2019-04-04 9:05 ` Rastislav Cernay
2019-04-05 0:08 ` Ferruh Yigit
2019-04-05 0:08 ` Ferruh Yigit
2019-04-07 15:03 ` [dpdk-dev] [PATCH v7] " Rastislav Cernay
2019-04-07 15:03 ` Rastislav Cernay
2019-04-12 12:15 ` Ferruh Yigit
2019-04-12 12:15 ` Ferruh Yigit
2019-04-12 12:16 ` Ferruh Yigit
2019-04-12 12:16 ` Ferruh Yigit
2019-04-12 14:37 ` [dpdk-dev] [PATCH] net/nfb: remove redundant linking Rastislav Cernay
2019-04-12 14:37 ` Rastislav Cernay
2019-04-12 15:02 ` Ferruh Yigit
2019-04-12 15:02 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=befd8c48-ef0b-31d0-7b46-d5af2b20af85@intel.com \
--to=ferruh.yigit@intel.com \
--cc=cernay@netcope.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).