Re: [PATCH 1/2] bus/dpaa: fix lock condition during error handling

2024-11-13 Thread Hemant Agrawal
On 13-11-2024 22:18, David Marchand wrote: Hello Hemant, On Wed, Nov 13, 2024 at 5:15 PM Hemant Agrawal wrote: The error handling is missing FQ unlock code. Detected by pvr-studio Bug 89-93: very suspicious synchronization The analyzer issued a pack of V1020 warnings that a resource might re

[PATCH v2 3/3] bus/dpaa: enabling clang thread safety for locks

2024-11-13 Thread Hemant Agrawal
To avoid regressions on this topic, could you look into enabling clang thread safety check? Signed-off-by: David Marchand Signed-off-by: Hemant Agrawal --- drivers/bus/dpaa/base/qbman/qman.c | 35 -- drivers/bus/dpaa/meson.build | 2 -- 2 files changed, 19 ins

[PATCH v2 2/3] examples/l2fwd-event: fix spinlock handling

2024-11-13 Thread Hemant Agrawal
Detected by pvs-studio Bug 89-93: very suspicious synchronization The analyzer issued a pack of V1020 warnings that a resource might remain blocked. Fixes: 080f57bceca4 ("examples/l2fwd-event: add eventdev main loop") Cc: pbhagavat...@marvell.com Cc: sta...@dpdk.org Signed-off-by: Hemant Agrawal

[PATCH v2 1/3] bus/dpaa: fix lock condition during error handling

2024-11-13 Thread Hemant Agrawal
The error handling is missing FQ unlock code. Detected by pvs-studio Bug 89-93: very suspicious synchronization The analyzer issued a pack of V1020 warnings that a resource might remain blocked. Fixes: c47ff048b99a ("bus/dpaa: add QMAN driver core routines") Cc: sta...@dpdk.org Signed-off-by: Hem

RE: rte_fib network order bug

2024-11-13 Thread Morten Brørup
> -Original Message- > From: Medvedkin, Vladimir [mailto:vladimir.medved...@intel.com] > Sent: Wednesday, 13 November 2024 20.39 > To: Robin Jarry; dev@dpdk.org > Subject: RE: rte_fib network order bug > > I think control plane API should work with prefix addresses in CPU byte > order. At

[PATCH v3 3/3] test/graph: fix graph autotest second run test failure

2024-11-13 Thread kirankumark
From: Kiran Kumar K The graph autotest second run test is failing due to the node name is already present in the node list. Adding changes to free nodes at the time of test cleanup. Fixes: 6b89650418fe ("test/graph: add functional tests") Signed-off-by: Kiran Kumar K --- app/test/test_graph.c

[PATCH 3/3] net/cnxk: fix build warnings on ubuntu 24.04

2024-11-13 Thread skori
From: Sunil Kumar Kori Bugzilla ID: 1513 Fixes: 03b152389fb1 ("net/cnxk: add option to enable custom inbound SA") Fixes: 7df4ead35436 ("net/cnxk: support parsing custom SA action") Fixes: 47cca253d605 ("net/cnxk: support Rx inject") Cc: sta...@dpdk.org Signed-off-by: Sunil Kumar Kori --- drive

[PATCH 2/3] regex/cn9k: fix build warnings on ubuntu 24.04

2024-11-13 Thread skori
From: Sunil Kumar Kori Bugzilla ID: 1513 Fixes: 72c00ae9dba7 ("regex/cn9k: use cnxk infrastructure") Cc: sta...@dpdk.org Signed-off-by: Sunil Kumar Kori --- drivers/regex/cn9k/cn9k_regexdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regex/cn9k/cn9k_regexdev.c

[PATCH 1/3] common/cnxk: fix build warnings on ubuntu 24.04

2024-11-13 Thread skori
From: Sunil Kumar Kori Bugzilla ID: 1513 Fixes: 39ac394aa7a8 ("common/cnxk: fix device MSI-X greater than default value") Cc: sta...@dpdk.org Signed-off-by: Sunil Kumar Kori --- drivers/common/cnxk/roc_irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/common/cnx

RE: [EXTERNAL] [PATCH v3 2/2] graph: add alignment to the member of rte_node

