[dpdk-dev] [PATCH] net/i40e/base: fix the resource leakage problem

2021-08-20 Thread chenqiming_huawei
From: Qiming Chen In the i40e_init_arq function, when the i40e_config_arq_regs function returns from processing failure, the previously applied arq_bufs resource is not released, which leads to leakage. The patch is processed in the same way as the i40e_init_asq function, maintaining a unified co

Re: [dpdk-dev] [PATCH v4] app/testpmd: add option to display extended statistics

2021-08-20 Thread Ajit Khaparde
On Fri, Aug 20, 2021 at 6:55 AM Andrew Rybchenko wrote: > > From: Ivan Ilchenko > > Add 'display-xstats' option for using in accompanying with Rx/Tx statistics > (i.e. 'stats-period' option or 'show port stats' interactive command) to > display specified list of extended statistics. > > Signed-of

[dpdk-dev] i40evf: potential segfault

2021-08-20 Thread Stefan Baranoff
Hi all! I was chasing a potential segfault and it appears, if I'm reading this driver correctly, that in i40evf_init_vf() the value vf->adapter->eth_dev is never set like pf->adapter->eth_dev is in eth_i40e_dev_init(). I believe this is leading to a segfault when something like i40e_recv_scattere

Re: [dpdk-dev] [PATCH v14 9/9] Add unit tests for thread API

2021-08-20 Thread Dmitry Kozlyuk
2021-08-20 09:10 (UTC-0700), Narcisa Ana Maria Vasile: > On Thu, Aug 19, 2021 at 02:31:34PM -0700, Narcisa Ana Maria Vasile wrote: > > From: Narcisa Vasile > > > > As a new API for threading is introduced, > > a set of unit tests have been added to test the new interface. > > > > Signed-off-by:

[dpdk-dev] [RFC 7/7] eth: hide eth dev related structures

2021-08-20 Thread Konstantin Ananyev
Move rte_eth_dev, rte_eth_dev_data, rte_eth_rxtx_callback and related data into ethdev_driver.h. Make changes to keep DPDK building after that. Remove references to 'rte_eth_devices[]' from test-pmd. Signed-off-by: Konstantin Ananyev --- app/test-pmd/config.c | 23 ++- d

[dpdk-dev] [RFC 6/7] eth: make drivers to use new API for Rx queue count

2021-08-20 Thread Konstantin Ananyev
ethdev: - make changes so drivers can start using new API for rx_queue_count(). - provide helper functions/macros. - remove rx_queue_count() from 'struct rte_eth_dev'. drivers/net: - adjust to new rx_queue_count() API. Signed-off-by: Konstantin Ananyev --- drivers/net/i40e/i40e_ethdev.c|

[dpdk-dev] [RFC 5/7] eth: make drivers to use new API to obtain descriptor status

2021-08-20 Thread Konstantin Ananyev
ethdev: make changes so drivers can start using new API for rx_descriptor_status() and tx_descriptor_status(). remove related function pointers from 'struct rte_eth_dev'. drivers/net: adjust to new API. Signed-off-by: Konstantin Ananyev --- drivers/net/i40e/i40e_ethdev.c| 6

[dpdk-dev] [RFC 4/7] eth: make drivers to use new API for Tx prepare

2021-08-20 Thread Konstantin Ananyev
ethdev: - make changes so drivers can start using new API for tx_pkt_prepare(). - provide helper functions/macros. - remove tx_pkt_prepare() from 'struct rte_eth_dev'. drivers/net: - adjust to new tx_prepare API. Signed-off-by: Konstantin Ananyev --- drivers/net/i40e/i40e_ethdev.c | 2 +- d

[dpdk-dev] [RFC 3/7] eth: make drivers to use new API for Tx

2021-08-20 Thread Konstantin Ananyev
ethdev: - make changes so drivers can start using new API for tx_pkt_burst(). - provide helper functions/macros. - remove tx_pkt_burst() from 'struct rte_eth_dev'. drivers/net: - adjust to new tx_burst API. Signed-off-by: Konstantin Ananyev --- app/test/virtual_pmd.c | 12 +

[dpdk-dev] [RFC 2/7] eth: make drivers to use new API for Rx

