Re: [PATCH v2] examples/l3fwd: add option to set Tx burst size

2025-02-13 Thread Jie Hai
Hi, all maintainers, Kindly ping for review. Thanks, Jie Hai On 2024/12/4 10:06, Jie Hai wrote: The application send packets only when the buffer is full, or the buffer is empty and the packets to be sent extends TX_PKT_BURST. The change of MAX_PKT_BURST make TX buffer size and TX_PKT_BURST in

[PATCH v3 2/2] app/test-pmd: use ptype API parse packets

2025-02-13 Thread Jie Hai
1. Use rte_net_get_ptype() to parse packets instead. 2. Support TSO for packets with ipv6 extension header. Signed-off-by: Jie Hai --- app/test-pmd/csumonly.c | 522 ++-- 1 file changed, 128 insertions(+), 394 deletions(-) diff --git a/app/test-pmd/csumonly.c

[PATCH v3 1/2] net: add ptype parse for tunnel packets

2025-02-13 Thread Jie Hai
Add packet types parse for vxlan/vxlan-gpe/gtp/geneve packets. Signed-off-by: Jie Hai --- lib/net/rte_net.c | 110 ++ 1 file changed, 102 insertions(+), 8 deletions(-) diff --git a/lib/net/rte_net.c b/lib/net/rte_net.c index d680accc1631..45b63eafc7c6

[PATCH v3 0/2] app/testpmd: add ipv6 extension header parse

2025-02-13 Thread Jie Hai
This patch support parse ipv6 extension header, and support TSO for ipv6tcp packets with extension header. Jie Hai (2): net: add ptype parse for tunnel packets app/test-pmd: use ptype API parse packets app/test-pmd/csumonly.c | 522 ++-- lib/net/rte_net.c

[PATCH v6 04/11] crypto/qat: fix size calculation for memset

2025-02-13 Thread Stephen Hemminger
The memset was always doing 0 bytes since size computed later. Link: https://pvs-studio.com/en/blog/posts/cpp/1179/ Fixes: 3a80d7fb2ecd ("crypto/qat: support SHA3 plain hash") Cc: sta...@dpdk.org Signed-off-by: Stephen Hemminger Acked-by: Bruce Richardson --- drivers/crypto/qat/qat_sym_sessio

[PATCH v6 11/11] devtools/cocci: add script to find problematic memset

2025-02-13 Thread Stephen Hemminger
Script that converts memset before free into rte_memset_sensitive and memset before rte_free into rte_free_sensitive Signed-off-by: Stephen Hemminger --- devtools/cocci/memset_free.cocci | 9 + 1 file changed, 9 insertions(+) create mode 100644 devtools/cocci/memset_free.cocci diff --g

[PATCH v6 07/11] compress/octeontx: remove unnecessary memset

2025-02-13 Thread Stephen Hemminger
Calling memset before rte_free not necessary, and could be removed by the compiler. In this case, the data is not security sensitive so the memset can be removed. Some security scanning tools will flag this. Signed-off-by: Stephen Hemminger Acked-by: Bruce Richardson --- drivers/compress/octeon

[PATCH v6 05/11] crypto/qat: use secure memset

2025-02-13 Thread Stephen Hemminger
Regular memset maybe removed by compiler if done before a free function. Use new rte_free_sensitive instead. Signed-off-by: Stephen Hemminger Acked-by: Bruce Richardson --- drivers/crypto/qat/qat_asym.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/crypto/qat/q

[PATCH v6 10/11] net/ntnic: remove unnecessary memset

2025-02-13 Thread Stephen Hemminger
Calling memset before free() has no effect and will be flagged by security parsing tools as a potential bug. None of these data structures have sensitive information. Signed-off-by: Stephen Hemminger --- drivers/net/ntnic/nthw/core/nthw_hif.c| 5 + drivers/net/ntnic/nthw/core

[PATCH v6 09/11] net/ntnic: check result of malloc

2025-02-13 Thread Stephen Hemminger
Need to check the result of malloc() before calling memset. This is only place in this driver that forgot, other code does check. Fixes: 0d9bca480e26 ("net/ntnic: add FPGA modules for initialization") cc: sta...@dpdk.org Signed-off-by: Stephen Hemminger --- drivers/net/ntnic/nthw/nthw_rac.c | 4

[PATCH v6 08/11] test: remove unneeded memset