2024-11-13 Thread Jerin Jacob
> -Original Message- > From: Huichao Cai > Sent: Wednesday, November 13, 2024 1:06 PM > To: Jerin Jacob ; Kiran Kumar Kokkilagadda > ; Nithin Kumar Dabilpuram > ; yanzhirun_...@163.com > Cc: dev@dpdk.org > Subject: [EXTERNAL] [PATCH v3 2/2] graph: add alignment to the member of > rte_no

RE: Re:RE: Re:RE: [EXTERNAL] [PATCH] graph: optimize graph search when scheduling nodes

2024-11-13 Thread Jerin Jacob
> -Original Message- > From: Huichao Cai > Sent: Wednesday, November 13, 2024 2:52 PM > To: Jerin Jacob > Cc: David Marchand ; Kiran Kumar > Kokkilagadda ; Nithin Kumar Dabilpuram > ; yanzhirun_...@163.com; dev@dpdk.org; > Thomas Monjalon ; Robin Jarry > Subject: Re:RE: Re:RE: [EXTERN

[PATCH v3 1/3] graph: avoid global node ID counter

2024-11-13 Thread kirankumark
From: Kiran Kumar K The node id is determined based on a global variable that is incremented every time a node is created. Adding changes to remove the global counter. Make sure that the node list is always ordered by increasing node ids. When creating a new node, pick a free id which is not allo

RE: [RFC 09/10] app/test-dma-perf: fix parsing of dma address

2024-11-13 Thread Morten Brørup
> + while (*addrs == '\0' && isspace(*addrs)) > addrs++; This is never going to happen. Did you mean ||?

Re: [PATCH 2/2] common/dpaax: do not disable fallthrough warnings

2024-11-13 Thread Hemant Agrawal
On 14-11-2024 06:06, Stephen Hemminger wrote: Fallthrough warnings catch real bugs and should not be disabled. There are warnings in this driver in current build. The commit that added the disable is old, and the problematic code appears to have been already removed. Fixes: 2ab9a9483196 ("cry

Re: [PATCH v1] dts: add time delay to async sniffer callback function

2024-11-13 Thread Patrick Robb
As best as I can tell -1 vs -2 index is not important as they are named args, and using the -2 breaks functionality. But we can chat tomorrow if you don't agree. Applied the v1 + my fixup per my comments above to next-dts.

[PATCH] lib/eal: redefine the name for rte_fbarray_init()

2024-11-13 Thread Congjie Zhou
add the tsc into the name. Signed-off-by: Congjie Zhou --- When multiple secondary processes run in different containers, names identified by PIDs are not unique due to the pid namespace. Add tsc to redefine a unique name. lib/eal/linux/eal_memalloc.c | 5 +++-- 1 file changed, 3 insertions(+)

[PATCH v3 11/11] net/ntnic: remove unnecessary memset

2024-11-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 v3 07/11] compress/octeontx: remove unnecessary memset

2024-11-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 --- drivers/compress/octeontx/otx_zip.c | 1 - driv

[PATCH v3 09/11] net/ntnic: remove unnecessary void cast

2024-11-13 Thread Stephen Hemminger
There is no need to cast memset to void. Signed-off-by: Stephen Hemminger --- drivers/net/ntnic/nim/i2c_nim.c | 2 +- drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.c| 4 ++-- drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.c| 4 ++-- drivers/net/ntnic/nthw/flow_

[PATCH v3 10/11] net/ntnic: check result of malloc

2024-11-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. Signed-off-by: Stephen Hemminger --- drivers/net/ntnic/nthw/nthw_rac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ntnic/nthw/n

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

2024-11-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 --- app/test/test_cmdline_cirbuf.c | 2 -- 1 file changed, 2 deletions(-) diff

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

2024-11-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 --- drivers/crypto/qat/qat_asym.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/crypto/qat/qat_asym.c b/drivers/crypto/q

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

2024-11-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 --- drivers/bus/uacce/uacce.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/bus/uacce/uacce.c

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

2024-11-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. Signed-off-by: Stephen Hemminger --- lib/eal/common/rte_malloc.c | 30 -- lib/eal/include/rte_malloc.h | 18 ++

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

2024-11-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 --- drivers/crypto/qat/qat_sym_session.c | 10 +- 1 file

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

2024-11-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 C++ memset_s

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

2024-11-13 Thread Stephen Hemminger
Just doing memset() on keys is not enough, compiler can optimize it away. Need something with a barrier. Signed-off-by: Stephen Hemminger --- drivers/crypto/qat/qat_sym_session.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/qat/qat_sym_sess

[PATCH v3 00/11] memset security handling

2024-11-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. Most of the places memset was being used like this were bogus; probably some developer debug habit, and can be safely removed. v3

[PATCH v2 2/8] eal: add new secure free function

2024-11-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. Signed-off-by: Stephen Hemminger --- lib/eal/common/rte_malloc.c | 30 -- lib/eal/include/rte_malloc.h | 18 ++

[PATCH v2 4/8] crypto/qat: fix size calculation for memset

2024-11-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 --- drivers/crypto/qat/qat_sym_session.c | 10 +- 1 file

[PATCH v2 0/8] memset security handling

2024-11-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. Most of the places memset was being used like this were bogus; probably some developer debug habit, and can be safely removed. Ste

[PATCH v2 7/8] compress/octeontx: remove unnecessary memset

2024-11-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 --- drivers/compress/octeontx/otx_zip.c | 1 - driv

[PATCH v2 8/8] test: remove unneeded memset

2024-11-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 --- app/test/test_cmdline_cirbuf.c | 2 -- 1 file changed, 2 deletions(-) diff

[PATCH v2 6/8] bus/uacce: remove memset before free

2024-11-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 --- drivers/bus/uacce/uacce.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/bus/uacce/uacce.c

[PATCH v2 5/8] crypto/qat: use secure memset

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

[PATCH v2 3/8] crypto/qat: force zero of keys

2024-11-13 Thread Stephen Hemminger
Just doing memset() on keys is not enough, compiler can optimize it away. Need something with a barrier. Signed-off-by: Stephen Hemminger --- drivers/crypto/qat/qat_sym_session.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/qat/qat_sym_sess

[PATCH v2 1/8] eal: introduce new secure memory fill

2024-11-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 C++ memset_s

[PATCH 3/3] eal: add rte_free_sensative

2024-11-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. Signed-off-by: Stephen Hemminger --- lib/eal/common/rte_malloc.c | 30 -- lib/eal/include/rte_malloc.h | 18 ++

[PATCH 2/3] crypto/qat: use rte_memset_sensative

2024-11-13 Thread Stephen Hemminger
Just doing memset() on keys is not enough, compiler can optimize it away. Need something with a barrier. Signed-off-by: Stephen Hemminger --- drivers/crypto/qat/qat_sym_session.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/qat/qat_sym_sess

[PATCH 0/3] introduce rte_memset_sensative

2024-11-13 Thread Stephen Hemminger
The PVS bug list pointed out a number of places where code is trying to do memset() on sensative data which can be optimized away. Introduce som helpers and example usage. Stephen Hemminger (3): eal: introduce rte_memset_sensative crypto/qat: use rte_memset_sensative eal: add rte_free_sensat

[PATCH 1/3] eal: introduce rte_memset_sensative

2024-11-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 C++ memset_s

Re: [RFC 3/5] bus/uacce: remove memset before free

2024-11-13 Thread fengchengwen
On 2024/11/14 2:56, Stephen Hemminger wrote: > 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 > --- > drivers/bus/uacce/uacce.c | 1 - > 1 file ch

[PATCH 2/2] common/dpaax: do not disable fallthrough warnings

2024-11-13 Thread Stephen Hemminger
Fallthrough warnings catch real bugs and should not be disabled. There are warnings in this driver in current build. The commit that added the disable is old, and the problematic code appears to have been already removed. Fixes: 2ab9a9483196 ("crypto/dpaa2_sec: fix build with GCC 7") Cc: tho...@m

[PATCH 1/2] net/e1000: fix incorrect fallthrough in switch

2024-11-13 Thread Stephen Hemminger
There is an incorrect fallthrough identified by PVS studio. Even though this is in base code it should be fixed, and the warning should be re-enabled to prevent future bugs. Link: https://pvs-studio.com/en/blog/posts/cpp/1183/ Fixes: f2553cb9eba6 ("net/e1000/base: add new I219 devices") Cc: qimin

[PATCH 0/2] fallthrough related handling

2024-11-13 Thread Stephen Hemminger
Fix lack of fallthrough checking and bug in e1000 driver. Stephen Hemminger (2): net/e1000: fix incorrect fallthrough in switch common/dpaax: do not disable fallthrough warnings drivers/common/dpaax/caamflib/rta/operation_cmd.h | 4 drivers/net/e1000/base/e1000_82575.c | 3

[RFC 10/10] app/test: fix operator precedence bug

2024-11-13 Thread Stephen Hemminger
The test loop was much shorter than desired because when MAX_NUM is defined with out paren's the divide operator / takes precedence over shift. But when MAX_NUM is fixed, some tests take too long and have to modified to avoid running over full N^2 space of 1<<20. Note: this is a very old bug, goe

[RFC 09/10] app/test-dma-perf: fix parsing of dma address

2024-11-13 Thread Stephen Hemminger
There was useless loop when looking at the DMA address. It looks like it was meant to skip whitespace before calling strtok. Good time to replace strtok with strtok_r as well. Link: https://pvs-studio.com/en/blog/posts/cpp/1179/ Fixes: 623dc9364dc6 ("app/dma-perf: introduce DMA performance test"

[RFC 08/10] app/test-pmd: avoid potential outside of array reference

2024-11-13 Thread Stephen Hemminger
The order of comparison is wrong, and potentially allows referencing past the array. Link: https://pvs-studio.com/en/blog/posts/cpp/1179/ Fixes: 3e3edab530a1 ("ethdev: add flow quota") Cc: getel...@nvidia.com Signed-off-by: Stephen Hemminger --- app/test-pmd/cmdline_flow.c | 2 +- 1 file change

[RFC 07/10] app/test-pmd: remove redundant condition

2024-11-13 Thread Stephen Hemminger
The loop over policy actions will always exit when it sees the flow end action, so the next check is redundant. Link: https://pvs-studio.com/en/blog/posts/cpp/1179/ Fixes: f29fa2c59b85 ("app/testpmd: support policy actions per color") Cc: haif...@nvidia.com Signed-off-by: Stephen Hemminger ---

[RFC 04/10] app/test: avoid duplicate initialization

2024-11-13 Thread Stephen Hemminger
The event_dev_config initialization had duplicate assignments to the same element. Change to use structure initialization so that compiler will catch this type of bug. Link: https://pvs-studio.com/en/blog/posts/cpp/1179/ Fixes: f8f9d233ea0e ("test/eventdev: add unit tests") Cc: jerin.ja...@cavium

[RFC 06/10] test/eal: fix core check in c flag test

2024-11-13 Thread Stephen Hemminger
The expression for checking which lcore is enabled for 0-7 was wrong (missing case for 6). Link: https://pvs-studio.com/en/blog/posts/cpp/1179/ Fixes: b0209034f2bb ("test/eal: check number of cores before running subtests") Cc: msant...@redhat.com Signed-off-by: Stephen Hemminger --- app/test/t

[RFC 05/10] app/test: fix TLS zero length record

2024-11-13 Thread Stephen Hemminger
The code was duplicating the same condition three times? Reading the commit message, the intention was: Add unit tests to verify the zero len TLS records. Zero len packets are allowed when content type is app data while zero packet length with other content type (such as handshake) wou

[RFC 01/10] app/test: do not duplicate loop variable

2024-11-13 Thread Stephen Hemminger
Do not use same variable for outer and inner loop in bonding test. Since the loop is just freeing the resulting burst use bulk free. Link: https://pvs-studio.com/en/blog/posts/cpp/1179/ Fixes: 92073ef961ee ("bond: unit tests") Cc: declan.dohe...@intel.com Signed-off-by: Stephen Hemminger --- a

[RFC 03/10] app/test: fix paren typo

2024-11-13 Thread Stephen Hemminger
The parenthesis were in the wrong place so that comparison took precedence over assignment in handling IPv6 extension headers. Break up the loop condition to avoid the problem. Link: https://pvs-studio.com/en/blog/posts/cpp/1179/ Fixes: 15ccc647526e ("test/security: test inline reassembly with m

[RFC 02/10] app/test: fix typo in mac address compare

2024-11-13 Thread Stephen Hemminger
The first argument of 'memcmp' function was equal to the second argument. Therefore ASSERT would always be true. Link: https://pvs-studio.com/en/blog/posts/cpp/1179/ Fixes: 92073ef961ee ("bond: unit tests") Cc: declan.dohe...@intel.com Signed-off-by: Stephen Hemminger --- app/test/test_link_bo

[RFC 00/10] unit test bugs

2024-11-13 Thread Stephen Hemminger
Recent blog post from PVS studio referenced lots bugs found by their analyzer against DPDK. This set addresses the ones in the test suite. Stephen Hemminger (10): app/test: do not duplicate loop variable app/test: fix typo in mac address compare app/test: fix paren typo app/test: avoid dup

Re: [PATCH v3 15/50] net/ntnic: add hasher (HSH) flow module

2024-11-13 Thread Stephen Hemminger
On Thu, 10 Oct 2024 16:13:30 +0200 Serhii Iliushyk wrote: > + > +void hsh_nthw_delete(struct hsh_nthw *p) > +{ > + if (p) { > + (void)memset(p, 0, sizeof(*p)); > + free(p); > + } > +} This pattern of memset before free is repeated many times in ntnic and is probl

Re: [PATCH v3 3/4] dts: add per-test-suite configuration

2024-11-13 Thread Dean Marx
> > > On Fri, Nov 8, 2024 at 8:38 AM Luca Vizzarro > wrote: > >> Allow test suites to be configured individually. Moreover enable them to >> implement their own custom configuration. >> >> This solution adds some new complexity to DTS, which is generated source >> code. In order to ensure strong t

Re: [PATCH v8 00/17] modify something as suggested

2024-11-13 Thread Ferruh Yigit
On 11/13/2024 9:28 AM, Howard Wang wrote: > Fix some checkpatch warnings and documentation issues. > > Howard Wang (17): > net/r8169: add PMD driver skeleton > net/r8169: add logging structure > net/r8169: add hardware registers access routines > net/r8169: implement core logic for Tx/Rx >

Re: [PATCH v2] dts: improve statistics

2024-11-13 Thread Patrick Robb
Applied to next-dts, pardon me. :)

