Re: [dpdk-dev] [PATCH v4 2/4] drivers/bus: move driver assignment to end of probing
Hi Andrew, On Fri, Oct 12, 2018 at 9:45 AM Andrew Rybchenko wrote: > > Hi, Thomas, > > On 10/12/18 12:02 AM, Thomas Monjalon wrote: > > The PCI mapping requires to know the PCI driver to use, > > even before the probing is done. That's why the PCI driver is > > referenced early inside the PCI device structure. See > > commit 1d20a073fa5e ("bus/pci: reference driver structure before mapping") > > > > However the rte_driver does not need to be referenced in rte_device > > before the device probing is done. > > By moving back this assignment at the end of the device probing, > > it becomes possible to make clear the status of a rte_device. > > > > Signed-off-by: Thomas Monjalon > > Reviewed-by: Andrew Rybchenko > > Have you seen driver->name usage in drivers/net/szedata2/rte_eth_szedata2.c > rte_szedata2_eth_dev_init() which is used from probe? > for szedata2, this is easily fixed by using the driver name directly from the #define above. diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c index 8f92e72..4e5e01c 100644 --- a/drivers/net/szedata2/rte_eth_szedata2.c +++ b/drivers/net/szedata2/rte_eth_szedata2.c @@ -1474,7 +1474,7 @@ struct szedata2_tx_queue { PMD_INIT_FUNC_TRACE(); PMD_INIT_LOG(INFO, "Initializing eth_dev %s (driver %s)", data->name, - dev->device->driver->name); + RTE_STR(RTE_SZEDATA2_DRIVER_NAME)); /* Fill internal private structure. */ internals->dev = dev; @@ -1525,7 +1525,7 @@ struct szedata2_tx_queue { ether_addr_copy(ð_addr, data->mac_addrs); PMD_INIT_LOG(INFO, "%s device %s successfully initialized", - dev->device->driver->name, data->name); + RTE_STR(RTE_SZEDATA2_DRIVER_NAME), data->name); return 0; } @@ -1547,7 +1547,7 @@ struct szedata2_tx_queue { rte_free(dev->data->mac_addrs); PMD_DRV_LOG(INFO, "%s device %s successfully uninitialized", - dev->device->driver->name, dev->data->name); + RTE_STR(RTE_SZEDATA2_DRIVER_NAME), dev->data->name); return 0; } > It looks like drivers/net/mlx5/mlx5.c > mlx5_pci_probe()->mlx5_dev_spawn()->mlx5_dev_to_port_id() goes > to device->driver. Is the code OK with the move? > > I've added above drivers maintainers in CC. Jan
Re: [dpdk-dev] [PATCH] maintainers: update for szedata2 PMD
On Tue, Jul 17, 2018 at 3:52 PM, Matej Vido wrote: > > I will no longer be maintaining szedata2 PMD. Jan will take over this > role. > > Signed-off-by: Matej Vido > --- > MAINTAINERS | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 227e32c..43b0a3e 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -617,7 +617,7 @@ F: doc/guides/nics/netvsc.rst > F: doc/guides/nics/features/netvsc.ini > > Netcope szedata2 > -M: Matej Vido > +M: Jan Remes > F: drivers/net/szedata2/ > F: doc/guides/nics/szedata2.rst > F: doc/guides/nics/features/szedata2.ini > -- > 2.7.4 > Acked-by: Jan Remes
Re: [dpdk-dev] [PATCH v2] ethdev: make default behavior CRC strip on Rx
For szedata2: Acked-by: Jan Remes Thanks, Jan > --- a/drivers/net/szedata2/rte_eth_szedata2.c > +++ b/drivers/net/szedata2/rte_eth_szedata2.c > @@ -1056,8 +1056,7 @@ eth_dev_info(struct rte_eth_dev *dev, > dev_info->max_rx_queues = internals->max_rx_queues; > dev_info->max_tx_queues = internals->max_tx_queues; > dev_info->min_rx_bufsize = 0; > - dev_info->rx_offload_capa = DEV_RX_OFFLOAD_SCATTER | > - DEV_RX_OFFLOAD_CRC_STRIP; > + dev_info->rx_offload_capa = DEV_RX_OFFLOAD_SCATTER; > dev_info->tx_offload_capa = 0; > dev_info->rx_queue_offload_capa = 0; > dev_info->tx_queue_offload_capa = 0;
Re: [dpdk-dev] [PATCH v4] net/nfb: new netcope driver
Hi, > I see netcope-common provides a pkg-config file, that's great. > However it's a bit broken at the moment: > > Name: netcope-common > Version: 6.3.0 > Description: Common software package for NetCOPE platform > Libs: -L${libdir} > Cflags: -I${includedir} > > There is no linker flag, and Libs.private is missing. It should have: > > Libs: -L${libdir} -lnfb > Libs.private: -lfdt > > Could you please get it fixed? We are preparing a release of netcope-common, which will include fixed pkg-config file. > > This will not work - the pkg-config filename is netcope-common.pc, not > libnfb.pc. The convention would be to rename the pkg-config file to > libnfb.pc, but if you want to keep the current name then all pkg-config > calls in this patch need to be updated. The first proposal on this issue, which this patch version is based upon, was to add a new "libnfb.pc" pkg-config file to netcope-common. This might be finalized either as a fix in netcope-common.pc or a separate libnfb.pc being shipped. Once this decision is made, we will address it appropriately in the patch. Best regards, Jan Remes
Re: [dpdk-dev] [PATCH v2 2/3] net/szedata2: add support for new NIC
> > Hi Matej, > > Where szedata_get_area_numa_node() is defined? > Is it possible that you are missing a patch? > > Thanks, > ferruh Hi Ferruh, the new PMD requires an updated version of libsze2 and drivers. We have just published the updated packages here: https://www.netcope.com/en/company/community-support/dpdk-libsze2. Sorry for the hickup. Best regards, Jan
Re: [dpdk-dev] [PATCH v2 2/3] net/szedata2: add support for new NIC
It is mentioned on the website with the packages itself. The current version works with the reworked PMD - there is a headline which says: "DPDK from 18.05" (since we expect the patches to land in the upcoming release; we will update it if this does not happen). The older version is still available on the website, with appropriate installation steps and a headline that says "DPDK up to 18.02". Is this form of documentation sufficient for you or would you like to see it mentioned in the DPDK documentation as well? Thanks, Jan Jan Remeš | 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 Fri, Apr 13, 2018 at 4:26 PM, Ferruh Yigit wrote: > On 4/13/2018 9:17 AM, Jan Remeš wrote: >>> >>> Hi Matej, >>> >>> Where szedata_get_area_numa_node() is defined? >>> Is it possible that you are missing a patch? >>> >>> Thanks, >>> ferruh >> >> Hi Ferruh, >> >> the new PMD requires an updated version of libsze2 and drivers. We >> have just published the updated packages here: >> https://www.netcope.com/en/company/community-support/dpdk-libsze2. > > DPDK documentation mentions about libsze2 dependency but there is no version > mentioned. > > And I have not seen any note that says a new version of library is required, > perhaps I missed it, is there a documentation which says which version of DPDK > requires which version of the dependencies? > > What is the way of tracing this dependency? > >> Sorry for the hickup. >> >> Best regards, >> Jan >> >
Re: [dpdk-dev] [PATCH] net/nfb: remove resources when dev is closed
Acked-by: Jan Remes On Fri, Aug 9, 2019 at 4:59 PM Rastislav Cernay wrote: > > From: Rastislav Cernay > > The rte_eth_dev_close() function now handles freeing resources for > devices (e.g., mac_addrs). To conform with the new close() behaviour we > are asserting the RTE_ETH_DEV_CLOSE_REMOVE flag so that > rte_eth_dev_close() releases all device level dynamic memory. > > Signed-off-by: Rastislav Cernay > --- > drivers/net/nfb/nfb_ethdev.c | 18 -- > 1 file changed, 12 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/nfb/nfb_ethdev.c b/drivers/net/nfb/nfb_ethdev.c > index c3119a0..4a19979 100644 > --- a/drivers/net/nfb/nfb_ethdev.c > +++ b/drivers/net/nfb/nfb_ethdev.c > @@ -210,12 +210,17 @@ > static void > nfb_eth_dev_close(struct rte_eth_dev *dev) > { > + struct pmd_internals *internals = (struct pmd_internals *) > + dev->data->dev_private; > uint16_t i; > uint16_t nb_rx = dev->data->nb_rx_queues; > uint16_t nb_tx = dev->data->nb_tx_queues; > > nfb_eth_dev_stop(dev); > > + nfb_nc_rxmac_deinit(internals->rxmac, internals->max_rxmac); > + nfb_nc_txmac_deinit(internals->txmac, internals->max_txmac); > + > for (i = 0; i < nb_rx; i++) { > nfb_eth_rx_queue_release(dev->data->rx_queues[i]); > dev->data->rx_queues[i] = NULL; > @@ -226,6 +231,9 @@ > dev->data->tx_queues[i] = NULL; > } > dev->data->nb_tx_queues = 0; > + > + rte_free(dev->data->mac_addrs); > + dev->data->mac_addrs = NULL; > } > > /** > @@ -446,6 +454,9 @@ > rte_kvargs_free(kvlist); > } > > + /* Let rte_eth_dev_close() release the port resources */ > + dev->data->dev_flags |= RTE_ETH_DEV_CLOSE_REMOVE; > + > /* > * Get number of available DMA RX and TX queues, which is maximum > * number of queues that can be created and store it in private device > @@ -520,15 +531,10 @@ > static int > nfb_eth_dev_uninit(struct rte_eth_dev *dev) > { > - struct rte_eth_dev_data *data = dev->data; > - struct pmd_internals *internals = (struct pmd_internals *) > - data->dev_private; > - > struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev); > struct rte_pci_addr *pci_addr = &pci_dev->addr; > > - nfb_nc_rxmac_deinit(internals->rxmac, internals->max_rxmac); > - nfb_nc_txmac_deinit(internals->txmac, internals->max_txmac); > + nfb_eth_dev_close(dev); > > RTE_LOG(INFO, PMD, "NFB device (" > PCI_PRI_FMT ") successfully uninitialized\n", > -- > 1.8.3.1 >
Re: [dpdk-dev] [PATCH] net/szedata2: add Silicom Mango support
On Thu, Jun 27, 2019 at 7:49 PM Ferruh Yigit wrote: > > On 6/13/2019 2:01 PM, Rastislav Cernay wrote: > > From: Rastislav Cernay > > > > Add support for Silicom FB2CGG3 smart NIC > > > > Signed-off-by: Rastislav Cernay > > Applied to dpdk-next-net/master, thanks. > > (But this requires Ack from maintainer, Jan if you agree please ack the patch, > or I will drop from the tree) > > > Similar to nfb, is this requires any release notes or web update, because of > the > new device support? If so please send the them. I can squash doc path later. > Acked-by: Jan Remes We should cover in the documentation, which cards are supported. I have talked to Rasto and he will send a subsequent patch for the documentation, addressing both our PMDs. Also, he and I will co-maintain both "szedata2" and "nfb" PMDs - I will send a patch for the MAINTAINERS file. BR, Jan
Re: [dpdk-dev] [PATCH] drivers/net/nfb: add timestamp support
On Thu, Jun 27, 2019 at 5:45 PM Ferruh Yigit wrote: > > On 6/13/2019 1:05 PM, Rastislav Cernay wrote: > > +Timestamping needs to be enabled during compile time, as there is no way > > +to check whether a timestamping unit is runnig during run time. > > Even if this can't be detected on runtime, it should be possible to configure > in > runtime with device args so need to compile the PMD again to change the > behavior. > > In this patch default behavior is no timestamps support, same can be done with > devargs, without any devargs timestamp support disable, but if user provides a > devarg, like "timestamp=1", feature enabled. > > What do you think, can it be possible to convert runtime configuration? This sounds good. We did not explore the devargs option. We will look into it, and probably rework this patch and send v2. Thanks, Jan
[dpdk-dev] [PATCH] maintainers: update for szedata2 PMD
Rastislav will co-maintain the szedata2 PMD with me. Signed-off-by: Jan Remes --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index bbec1982c..5a212be08 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -715,6 +715,7 @@ F: doc/guides/nics/features/netvsc.ini Netcope szedata2 M: Jan Remes +M: Rastislav Cernay F: drivers/net/szedata2/ F: doc/guides/nics/szedata2.rst F: doc/guides/nics/features/szedata2.ini -- 2.21.0
Re: [dpdk-dev] [PATCH 1/2] net/nfb: fix dependency check
On Sat, Sep 14, 2019 at 11:37 AM Thomas Monjalon wrote: > > The library libnfb is part of netcope-common which provides > a pkg-config file: netcope-common.pc. > Looking for this .pc file - with dependency() - is preferred > than looking for the library - with cc.find_library(). > > If the library is not installed in a standard path, > it can be found thanks to PKG_CONFIG_PATH variable. > The previous solution required to use CFLAGS and LDFLAGS > environment variables. > > Fixes: 6435f9a0ac22 ("net/nfb: add new netcope driver") > Cc: sta...@dpdk.org > > Signed-off-by: Thomas Monjalon Acked-by: Jan Remes > --- > drivers/net/nfb/meson.build | 9 ++--- > 1 file changed, 2 insertions(+), 7 deletions(-) > > diff --git a/drivers/net/nfb/meson.build b/drivers/net/nfb/meson.build > index 4502c3f76..d53e8eca7 100644 > --- a/drivers/net/nfb/meson.build > +++ b/drivers/net/nfb/meson.build > @@ -3,14 +3,9 @@ > # Copyright(c) 2019 Netcope Technologies, a.s. > # All rights reserved. > > -dep = cc.find_library('nfb', required: false) > +dep = dependency('netcope-common', required: false) > reason = 'missing dependency, "libnfb"' > - > -build = dep.found() and cc.has_header('nfb/nfb.h', dependencies: dep) > - > -nc = dependency('netcope-common', required: false) > - > +build = dep.found() > ext_deps += dep > -ext_deps += nc > > sources = files('nfb_rx.c', 'nfb_tx.c', 'nfb_stats.c', 'nfb_ethdev.c', > 'nfb_rxmode.c') > -- > 2.23.0 >
Re: [dpdk-dev] [PATCH 2/2] net/szedata2: fix dependency check
On Sat, Sep 14, 2019 at 11:37 AM Thomas Monjalon wrote: > > The library libsze2 provides a pkg-config file: libsze2.pc. > Looking for this .pc file - with dependency() - is preferred > than looking for the library - with cc.find_library(). > > If the library is not installed in a standard path, > it can be found thanks to PKG_CONFIG_PATH variable. > The previous solution required to use CFLAGS and LDFLAGS > environment variables. > > Fixes: 508cfe6be9f1 ("net/szedata2: add to meson build") > Cc: sta...@dpdk.org > > Signed-off-by: Thomas Monjalon Acked-by: Jan Remes > --- > drivers/net/szedata2/meson.build | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/szedata2/meson.build > b/drivers/net/szedata2/meson.build > index 032b42518..b53fcbc59 100644 > --- a/drivers/net/szedata2/meson.build > +++ b/drivers/net/szedata2/meson.build > @@ -1,7 +1,7 @@ > # SPDX-License-Identifier: BSD-3-Clause > # Copyright(c) 2018 Intel Corporation > > -dep = cc.find_library('sze2', required: false) > +dep = dependency('libsze2', required: false) > build = dep.found() > reason = 'missing dependency, "libsze2"' > ext_deps += dep > -- > 2.23.0 >
Re: [dpdk-dev] [PATCH 0/2] use pkg-config to find Netcope dependencies
On Mon, Sep 16, 2019 at 5:34 PM Ferruh Yigit wrote: > +1 to this patch, unrelated to this patch I remember there was an issue with > the > nfb & szedata2 dependencies, that their dependencies conflict with each other, > so it wasn't possible to enable both at the same time. > > Jan, Rastislav, > > Is it still the case, or is there any improvement there? They work with the same hardware, they are (crudely and rudely speaking) just mutually incompatible versions of the same thing (both provide configuration access and data transfer for Netcope NFB family of FPGA cards). Therefore, there is no motivation to install both of them, "szedata2 (libsze2)" is deprecated and we only want to keep the PMD for existing users. If it becomes a burden, we will phase it out eventually. Regards, Jan