2025-02-13 Thread Stephen Hemminger
Since tmp is not used later in the function, this memset is unnecessary. Even though this is harmless, it causes tools that look for security issues around memset to flag this a bug. Signed-off-by: Stephen Hemminger Acked-by: Bruce Richardson --- app/test/test_cmdline_cirbuf.c | 2 -- 1 file ch

[PATCH v6 06/11] bus/uacce: remove memset before free

2025-02-13 Thread Stephen Hemminger
Doing memset before free maybe removed by compiler, and is flagged by security scanning tools as potential problem. In this case the memset is unnecessary. Signed-off-by: Stephen Hemminger Acked-by: Chengwen Feng --- drivers/bus/uacce/uacce.c | 1 - 1 file changed, 1 deletion(-) diff --git a/d

[PATCH v6 01/11] eal: introduce new secure memory fill

2025-02-13 Thread Stephen Hemminger
When memset() is used before a release function such as free, the compiler if allowed to optimize the memset away under the as-if rules. This is normally ok, but in certain cases such as passwords or security keys it is problematic. Introduce a DPDK wrapper which is equivalent to the C23 memset_ex

[PATCH v6 02/11] eal: add new secure free function

2025-02-13 Thread Stephen Hemminger
Although internally rte_free does poison the buffer in most cases, it is useful to have function that explicitly does this to avoid any security issues. Name of new API is chosen to be similar to Linux kernel kfree_sensitive() to make porting drivers easier. Signed-off-by: Stephen Hemminger ---

[PATCH v6 00/11] secure zeroing of memory

2025-02-13 Thread Stephen Hemminger
This series handles memset related bugs indentified by PVS Studio. The root cause is that Gcc and other compilers are free to optimize away memset called before free. v6 - rename rte_memset_sensative to rte_memzero_explicit to more closely match kernel usage. use rte_free_sensistive in c

[PATCH v6 03/11] crypto/qat: force zero of keys

2025-02-13 Thread Stephen Hemminger
Just doing memset() on keys is not enough, compiler can optimize it away. Use new rte_memzero_explicit() and rte_free_sensitive(). Signed-off-by: Stephen Hemminger Acked-by: Bruce Richardson --- drivers/crypto/qat/qat_sym_session.c | 33 ++-- 1 file changed, 17 insertion

[PATCH v7 3/7] latencystats: fix log messages

2025-02-13 Thread Stephen Hemminger
All messages that because of an error should be at log level NOTICE or above. Do not break log messages across lines. Reword message for the case where getting info about a port fails and it is skipped. Signed-off-by: Stephen Hemminger Acked-by: Tyler Retzlaff --- lib/latencystats/rte_latencyst

[PATCH v7 1/7] latencystats: handle fractional cycles per ns

2025-02-13 Thread Stephen Hemminger
The TSC frequency is not always an integral number of nanoseconds. For examples, cycles per nanoseconds on my test system is 2.8. Fix by using floating point where needed and calculate value once. Signed-off-by: Stephen Hemminger --- lib/latencystats/rte_latencystats.c | 17 ++--- 1

[PATCH v7 7/7] test: update to latencystats tests

2025-02-13 Thread Stephen Hemminger
No need for loop and memset() here. Just use structure initialization. Remove unnecessary initializations. Look at the number of samples, min, max and average numbers to make sure they look correct. Forward for longer to make sure multiple samples are taken. Signed-off-by: Stephen Hemminger ---

[PATCH v7 6/7] latencystats: add metric for number of samples

2025-02-13 Thread Stephen Hemminger
Keeping track of the number of samples is useful when doing debug and testing to make sure that samples are actually happening. Signed-off-by: Stephen Hemminger --- lib/latencystats/rte_latencystats.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/l

[PATCH v7 5/7] latencystats: enforce that unused callback function is NULL

2025-02-13 Thread Stephen Hemminger
ISO C does not allow casting function pointer to void *. Resolve by enforcing the reserved argument. The user_cb argument for rte_latencystats_init() was not implemented, and had to be NULL anyway. The log type is local to this function and therefore can be local to this file. Signed-off-by: Step

[PATCH v7 4/7] latencystats: update include files

2025-02-13 Thread Stephen Hemminger
Include what is used here. Signed-off-by: Stephen Hemminger --- lib/latencystats/rte_latencystats.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/lib/latencystats/rte_latencystats.c b/lib/latencystats/rte_latencystats.c index 82c310da92..b990e5760f 100