Re: [PATCH v5 3/3] dts: add l2fwd test suite

2024-11-13 Thread Patrick Robb
Series applied to next-dts, thanks!

Re: [PATCH v2] dts: improve statistics

2024-11-13 Thread Patrick Robb
Applied with minor rewording of the commit message, thanks. On Wed, Nov 13, 2024 at 2:55 AM Patrick Robb wrote: > Thanks, I've reviewed this and tested it, and I think the results.json is > good. > > This is not a problem, but I am noting here that the 1 value which was > being tracked in the le

RE: rte_fib network order bug

2024-11-13 Thread Medvedkin, Vladimir
I think control plane API should work with prefix addresses in CPU byte order. At least our RTE_IPV4 macro works this way. Also, prefix is an address + prefix length (not the mask), so it is more natural if address is in cpu byte order. Also, I think byte swap should be done on the interface wher

Re: [v2 3/3] examples/l3fwd: enhance valid ports checking

2024-11-13 Thread Stephen Hemminger
On Tue, 6 Aug 2024 09:11:20 +0530 Gagandeep Singh wrote: > The current port ID validation logic in the routes add code has > two issues: > > - It can pass if port ID in route is 31+. > - It silently skips rules with disabled or invalid >port IDs > > This patch is: > - Improving the enab