2021-08-20 Thread Konstantin Ananyev
ethdev: - make changes so drivers can start using new API for rx_pkt_burst(). - provide helper functions/macros. - remove rx_pkt_burst() from 'struct rte_eth_dev'. drivers/net: - adjust to new rx_burst API. Signed-off-by: Konstantin Ananyev --- app/test/virtual_pmd.c | 15

[dpdk-dev] [RFC 1/7] eth: move ethdev 'burst' API into separate structure

2021-08-20 Thread Konstantin Ananyev
Move public function pointers (rx_pkt_burst(), etc.) from rte_eth_dev into a separate flat array. We can keep it public to still use inline functions for 'fast' calls (like rte_eth_rx_burst(), etc.) to avoid/minimize slowdown. The intention is to make rte_eth_dev and related structures internal. Th

[dpdk-dev] [RFC 0/7] hide eth dev related structures

2021-08-20 Thread Konstantin Ananyev
NOTE: This is just an RFC to start further discussion and collect the feedback. Due to significant amount of work, changes required are applied only to two PMDs so far: net/i40e and net/ice. So to build it you'll need to add: -Denable_drivers='common/*,mempool/*,net/ice,net/i40e' to your config opt

Re: [dpdk-dev] [PATCH v14 9/9] Add unit tests for thread API

2021-08-20 Thread Narcisa Ana Maria Vasile
On Thu, Aug 19, 2021 at 02:31:34PM -0700, Narcisa Ana Maria Vasile wrote: > From: Narcisa Vasile > > As a new API for threading is introduced, > a set of unit tests have been added to test the new interface. > > Signed-off-by: Narcisa Vasile > --- > app/test/meson.build| 2 + > app/test/

Re: [dpdk-dev] [PATCH] build: propagate Windows system dependencies to pkg-config

2021-08-20 Thread William Tu
On Thu, Aug 19, 2021 at 4:15 PM Dmitry Kozlyuk wrote: > > Windows EAL depends on some system libraries. They were linked using > add_project_link_arguments('-l'), which prevented meson from adding > them to Libs.private of pkg-config file. As a result, applications using > pkg-config to find DPDK

Re: [dpdk-dev] [PATCH] vhost: fix crash on port deletion

2021-08-20 Thread Gaoxiang Liu
Hi Chenbo, I add more detailed reason as below in [PATCH v5] The rte_vhost_driver_unregister() and vhost_user_read_cb() can be called at the same time by 2 threads. when memory of vsocket is freed in rte_vhost_driver_unregister(), the invalid memory of vsocket is accessd in vhost_user_read_cb().

[dpdk-dev] [PATCH v5] vhost: fix crash on port deletion

2021-08-20 Thread Gaoxiang Liu
The rte_vhost_driver_unregister() and vhost_user_read_cb() can be called at the same time by 2 threads. when memory of vsocket is freed in rte_vhost_driver_unregister(), the invalid memory of vsocket is accessd in vhost_user_read_cb(). It's a bug of both mode for vhost as server or client. Eg vhos

Re: [dpdk-dev] [DPDK] net/ipn3ke: change function label from EXPERIMENTAL to INTERNAL

2021-08-20 Thread Kinsella, Ray
On 20/08/2021 14:13, Ferruh Yigit wrote: > On 8/19/2021 7:05 AM, Rosen Xu wrote: >> 'ipn3ke_bridge_func' is a global variable and it used in net & raw drivers. >> It's only used for drivers, so change it from EXPERIMENTAL to INTERNAL. >> >> Signed-off-by: Rosen Xu > > Acked-by: Ferruh Yigit >

Re: [dpdk-dev] [DPDK] net/ipn3ke: change function label from EXPERIMENTAL to INTERNAL

2021-08-20 Thread Xu, Rosen
Thanks a lot Ferruh. > -Original Message- > From: Yigit, Ferruh > Sent: Friday, August 20, 2021 21:13 > To: Xu, Rosen ; dev@dpdk.org > Cc: m...@ashroe.eu; tho...@monjalon.net; Zhang, Tianfei > ; Huang, Wei > Subject: Re: [DPDK] net/ipn3ke: change function label from EXPERIMENTAL > to INT

[dpdk-dev] [PATCH v4] app/testpmd: add option to display extended statistics

2021-08-20 Thread Andrew Rybchenko
From: Ivan Ilchenko Add 'display-xstats' option for using in accompanying with Rx/Tx statistics (i.e. 'stats-period' option or 'show port stats' interactive command) to display specified list of extended statistics. Signed-off-by: Ivan Ilchenko Signed-off-by: Andrew Rybchenko --- v4: - spl

[dpdk-dev] [PATCH] net/af_packet: fix ignoring full ring on tx

2021-08-20 Thread Tudor Cornea
The poll call can return POLLERR which is ignored, or it can return POLLOUT, even if there are no free frames in the mmap-ed area. We can account for both of these cases by re-checking if the next frame is empty before writing into it. We also now eliminate the timestamp status from the frame sta

Re: [dpdk-dev] [DPDK] net/ipn3ke: change function label from EXPERIMENTAL to INTERNAL

2021-08-20 Thread Ferruh Yigit
On 8/19/2021 7:05 AM, Rosen Xu wrote: > 'ipn3ke_bridge_func' is a global variable and it used in net & raw drivers. > It's only used for drivers, so change it from EXPERIMENTAL to INTERNAL. > > Signed-off-by: Rosen Xu Acked-by: Ferruh Yigit

Re: [dpdk-dev] [PATCH] cryptodev: add telemetry callbacks

2021-08-20 Thread Zhang, Roy Fan
> -Original Message- > From: Troy, Rebecca > Sent: Thursday, August 19, 2021 11:22 AM > To: dev@dpdk.org > Cc: Zhang, Roy Fan ; Power, Ciara > ; Troy, Rebecca ; Akhil > Goyal ; Doherty, Declan > Subject: [PATCH] cryptodev: add telemetry callbacks > > The cryptodev library now registers c

Re: [dpdk-dev] [PATCH] doc: note KNI alternatives and deprecation plan

2021-08-20 Thread David Marchand
On Wed, Jun 23, 2021 at 7:32 PM Ferruh Yigit wrote: > > Add a note that KNI kernel module will be moved to dpdk-kmods git repo > and there is a long term plan to deprecate it. > > Also add some more details on the alternatives to KNI and cons of the > KNI against these alternatives. Some suggesti

[dpdk-dev] [PATCH] net/virtio: report max/min/align desc limits in dev info get

2021-08-20 Thread Andrew Rybchenko
From: Ivan Ilchenko Report max/min/align descriptors limits in device info get callback. Before calling the callback, rte_eth_dev_info_get() provides default values of nb_min as zero and nb_max as UINT16_MAX that are not correct for the driver, so one can't rely on them. Signed-off-by: Ivan Ilch

[dpdk-dev] [PATCH] net/virtio: turn SW RxQ size to that of split vec. virtqueue

2021-08-20 Thread Andrew Rybchenko
From: Ivan Ilchenko Descriptors number may be set less than queue size for split queue vectorized Rx path. Pointers to mbufs for received packets are obtained from SW ring, that is initially filled with them in the end of queue setup in virtio_dev_rx_queue_setup_finish(). The begin of the SW ring

[dpdk-dev] [PATCH] net/virtio: remove handling of zero desc number on RxQ setup

2021-08-20 Thread Andrew Rybchenko
From: Ivan Ilchenko Rx queue setup callback allows to use the whole ring when descriptor number argument equals zero. There's no point to handle zero in any way since RTE Rx queue setup function rte_eth_rx_queue_setup() doesn't pass zero using fallback values. Fixes: 3be82f5cc5e3 ("ethdev: suppo

[dpdk-dev] [PATCH] net/virtio: fix reporting of mbufs allocated on RxQ setup

2021-08-20 Thread Andrew Rybchenko
From: Ivan Ilchenko Rx queue setup finish function may report wrong number of allocated mbufs in case of in-order feature. Fix the function to not ignore allocation error and count only successfully allocated number of buffers. Fixes: e5f456a98d3 ("net/virtio: support in-order Rx and Tx") Cc: st

[dpdk-dev] [PATCH] net/af_packet: try to reinsert the stripped vlan tag

2021-08-20 Thread Tudor Cornea
The af_packet pmd driver binds to a raw socket and allows sending and receiving of packets through the kernel. Since commit bcc6d47903 [1], the kernel strips the vlan tags early in __netif_receive_skb_core(), so we receive untagged packets while running with the af_packet pmd. Luckily for us, the

Re: [dpdk-dev] [PATCH] net/bnxt: fix to reset Rx next consumer index

2021-08-20 Thread Ferruh Yigit
On 8/10/2021 7:07 AM, Somnath Kotur wrote: > In bnxt_init_one_rx_ring(), reset this variable internal to the driver > ring to 0, so that there is no mismatch with actual value in HW on > traffic resumption. > Hi Somnath, What is the impact of the patch, what are you fixing? If the 'rx_next_cons

[dpdk-dev] [PATCH v3] ethdev: fix representor port ID search by name

2021-08-20 Thread Andrew Rybchenko
From: Viacheslav Galaktionov Getting a list of representors from a representor does not make sense. Instead, a parent device should be used. To this end, extend the rte_eth_dev_data structure to include the port ID of the parent device for representors. Signed-off-by: Viacheslav Galaktionov Si

Re: [dpdk-dev] [PATCH v2] test/func_reentrancy: free memzones after creating test case

2021-08-20 Thread David Marchand
On Fri, Aug 20, 2021 at 9:57 AM Joyce Kong wrote: > > > -Original Message- > > From: David Marchand > > Sent: Tuesday, August 17, 2021 4:17 PM > > To: Joyce Kong > > Cc: Burakov, Anatoly ; Olivier Matz > > ; Andrew Rybchenko > > ; Wang, Yipeng1 > > ; Gobriel, Sameh ; > > Bruce Richardson

Re: [dpdk-dev] [PATCH] telemetry: detach pthreads

2021-08-20 Thread Power, Ciara
Hi Stephen, >-Original Message- >From: Stephen Hemminger >Sent: Thursday 19 August 2021 03:38 >To: Power, Ciara >Cc: dev@dpdk.org; Stephen Hemminger >Subject: [PATCH] telemetry: detach pthreads > >There are a number telemetry threads which are created and there is nothing >that does pth

[dpdk-dev] [RFC PATCH] ethdev: mtr: enhance input color table features

2021-08-20 Thread jerinj
From: Jerin Jacob Currently, meter object supports only DSCP based on input color table, The patch enhance that to support VLAN based input color table, color table based on inner field for the tunnel use case, and support for fallback color per meter if packet based on a different field. All o

Re: [dpdk-dev] [PATCH v2 6/6] bbdev: reduce warning level for one scenario

2021-08-20 Thread Zhang, Mingshan
Queue setup may genuinely fail when adding incremental queues for a given priority level. In that case application would attempt to configure a queue at a different priority level. Not an actual error. Signed-off-by: Nicolas Chautru Acked-by: Mingshan Zhang --- lib/bbdev/rte_bbdev.c | 7 -

[dpdk-dev] [PATCH v3] test/func_reentrancy: free memzones after creating test

2021-08-20 Thread Joyce Kong
Function reentrancy test limits maximum number of iterations simultaneously, however it doesn't free the 'fr_test_once' memzones after the fact, so introduce freeing 'fr_test_once' in ring/mempool/hash/fbk/lpm_clean. Meanwhile, add the missing free for test case on main thread. Fixes: 104a92bd026

Re: [dpdk-dev] [PATCH v2] test/func_reentrancy: free memzones after creating test case

2021-08-20 Thread Joyce Kong
> -Original Message- > From: David Marchand > Sent: Tuesday, August 17, 2021 4:17 PM > To: Joyce Kong > Cc: Burakov, Anatoly ; Olivier Matz > ; Andrew Rybchenko > ; Wang, Yipeng1 > ; Gobriel, Sameh ; > Bruce Richardson ; Vladimir Medvedkin > ; Ananyev, Konstantin > ; Honnappa Nagarahalli

Re: [dpdk-dev] [PATCH v13] eventdev: simplify Rx adapter event vector config

2021-08-20 Thread Naga Harish K, S V
-Original Message- From: Jayatheerthan, Jay Sent: Wednesday, August 18, 2021 1:53 PM To: pbhagavat...@marvell.com; jer...@marvell.com; Ray Kinsella ; Shijith Thotton ; Naga Harish K, S V Cc: dev@dpdk.org Subject: RE: [dpdk-dev] [PATCH v13] eventdev: simplify Rx adapter event vector