RE: [RFC v3 23/26] dev: hide driver object

2022-08-01 Thread Jayatheerthan, Jay
Looks good to me. Acked-by: Jay Jayatheerthan > -Original Message- > From: David Marchand > Sent: Thursday, July 28, 2022 8:57 PM > To: dev@dpdk.org > Cc: Chautru, Nicolas ; Parav Pandit > ; Xueming Li ; Hemant > Agrawal ; Sachin Saxena ; > Stephen Hemminger ; > Long Li ; Zhang, Roy

RE: [PATCH v9 1/4] ethdev: introduce protocol header API

2022-08-01 Thread Wang, YuanX
Hi Thomas, Sorry so long to response your email. > -Original Message- > From: Thomas Monjalon > Sent: Thursday, July 7, 2022 5:05 PM > To: Wu, WenxuanX > Cc: andrew.rybche...@oktetlabs.ru; Li, Xiaoyun ; > ferruh.yi...@xilinx.com; Singh, Aman Deep ; > dev@dpdk.org; Zhang, Yuying ; Zhang,

RE: [PATCH v9 1/4] ethdev: introduce protocol header API

2022-08-01 Thread Wang, YuanX
Hi Andrew, Apologies for the delay in getting back to you. > -Original Message- > From: Andrew Rybchenko > Sent: Friday, July 8, 2022 11:01 PM > To: Wu, WenxuanX ; tho...@monjalon.net; Li, > Xiaoyun ; ferruh.yi...@xilinx.com; Singh, Aman Deep > ; dev@dpdk.org; Zhang, Yuying > ; Zhang, Qi

[PATCH v3] pcapng: fix write more packets than IOV_MAX limit

2022-08-01 Thread Mário Kuka
The rte_pcapng_write_packets() function fails when we try to write more packets than the IOV_MAX limit. writev() system call is limited by the IOV_MAX limit. The iovcnt argument is valid if it is greater than 0 and less than or equal to IOV_MAX as defined in . To avoid this problem, we can check t

Re: [PATCH v2 2/2] pcapng: check if writev() returns a partial write

2022-08-01 Thread Mário Kuka
As pcapng is used in the dpdk application it writes to a file. You could repurpose it to something else, but even a pipe will not give partial writes unless you configure the pipe as non-blocking. Writing to a non-blocking pipe is going to have a load of other problems. This seems like a purely

Re: [PATCH v9 1/4] ethdev: introduce protocol header API

2022-08-01 Thread Thomas Monjalon
01/08/2022 09:09, Wang, YuanX: > Hi Thomas, > > Sorry so long to response your email. > > From: Thomas Monjalon > > 13/06/2022 12:25, wenxuanx...@intel.com: > > > From: Wenxuan Wu > > > > > > This patch added new ethdev API to retrieve supported protocol header > > > mask of a PMD, which helps

[PATCH 0/2] vhost fixes for OVS SIGSEGV in PMD

2022-08-01 Thread Claudio Fontana
Hi, the real meat is in patch 1/2, which fixes a segmentation fault in the OVS PMD thread when resynchronizing with QEMU after the guest application has been killed with SIGKILL. This fixes an issue where the guest DPDK application is able to crash the OVS process on the host. Patch 2/2 is just

[PATCH 1/2] vhost: fix error handling in virtio_dev_tx_split

2022-08-01 Thread Claudio Fontana
in virtio_dev_split we add a check for invalid nr_vec, mainly for nr_vec == 0 (but add a check for BUF_VECTOR_MAX too), and bail out before calling desc_to_mbuf, otherwise in desc_to_mbuf we end up trying to memcpy from a source address buf_vec[0] that is an uninitialized stack variable. This shou

[PATCH 2/2] vhost: improve error handling in desc_to_mbuf

2022-08-01 Thread Claudio Fontana
check when increasing vec_idx that it is still valid in the (buf_len < dev->vhost_hlen) case too. Signed-off-by: Claudio Fontana --- lib/vhost/virtio_net.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c index 0b8db2046e..6d

Re: Question about pattern types for rte_flow RSS rule