Re: [PATCH v10] examples/ptp: replace terms master and slave

2024-11-13 Thread Thomas Monjalon
13/11/2024 18:52, Stephen Hemminger: > On Wed, 13 Nov 2024 18:33:15 +0100 > Thomas Monjalon wrote: > > > 24/10/2024 04:06, Ajit Khaparde: > > > On Tue, Oct 22, 2024 at 10:26 AM Ajit Khaparde > > > wrote: > > > > > > > > On Tue, Oct 22, 2024 at 9:39 AM Stephen Hemminger > > > > wrote: > > >

[RFC 2/5] crypto/qat: use secure memset

2024-11-13 Thread Stephen Hemminger
Regular memset maybe removed by compiler if done before a free function. Use the C11 memset_s instead to ensure security parameters are cleared. Signed-off-by: Stephen Hemminger --- drivers/crypto/qat/qat_asym.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/q

[RFC 5/5] test: remove unneeded memset

2024-11-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 --- app/test/test_cmdline_cirbuf.c | 2 -- 1 file changed, 2 deletions(-) diff

[RFC 4/5] compress/octeontx: remove memset before rte_free

2024-11-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 --- drivers/compress/octeontx/otx_zip.c | 1 - driv

[RFC 3/5] bus/uacce: remove memset before free