[PATCH v7 2/7] latencystats: do not use floating point

2025-02-13 Thread Stephen Hemminger
The cycle counts do not need to be stored as floating point. Instead keep track of latency in cycles, and convert to nanoseconds when read. Use scaled math with exponential Weighted Moving Average weight of .25 to avoid use of floating point for that. The average latency took too long to "warm up

[PATCH v7 0/7] latencystats: cleanup

2025-02-13 Thread Stephen Hemminger
Latencystats uses unnecessary floating point and is inaccurate if the number of cycles per ns is not an integral value. Cleanup the code and add more tests as well. v7 - rebase and drop already merged VLA patch Stephen Hemminger (7): latencystats: handle fractional cycles per ns latencystats:

Re: [PATCH v1 00/16] net/zxdh: updated net zxdh driver

2025-02-13 Thread Stephen Hemminger
On Thu, 13 Feb 2025 14:41:16 +0800 Junlong Wang wrote: > V1: > - updated net zxdh driver. > optimize init and some ops. > provided csum/lro/tso 、extend stats、fw_version、module_info 、meter, etc. > > Junlong Wang (16): > net/zxdh: optimize np dtb channel initialization > net/zxdh: op

[Patch v2 1/3] net/netvsc: scan all net devices under the PCI device

2025-02-13 Thread longli
From: Long Li The current code has the wrong assumption that a PCI device can have only one Ethernet device. This is not correct as a PCI device can be multi functional and have multiple Ethernet devices. Fix this by scanning all the devices under a PCI device. Fixes: a2a23a794b3a ("net/netvsc:

[Patch v2 3/3] net/netvsc: log error on failure to switch data path

2025-02-13 Thread longli
From: Long Li There is no recovery code path if netvsc failed to switch data path. Log an error in this case for troubleshooting. Signed-off-by: Long Li --- drivers/net/netvsc/hn_vf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/netvsc/hn_vf.c b/drivers

[Patch v2 2/3] net/netvsc: remove RTE device if all its net devices are removed

2025-02-13 Thread longli
From: Long Li An RTE device can have multiple Ethernet devices. On hot plug events, it can't be removed until all its Ethernet devices have been removed. Fixes: a2a23a794b3a ("net/netvsc: support VF device hot add/remove") Cc: sta...@dpdk.org Signed-off-by: Long Li --- drivers/net/netvsc/hn_vf

[Patch v2 0/3] net/netvsc fixes for handling PCI hotplug with multiple devices

2025-02-13 Thread longli
From: Long Li On some systems, one PCI device may have muiltple NET devices. This patchset fixes issues on those systems when such PCI device is doing hot add/remove. Change in v2: added cover letter, drop the 4th patch that will be implemented in EAL instead for device args caching Long Li (

Re: [PATCH v12 01/28] net/rnp: add skeleton

2025-02-13 Thread Stephen Hemminger
On Wed, 12 Feb 2025 23:32:21 +0800 Wenbo Cao wrote: > Add basic PMD library and doc build infrastructure > Update maintainers file to claim responsibility. > > Signed-off-by: Wenbo Cao > Reviewed-by: Thomas Monjalon > --- > .mailmap | 1 + > MAINTAINERS

Re: [PATCH v12 00/28] [v12]drivers/net Add Support mucse N10 Pmd Driver

2025-02-13 Thread Stephen Hemminger
On Wed, 12 Feb 2025 23:32:20 +0800 Wenbo Cao wrote: > For This patchset just to support the basic chip init work > and user can just found the eth_dev, but can't control more. > For Now just support 2*10g nic,the chip can support > 2*10g,4*10g,4*1g,8*1g,8*10g. > The Feature rx side can support rx

Re: [PATCH v1 00/16] net/zxdh: updated net zxdh driver

2025-02-13 Thread Stephen Hemminger
On Thu, 13 Feb 2025 14:41:16 +0800 Junlong Wang wrote: > V1: > - updated net zxdh driver. > optimize init and some ops. > provided csum/lro/tso 、extend stats、fw_version、module_info 、meter, etc. > > Junlong Wang (16): > net/zxdh: optimize np dtb channel initialization > net/zxdh: op

Re: [PATCH v9 2/2] net/af_xdp: Refactor af_xdp_tx_zc

2025-02-13 Thread Stephen Hemminger
On Thu, 13 Feb 2025 12:17:51 +0100 Ariel Otilibili wrote: > Hello Maryam, hello Stephen; > > On Fri, Feb 7, 2025 at 1:33 PM Ariel Otilibili > wrote: > > > > > > > On Fri, Feb 7, 2025 at 12:13 PM Maryam Tahhan wrote: > > > >> > >> On 07/02/2025 10:45, Ariel Otilibili wrote: > >> > >> Both le

[PATCH v3] dts: add SUT cleanup to framework

2025-02-13 Thread Dean Marx
Add method cleanup_sut to framework that removes a DPDK source from a SUT node at the conclusion of a testrun. This will only run when the DPDK source is being copied from the DTS engine node during the testrun (when remote=false in the configuration). Signed-off-by: Dean Marx --- dts/framework/

RE: [PATCH v2 1/1] vhost: fix a double fetch when dequeue offloading

2025-02-13 Thread Wangyunjian(wangyunjian,TongTu)
> -Original Message- > From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Saturday, December 21, 2024 1:11 AM > To: Wangyunjian(wangyunjian,TongTu) > Cc: dev@dpdk.org; maxime.coque...@redhat.com; chen...@nvidia.com; > Lilijun (Jerry) ; xiawei (H) ; > wangzengyuan ; sta..

Re: [PATCH v9 2/2] net/af_xdp: Refactor af_xdp_tx_zc

2025-02-13 Thread Ariel Otilibili
Hello Maryam, hello Stephen; On Fri, Feb 7, 2025 at 1:33 PM Ariel Otilibili wrote: > > > On Fri, Feb 7, 2025 at 12:13 PM Maryam Tahhan wrote: > >> >> On 07/02/2025 10:45, Ariel Otilibili wrote: >> >> Both legs of the loop share the same logic: the common parts are about >> reserving and filling

Re: [PATCH 1/1] eal/linux: Remove unused values

2025-02-13 Thread Ariel Otilibili
Hi Thomas, On Wed, Feb 12, 2025 at 3:00 PM Thomas Monjalon wrote: > Applied, thanks. > Thanks for the feedback. Have a good day. Ariel

Re: [PATCH v2 2/2] mempool: make rte_mempool_create_empty a single-exit

2025-02-13 Thread Ariel Otilibili
Hi Konstantin, On Fri, Feb 7, 2025 at 3:31 PM Konstantin Ananyev < konstantin.anan...@huawei.com> wrote: > Personally, I don't see much profit in such refactoring. > Then, please drop this patch. I gave room for other people to react, none came up. Thanks for your feedback, Ariel > > > 2.30.2

RE: [PATCH v4 0/4] Introduce Topology NUMA grouping for lcores

2025-02-13 Thread Morten Brørup
> From: Thomas Monjalon [mailto:tho...@monjalon.net] > Sent: Thursday, 13 February 2025 09.34 > > 13/02/2025 04:09, Varghese, Vipin: > > [AMD Official Use Only - AMD Internal Distribution Only] > > > > Adding Thomas and Ajit to the loop. > > > > Hi Ajit, we have been using the patch series for ide

Re: [PATCH v4 0/4] Introduce Topology NUMA grouping for lcores

2025-02-13 Thread Thomas Monjalon
13/02/2025 04:09, Varghese, Vipin: > [AMD Official Use Only - AMD Internal Distribution Only] > > Adding Thomas and Ajit to the loop. > > Hi Ajit, we have been using the patch series for identifying the topology and > getting l3 cache id for populating the steering tag for Device Specific Model

[PATCH 2/2] net/mlx5/hws: add DROP action to multi destination actions

2025-02-13 Thread Gregory Etelson
From: Tamar Mashiah Add DROP action to multi destination actions, set NOP destination type when DROP is specified. cc: sta...@dpdk.org Signed-off-by: Tamar Mashiah --- drivers/net/mlx5/hws/mlx5dr_action.c | 4 drivers/net/mlx5/hws/mlx5dr_cmd.c| 4 2 files changed, 8 insertions(+

[PATCH 1/2] net/mlx5: add DROP destination to mirror clone actions

2025-02-13 Thread Gregory Etelson
From: Tamar Mashiah Add DROP destination to mirror clone actions. cc: sta...@dpdk.org Signed-off-by: Tamar Mashiah --- .mailmap| 1 + drivers/common/mlx5/mlx5_prm.h | 1 + drivers/net/mlx5/mlx5_flow_hw.c | 5 + 3 files changed, 7 insertions(+) diff --git a/.mailm