2022-08-01 Thread Andrew Rybchenko
On 8/1/22 06:39, lihuisong (C) wrote: 在 2022/7/31 17:40, Andrew Rybchenko 写道: Hi, Huisong! On 7/29/22 05:30, lihuisong (C) wrote: Hi Ori, and all, For RSS flow rule, pattern item types and RSS types in action are an inclusive relationship, and RSS types contain pattern item types. I disag

Re: segfault in ovs in setup with DPDK, qemu vhost-user

2022-08-01 Thread Claudio Fontana
On 7/30/22 18:23, Claudio Fontana wrote: > On 7/30/22 18:17, Claudio Fontana wrote: >> Hello all, >> >> with the latest DPDK, openvswitch and qemu >> >> DPDK tag v22.07 >> openvswitch tag v2.17.1 >> qemu v7.1-git 22.07.2022 >> >> and a DPDK setup which involves also an ubuntu guest with DPDK 16.11

Re: segfault in ovs in setup with DPDK, qemu vhost-user

2022-08-01 Thread Claudio Fontana
On 8/1/22 13:57, Claudio Fontana wrote: > On 7/30/22 18:23, Claudio Fontana wrote: >> On 7/30/22 18:17, Claudio Fontana wrote: >>> Hello all, >>> >>> with the latest DPDK, openvswitch and qemu >>> >>> DPDK tag v22.07 >>> openvswitch tag v2.17.1 >>> qemu v7.1-git 22.07.2022 >>> >>> and a DPDK setup

[PATCH] app/testpmd: add command line argument 'rx-metadata'

2022-08-01 Thread Hanumanth Pothula
Presently, rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in rx path takes extra cycles. Hence, introducing command line argument, 'rx-metadata' to control passing rx metadata to PMD. By default it’s disabled. ci: skip_checkpatch Signed-off-by: Ha

[PATCH] app/testpmd: add command line argument 'rx-metadata'

2022-08-01 Thread Hanumanth Pothula
Presently, rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in rx path takes extra cycles. Hence, introducing command line argument, 'rx-metadata' to control passing rx metadata to PMD. By default it’s disabled. Signed-off-by: Hanumanth Pothula ---

Re: [PATCH v1] graph: fix out of bounds access when re-allocate node objs

2022-08-01 Thread Jerin Jacob
On Wed, Jul 27, 2022 at 8:10 AM Zhirun Yan wrote: > > For __rte_node_enqueue_prologue(), If the number of objs is more than > the node->size * 2, the extra objs will write out of bounds memory. > It should use __rte_node_stream_alloc_size() to request enough memory. > > And for rte_node_next_strea

Re: Question about pattern types for rte_flow RSS rule

2022-08-01 Thread Andrew Rybchenko
On 8/1/22 16:27, lihuisong (C) wrote: 在 2022/8/1 19:53, Andrew Rybchenko 写道: On 8/1/22 06:39, lihuisong (C) wrote: 在 2022/7/31 17:40, Andrew Rybchenko 写道: Hi, Huisong! On 7/29/22 05:30, lihuisong (C) wrote: Hi Ori, and all, For RSS flow rule, pattern item types and RSS types in action are

Re: [PATCH v9 2/4] ethdev: introduce protocol hdr based buffer split

2022-08-01 Thread Andrew Rybchenko
On 7/21/22 06:24, Ding, Xuan wrote: Hi Andrew, -Original Message- From: Andrew Rybchenko Sent: 2022年7月8日 23:01 To: Wu, WenxuanX ; tho...@monjalon.net; Li, Xiaoyun ; ferruh.yi...@xilinx.com; Singh, Aman Deep ; dev@dpdk.org; Zhang, Yuying ; Zhang, Qi Z ; jerinjac...@gmail.com Cc: step...

Re: [PATCH v3] pcapng: fix write more packets than IOV_MAX limit

2022-08-01 Thread Stephen Hemminger
On Mon, 1 Aug 2022 10:40:56 +0200 Mário Kuka wrote: > The rte_pcapng_write_packets() function fails when we try to write more > packets than the IOV_MAX limit. writev() system call is limited by the > IOV_MAX limit. The iovcnt argument is valid if it is greater than 0 and > less than or equal to

Re: [RFC v3 23/26] dev: hide driver object