2024-11-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 --- drivers/bus/uacce/uacce.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/bus/uacce/uacce.c

[RFC 1/5] crypto/qat: fix memset of SHA3 state

2024-11-13 Thread Stephen Hemminger
The memset was always doing 0 bytes since size computed later. PVS studio bug 24-27 Fixes: 3a80d7fb2ecd ("crypto/qat: support SHA3 plain hash") Signed-off-by: Stephen Hemminger --- drivers/crypto/qat/qat_sym_session.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git

[RFC 0/5] Fix memset usage

2024-11-13 Thread Stephen Hemminger
Bruce mentioned recent security scan of DPDK https://pvs-studio.com/en/blog/posts/cpp/1183/ There are some low hanging fruit things that can be easily addressed. Stephen Hemminger (5): crypto/qat: fix memset of SHA3 state crypto/qat: use secure memset bus/uacce: remove memset before

[PATCH v2] dts: add time delay to async sniffer callback function

2024-11-13 Thread Nicholas Pratte
There exists a bug within i40e NICs in which the async sniffer does not catch send packets as a result of the callback function sending packets too quickly before the NICs are ready to start capturing. There could be a multitude of reasons why this happens on these NICs, but for the time being, in

Re: [PATCH v10] examples/ptp: replace terms master and slave

2024-11-13 Thread Stephen Hemminger
On Wed, 13 Nov 2024 18:33:15 +0100 Thomas Monjalon wrote: > 24/10/2024 04:06, Ajit Khaparde: > > On Tue, Oct 22, 2024 at 10:26 AM Ajit Khaparde > > wrote: > > > > > > On Tue, Oct 22, 2024 at 9:39 AM Stephen Hemminger > > > wrote: > > > > > > > > On Fri, 14 Jun 2024 08:41:07 -0700 > > > > St

Re: [PATCH v1] maintainers: update maintainer for DLB Driver

2024-11-13 Thread Thomas Monjalon
13/11/2024 04:04, pravin.pat...@intel.com: > From: Pravin Pathak > > Signed-off-by: Pravin Pathak [...] > Intel DLB2 > -M: Abdullah Sevincer > +M: Pravin Pathak > F: drivers/event/dlb2/ > F: doc/guides/eventdevs/dlb2.rst Acked-by: Abdullah Sevincer Applied, thanks. Note: I don't know wh

[PATCH v4 3/3] fixup! dts: allow to get multiple expected packets

2024-11-13 Thread Luca Vizzarro
--- dts/framework/test_suite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dts/framework/test_suite.py b/dts/framework/test_suite.py index 23fe41a10e..7a75334cfa 100644 --- a/dts/framework/test_suite.py +++ b/dts/framework/test_suite.py @@ -334,7 +334,7 @@ def get_expected

[PATCH v4 2/3] dts: allow to get multiple expected packets

2024-11-13 Thread Luca Vizzarro
At the moment there is only one facility that allows to prepare a packet as it is expected to be received on the traffic generator end. Extend this to allow to prepare multiple packets at the same time. Signed-off-by: Luca Vizzarro Reviewed-by: Paul Szczepanek --- dts/framework/test_suite.py |

Re: [PATCH v10] examples/ptp: replace terms master and slave

2024-11-13 Thread Thomas Monjalon
24/10/2024 04:06, Ajit Khaparde: > On Tue, Oct 22, 2024 at 10:26 AM Ajit Khaparde > wrote: > > > > On Tue, Oct 22, 2024 at 9:39 AM Stephen Hemminger > > wrote: > > > > > > On Fri, 14 Jun 2024 08:41:07 -0700 > > > Stephen Hemminger wrote: > > > > > > > Remove one of the few remaining uses of mast

Re: [PATCH] mempool: enable code to be compiled with MSVC compiler

2024-11-13 Thread Andrew Rybchenko
On 11/13/24 06:08, Morten Brørup wrote: From: Andre Muezerie [mailto:andre...@linux.microsoft.com] Sent: Wednesday, 13 November 2024 02.25 The issues that were preventing mempool from getting compiled with MSVC were fixed, so now it should not be excluded from the build anymore. Signed-off-by:

Re: [PATCH 1/2] bus/dpaa: fix lock condition during error handling

2024-11-13 Thread David Marchand
Hello Hemant, On Wed, Nov 13, 2024 at 5:15 PM Hemant Agrawal wrote: > > The error handling is missing FQ unlock code. > Detected by pvr-studio > Bug 89-93: very suspicious synchronization > The analyzer issued a pack of V1020 warnings that a resource > might remain blocked. > > Fixes: c47ff048b99