2022-08-01 Thread Ajit Khaparde
On Thu, Jul 28, 2022 at 10:00 AM Bruce Richardson wrote: > > On Thu, Jul 28, 2022 at 05:26:37PM +0200, David Marchand wrote: > > Make rte_driver opaque for non internal users. > > This will make extending this object possible without breaking the ABI. > > > > Introduce a new driver header and move

Re: [PATCH] app/testpmd: add command line argument 'rx-metadata'

2022-08-01 Thread Ivan Malov
Hi Hanumanth, Thanks for expanding support for the NIC-to-PMD Rx metadata feature. I do not object the idea of the patch, it looks aceeptable. However, please find my comments below. On Mon, 1 Aug 2022, Hanumanth Pothula wrote: Presently, rx metadata is sent to PMD by default, leading to a per

[PATCH v2 0/2] vhost fixes for OVS SIGSEGV in PMD

2022-08-01 Thread Claudio Fontana
This is an alternative, more general fix compared with PATCH v1. The series fixes a segmentation fault in the OVS PMD thread when resynchronizing with QEMU after the guest application has been killed with SIGKILL (patch 1/2), The segmentation fault can be caused by the guest DPDK application, whi

[PATCH 1/2] vhost: check for nr_vec == 0 in desc_to_mbuf, mbuf_to_desc

2022-08-01 Thread Claudio Fontana
in virtio_dev_split we cannot currently call desc_to_mbuf with nr_vec == 0, or we end up trying to rte_memcpy from a source address buf_vec[0] that is an uninitialized stack variable. Improve this in general by having desc_to_mbuf and mbuf_to_desc return -1 when called with an invalid nr_vec == 0,

[PATCH 2/2] vhost: improve error handling in desc_to_mbuf

2022-08-01 Thread Claudio Fontana
check when increasing vec_idx that it is still valid in the (buf_len < dev->vhost_hlen) case too. Signed-off-by: Claudio Fontana --- lib/vhost/virtio_net.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c index 8d0d223983..22

[PATCH v3 0/2] vhost fixes for OVS SIGSEGV in PMD

2022-08-01 Thread Claudio Fontana
This is an alternative, more general fix compared with PATCH v1, and fixes style issues in v2. The series fixes a segmentation fault in the OVS PMD thread when resynchronizing with QEMU after the guest application has been killed with SIGKILL (patch 1/2), The segmentation fault can be caused by t

[PATCH v3 1/2] vhost: check for nr_vec == 0 in desc_to_mbuf, mbuf_to_desc

2022-08-01 Thread Claudio Fontana
in virtio_dev_split we cannot currently call desc_to_mbuf with nr_vec == 0, or we end up trying to rte_memcpy from a source address buf_vec[0] that is an uninitialized stack variable. Improve this in general by having desc_to_mbuf and mbuf_to_desc return -1 when called with an invalid nr_vec == 0,

[PATCH v3 2/2] vhost: improve error handling in desc_to_mbuf

2022-08-01 Thread Claudio Fontana
check when increasing vec_idx that it is still valid in the (buf_len < dev->vhost_hlen) case too. Tested-by: Claudio Fontana Signed-off-by: Claudio Fontana --- lib/vhost/virtio_net.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virti

Re: [PATCH v3 1/2] vhost: check for nr_vec == 0 in desc_to_mbuf, mbuf_to_desc

2022-08-01 Thread Stephen Hemminger
On Tue, 2 Aug 2022 02:49:37 +0200 Claudio Fontana wrote: > Tested-by: Claudio Fontana > Signed-off-by: Claudio Fontana Minor nit having both tags by same author is redundant and unnecessary.

RE: [PATCH v4] net/i40e: fix the issue caused by PF and VF release order