[PATCH v4 3/3] dts: add l2fwd test suite

2024-11-13 Thread Luca Vizzarro
Add a basic L2 forwarding test suite which tests the correct functionality of the forwarding facility built-in in the DPDK. The tests are performed with different queues numbers per port. Signed-off-by: Luca Vizzarro Signed-off-by: Thomas Wilks Reviewed-by: Paul Szczepanek Reviewed-by: Dean Ma

[PATCH v4 1/3] dts: allow to get multiple expected packets

2024-11-13 Thread Luca Vizzarro
At the moment there is only one facility that allows to prepare a packet as it is expected to be received on the traffic generator end. Extend this to allow to prepare multiple packets at the same time. Signed-off-by: Luca Vizzarro Reviewed-by: Paul Szczepanek --- dts/framework/test_suite.py |

[PATCH v5 3/3] dts: add l2fwd test suite

2024-11-13 Thread Luca Vizzarro
Add a basic L2 forwarding test suite which tests the correct functionality of the forwarding facility built-in in the DPDK. The tests are performed with different queues numbers per port. Signed-off-by: Luca Vizzarro Signed-off-by: Thomas Wilks Reviewed-by: Paul Szczepanek Reviewed-by: Dean Ma

[PATCH v5 2/3] dts: allow to get multiple expected packets

2024-11-13 Thread Luca Vizzarro
At the moment there is only one facility that allows to prepare a packet as it is expected to be received on the traffic generator end. Extend this to allow to prepare multiple packets at the same time. Signed-off-by: Luca Vizzarro Reviewed-by: Paul Szczepanek Reviewed-by: Dean Marx Reviewed-by

[PATCH v5 1/3] dts: fix adjust L2/L3 addresses behavior

2024-11-13 Thread Luca Vizzarro
The _adjust_addresses function has been updated to both modify the original packets and return new updated copies of them. Having a double behavior even if documented is not intuitive and can lead to bugs. This changes the behavior to solely act on copies, leaving the original packet untouched. F

[PATCH v5 0/3] dts: add l2fwd test suite

2024-11-13 Thread Luca Vizzarro
Hi there, sending in a v5 for l2fwd. v5: - re-sent after error in sending v4 v4: - fixed bug introduced in get_expected_packet v3: - addressed comments for docstrings - make use of @requires - add a get_expected_packet version for multiple packets - fix an inconsistency bug with _adjust_addresses

[PATCH v4 1/3] dts: fix adjust L2/L3 addresses behavior

2024-11-13 Thread Luca Vizzarro
The _adjust_addresses function has been updated to both modify the original packets and return new updated copies of them. Having a double behavior even if documented is not intuitive and can lead to bugs. This changes the behavior to solely act on copies, leaving the original packet untouched. F

[PATCH v4 2/3] dts: add l2fwd test suite

2024-11-13 Thread Luca Vizzarro
Add a basic L2 forwarding test suite which tests the correct functionality of the forwarding facility built-in in the DPDK. The tests are performed with different queues numbers per port. Signed-off-by: Luca Vizzarro Signed-off-by: Thomas Wilks Reviewed-by: Paul Szczepanek Reviewed-by: Dean Ma

[PATCH v4 0/3] dts: add l2fwd test suite

2024-11-13 Thread Luca Vizzarro
Hi there, sending in a v4 for l2fwd. v4: - fixed bug introduced in get_expected_packet v3: - addressed comments for docstrings - make use of @requires - add a get_expected_packet version for multiple packets - fix an inconsistency bug with _adjust_addresses - rebased v2: - added copyright - rebas

[PATCH v2] rcu: shift 64-bit constant to avoid implicit 32 to 64 bit conversion

2024-11-13 Thread Andre Muezerie
../lib/rcu/rte_rcu_qsbr.c(101): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) ../lib/rcu/rte_rcu_qsbr.c(107): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) ../lib/rcu/rte_rcu_qsbr

[DPDK/DTS Bug 1577] dts: Request for memory usage test in CI

2024-11-13 Thread bugzilla
https://bugs.dpdk.org/show_bug.cgi?id=1577 Bug ID: 1577 Summary: dts: Request for memory usage test in CI Product: DPDK Version: unspecified Hardware: All OS: All Status: UNCONFIRMED Severity: normal

[PATCH 2/2] examples/l2fwd-event: fix spinlock handling

2024-11-13 Thread Hemant Agrawal
Detected by pvr-studio Bug 89-93: very suspicious synchronization The analyzer issued a pack of V1020 warnings that a resource might remain blocked. Fixes: 080f57bceca4 ("examples/l2fwd-event: add eventdev main loop") Cc: pbhagavat...@marvell.com Cc: sta...@dpdk.org Signed-off-by: Hemant Agrawal

[PATCH 1/2] bus/dpaa: fix lock condition during error handling

2024-11-13 Thread Hemant Agrawal
The error handling is missing FQ unlock code. Detected by pvr-studio Bug 89-93: very suspicious synchronization The analyzer issued a pack of V1020 warnings that a resource might remain blocked. Fixes: c47ff048b99a ("bus/dpaa: add QMAN driver core routines") Cc: sta...@dpdk.org Signed-off-by: Hem

[PATCH] crypto/openssl: remove unneccessary null free checks

2024-11-13 Thread Stephen Hemminger
The function EVP_PKEY_CTX_free allows NULL parameter (similar to free()). Signed-off-by: Stephen Hemminger --- drivers/crypto/openssl/rte_openssl_pmd.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/

Re: [PATCH v3 2/3] dts: allow to get multiple expected packets

2024-11-13 Thread Patrick Robb
Reviewed-by: Patrick Robb Tested-by: Patrick Robb

Re: [PATCH v3 3/3] dts: add l2fwd test suite

2024-11-13 Thread Patrick Robb
Reviewed-by: Patrick Robb Tested-by: Patrick Robb On Fri, Nov 8, 2024 at 12:01 PM Luca Vizzarro wrote: > Add a basic L2 forwarding test suite which tests the correct > functionality of the forwarding facility built-in in the DPDK. > > The tests are performed with different queues numbers per p

Re: [PATCH v3 1/3] dts: fix adjust L2/L3 addresses behavior

2024-11-13 Thread Patrick Robb
Reviewed-by: Patrick Robb Tested-by: Patrick Robb

Re: [PATCH v3] net/mlx5: fix miniCQEs number calculation

2024-11-13 Thread Raslan Darawsheh
Hi, From: Alexander Kozyrev Sent: Wednesday, November 13, 2024 3:50 PM To: dev@dpdk.org Cc: sta...@dpdk.org; Raslan Darawsheh; Slava Ovsiienko; Matan Azrad; Dariusz Sosnowski; Bing Zhao; Suanming Mou Subject: [PATCH v3] net/mlx5: fix miniCQEs number calculation Use the information from the CQE,

Re: [v4,1/5] raw/gdtc: introduce gdtc raw device driver

2024-11-13 Thread Stephen Hemminger
On Wed, 13 Nov 2024 17:22:57 +0800 (CST) wrote: > Hi Stephen, > > >> +char zxdh_gdma_driver_name[] = "rawdev_zxdh_gdma";>> +char dev_name[] = > >> "zxdh_gdma";>> +>> +uint32_t>> +zxdh_gdma_read_reg(struct rte_rawdev *dev, > >> uint16_t queue_id, uint32_t offset)>> +{>> +struct zxdh_gdma_ra

Re: [PATCH] net/mlx5/hws: fix allocation of STCs

2024-11-13 Thread Raslan Darawsheh
Hi, From: Itamar Gozlan Sent: Tuesday, October 29, 2024 3:24 PM To: Itamar Gozlan; Erez Shitrit; Bing Zhao; NBU-Contact-Thomas Monjalon (EXTERNAL); Suanming Mou; Dariusz Sosnowski; Slava Ovsiienko; Ori Kam; Matan Azrad; Alex Vesker Cc: dev@dpdk.org; sta...@dpdk.org Subject: [PATCH] net/mlx5/hws

[PATCH v8 08/17] net/r8169: add support for PHY configuration

2024-11-13 Thread Howard Wang
This patch is for phy configuration which contains phy power up/down, phy config, ephy config and so on. Signed-off-by: Howard Wang --- drivers/net/r8169/r8169_ethdev.c | 15 +- drivers/net/r8169/r8169_ethdev.h | 6 + drivers/net/r8169/r8169_phy.c| 448 +++ dri

  1   2   >