2022-08-01 Thread Zhang, Yuying
Hi Ke, Please update commit log. LGTM. > -Original Message- > From: Zhang, Ke1X > Sent: Friday, July 15, 2022 5:04 PM > To: tho...@monjalon.net; Zhang, Yuying ; Xing, > Beilei ; ferruh.yi...@xilinx.com; Zhou, YidingX > ; dev@dpdk.org > Cc: Zhang, Ke1X ; sta...@dpdk.org > Subject: [PATCH

Re: [PATCH] net/bnxt: fix null pointer dereference in bnxt_hwrm_port_led_cfg()

2022-08-01 Thread Somnath Kotur
On Tue, Aug 2, 2022 at 8:33 AM Mao YingMing wrote: > Thanks for the patch > From: maoyingming > > VFs's "bp->leds" is allways null, check bp->leds is > not null before use bp->leds->num_leds. Typo in 'always' You can just say ' For VFs , bp->leds is uninitialized' > > segfault backtrace in trex p

[PATCH] net/bnxt: fix null pointer dereference in bnxt_hwrm_port_led_cfg()

2022-08-01 Thread Mao YingMing
From: maoyingming VFs's "bp->leds" is allways null, check bp->leds is not null before use bp->leds->num_leds. segfault backtrace in trex program when use VF: 11: bnxt_hwrm_port_led_cfg (bp=0x23ffb2140, led_on=true) 10: bnxt_dev_led_on_op (dev=0x22d7780 ) 9: rte_eth_led_on (port_id=0) 8: DpdkTR

Re: 21.11.2 patches review and test

2022-08-01 Thread YangHang Liu
Hi Luca, The dpdk 21.11.2-rc1 test result from Red Hat looks good. We tested below 17 scenarios and all got PASS on RHEL8: - Guest with device assignment(PF) throughput testing(1G hugepage size): PASS - Guest with device assignment(PF) throughput testing(2M hugepage size) : PASS -

[PATCHv2] net/bnxt: fix null pointer dereference in bnxt_hwrm_port_led_cfg()

2022-08-01 Thread Mao YingMing
For VFs, bp->leds is uninitialized, check bp->leds is not null before use bp->leds->num_leds. segfault backtrace in trex program when use VF: 11: bnxt_hwrm_port_led_cfg (bp=0x23ffb2140, led_on=true) 10: bnxt_dev_led_on_op (dev=0x22d7780 ) 9: rte_eth_led_on (port_id=0) 8: DpdkTRexPortAttr::set_le

Re: [PATCHv2] net/bnxt: fix null pointer dereference in bnxt_hwrm_port_led_cfg()

2022-08-01 Thread Somnath Kotur
On Tue, Aug 2, 2022 at 9:17 AM Mao YingMing wrote: > > For VFs, bp->leds is uninitialized, check bp->leds is > not null before use bp->leds->num_leds. Sorry for missing this the first time around, Rephrase it to say 'before checking for bp->leds->num_leds' > segfault backtrace in trex program when

[PATCH v3] net/bnxt: fix null pointer dereference in bnxt_hwrm_port_led_cfg()

2022-08-01 Thread Mao YingMing
For VFs, bp->leds is uninitialized, check bp->leds is not null before checking for bp->leds->num_leds. segfault backtrace in trex program when use VF: 11: bnxt_hwrm_port_led_cfg (bp=0x23ffb2140, led_on=true) 10: bnxt_dev_led_on_op (dev=0x22d7780 ) 9: rte_eth_led_on (port_id=0) 8: DpdkTRexPortAtt

Re: [PATCH v3] net/bnxt: fix null pointer dereference in bnxt_hwrm_port_led_cfg()

2022-08-01 Thread Somnath Kotur
On Tue, Aug 2, 2022 at 9:38 AM Mao YingMing wrote: > > For VFs, bp->leds is uninitialized, check bp->leds is > not null before checking for bp->leds->num_leds. > > segfault backtrace in trex program when use VF: > 11: bnxt_hwrm_port_led_cfg (bp=0x23ffb2140, led_on=true) > 10: bnxt_dev_led_on_op (d

答复: [PATCH v3] net/bnxt: fix null pointer dereference in bnxt_hwrm_port_led_cfg()

2022-08-01 Thread Mao,Yingming
Thans for your review. Mao Yingming -邮件原件- 发件人: Somnath Kotur 发送时间: 2022年8月2日 12:09 收件人: Mao,Yingming 抄送: dev@dpdk.org; Ajit Khaparde ; Kalesh AP ; Thomas Monjalon 主题: Re: [PATCH v3] net/bnxt: fix null pointer dereference in bnxt_hwrm_port_led_cfg() O