Re: Thread priority for background tasks

2025-04-30 Thread Stephen Hemminger
On Wed, 30 Apr 2025 20:40:52 +0200 Morten Brørup wrote: > There are only two thread priorities in the enum rte_thread_priority: Normal > and Real-time Critical. > > I would like to poll ethdev counters, collect garbage and perform other > jitter non-sensitive tasks in a control thread with low

Thread priority for background tasks

2025-04-30 Thread Morten Brørup
There are only two thread priorities in the enum rte_thread_priority: Normal and Real-time Critical. I would like to poll ethdev counters, collect garbage and perform other jitter non-sensitive tasks in a control thread with lower priority than my ordinary control threads, so it will be preempt

Re: [PATCH] rust: RFC/demo of safe API for Dpdk Eal, Eth and Rxq

2025-04-30 Thread Gregory Etelson
Hello Harry, I've been experimenting with lcore workers. Please check out the new helloworld example: https://github.com/getelson-at-mellanox/rdpdk/blob/safe-q/examples/helloworld.rs There are 2 options for the example configuration: 1 Start RDPDK workers on the same cores as EAL: cargo ru

RE: [PATCH v7 2/4] lib: fix comparison between devices

2025-04-30 Thread Shani Peretz
Hey Stephan thanks for the quick reply, I checked the code and also tested and it seems that it won't work because rte_devargs_parse() saves the user provided name in devargs.name without changing it to canonical form. so in the end find_device still receives the short name. We could save it in

Re: Regarding Mellanox bifurcated driver on Azure

2025-04-30 Thread Stephen Hemminger
On Wed, 30 Apr 2025 22:00:29 +0530 Prashant Upadhyaya wrote: > On Wed, 30 Apr 2025 at 19:58, Stephen Hemminger > wrote: > > > On Wed, 30 Apr 2025 13:00:53 +0530 > > Prashant Upadhyaya wrote: > > > > > > With DPDK on Azure, an application should never use the VF directly. > > > > It needs to

Re: Regarding Mellanox bifurcated driver on Azure

2025-04-30 Thread Prashant Upadhyaya
On Wed, 30 Apr 2025 at 19:58, Stephen Hemminger wrote: > On Wed, 30 Apr 2025 13:00:53 +0530 > Prashant Upadhyaya wrote: > > > > With DPDK on Azure, an application should never use the VF directly. > > > It needs to use either netvsc PMD which handles both the vmbus (slow > path) > > > and VF (fa

Re: [PATCH v7 2/4] lib: fix comparison between devices

2025-04-30 Thread Stephen Hemminger
On Wed, 30 Apr 2025 11:12:51 + Shani Peretz wrote: > Hey Stephan, > Apologize for the delayed response and appreciate your assistance. > I prepared a document outlining the bug and its flow, along with the two > solutions we discussed. > I hope this document provides a comprehensive overview

Re: Regarding Mellanox bifurcated driver on Azure

2025-04-30 Thread Stephen Hemminger
On Wed, 30 Apr 2025 13:00:53 +0530 Prashant Upadhyaya wrote: > > With DPDK on Azure, an application should never use the VF directly. > > It needs to use either netvsc PMD which handles both the vmbus (slow path) > > and VF (fast path) combined. Or use the older vdev_netvsc/failsafe/tap > > combi

Re: [PATCH v1 24/25] net/ntnic: avoid possible deadlock

2025-04-30 Thread Stephen Hemminger
On Wed, 30 Apr 2025 15:48:36 +0200 Oleksandr Kolomeiets wrote: > From: Danylo Vodopianov > > Sometimes during high flow learn performance two threads > could cause deadlock using queue and mutex. > > learn_ignored variable sets when flow learn and gets > when flow removes. Hence, learn_ignore

[PATCH v1 03/25] net/ntnic: replace pragma pack with DPDK defined macros

2025-04-30 Thread Oleksandr Kolomeiets
The macros __rte_packed_begin and __rte_packed_end are used instead of #pragma pack(1) when structure or union memory should be minimized. Signed-off-by: Oleksandr Kolomeiets --- drivers/net/ntnic/include/hw_mod_flm_v25.h | 14 ++ drivers/net/ntnic/nthw/core/nthw_spi_v3.c | 15 +

[PATCH v1 22/25] net/ntnic: remove unnecessary memset

2025-04-30 Thread Oleksandr Kolomeiets
From: Danylo Vodopianov 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: Danylo Vodopianov --- drivers/net/ntnic/nthw/core/nthw_hif.c | 5 + drivers/

[PATCH v1 23/25] net/ntnic: add null verification

2025-04-30 Thread Oleksandr Kolomeiets
From: Danylo Vodopianov Add verification on NULL for variables before use it in the memset. Signed-off-by: Danylo Vodopianov --- drivers/net/ntnic/dbsconfig/ntnic_dbsconfig.c | 3 +++ .../link_mgmt/link_100g/nt4ga_link_100g.c | 2 ++ .../net/ntnic/nthw/flow_api/flow_id_table.c| 3

[PATCH v1 25/25] net/ntnic: fix operation with rte ring queue

2025-04-30 Thread Oleksandr Kolomeiets
From: Danylo Vodopianov User should call rte_ring_dequeue_zc_elem_finish to complete the dequeue operation. However this complete step if record absent. This change rework queue read operation. Fixes: 96c8249be53e ("net/ntnic: learn flow queue handling") Signed-off-by: Danylo Vodopianov ---

[PATCH v1 21/25] net/ntnic: remove unnecessary void cast

2025-04-30 Thread Oleksandr Kolomeiets
From: Danylo Vodopianov There is no need to cast memset to void. Signed-off-by: Danylo Vodopianov --- 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 ++-- dr

[PATCH v1 24/25] net/ntnic: avoid possible deadlock

2025-04-30 Thread Oleksandr Kolomeiets
From: Danylo Vodopianov Sometimes during high flow learn performance two threads could cause deadlock using queue and mutex. learn_ignored variable sets when flow learn and gets when flow removes. Hence, learn_ignore should not be protected as far as two thread could not access to the same flow

[PATCH v1 20/25] net/ntnic: avoid divide by zero

2025-04-30 Thread Oleksandr Kolomeiets
From: Danylo Vodopianov Fix CID issue 457736 divide by 0. It was avoided by adding adittional checking on the return value for function. Fixes: effa04693274 ("net/ntnic: add statistics") Signed-off-by: Danylo Vodopianov --- drivers/net/ntnic/nthw/stat/nthw_stat.c | 4 1 file changed, 4 i

[PATCH v1 19/25] net/ntnic: rework array usage

2025-04-30 Thread Oleksandr Kolomeiets
From: Danylo Vodopianov Array usage made more explicitly, avoid pointer arithmetic. Signed-off-by: Danylo Vodopianov --- .../ntnic/link_mgmt/link_agx_100g/nt4ga_agx_link_100g.c | 8 drivers/net/ntnic/ntnic_ethdev.c | 2 +- 2 files changed, 5 insertions(+), 5

[PATCH v1 15/25] net/ntnic: remove redundant initialization

2025-04-30 Thread Oleksandr Kolomeiets
From: Danylo Vodopianov Some variables set twice in the code. Fix host side FEC enablement Signed-off-by: Danylo Vodopianov --- drivers/net/ntnic/nim/i2c_nim.c | 2 +- drivers/net/ntnic/nthw/core/nthw_phy_tile.c | 1 - drivers/net/ntnic/ntnic_vfio.c | 1 - 3 files chan

[PATCH v1 18/25] net/ntnic: remove redundant assignments and branching

2025-04-30 Thread Oleksandr Kolomeiets
From: Danylo Vodopianov Remove double if statement branching as far as it has the same fillings. Signed-off-by: Danylo Vodopianov --- .../link_agx_100g/nt4ga_agx_link_100g.c | 22 ++- .../core/nt200a0x/reset/nthw_fpga_rst9563.c | 1 - drivers/net/ntnic/nthw/nthw_rac.c

[PATCH v1 16/25] net/ntnic: enhance null checks and assertions

2025-04-30 Thread Oleksandr Kolomeiets
From: Danylo Vodopianov Avoid usage before check Signed-off-by: Danylo Vodopianov --- drivers/net/ntnic/adapter/nt4ga_stat/nt4ga_stat.c | 4 ++-- drivers/net/ntnic/dbsconfig/ntnic_dbsconfig.c | 4 ++-- .../net/ntnic/link_mgmt/link_100g/nt4ga_link_100g.c | 2 +- .../link_mgmt/l

[PATCH v1 17/25] net/ntnic: add return value check

2025-04-30 Thread Oleksandr Kolomeiets
From: Danylo Vodopianov Add separate return value verification and logs for function. Signed-off-by: Danylo Vodopianov --- .../nthw/core/nt200a0x/reset/nthw_fpga_rst_nt200a0x.c| 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/net/ntnic/nthw/core/nt200a0x/reset/nthw_fpga

[PATCH v1 08/25] net/ntnic: improve logging format specifiers

2025-04-30 Thread Oleksandr Kolomeiets
From: Danylo Vodopianov Updated logging format specifiers for better consistency and to match the expected data types Signed-off-by: Danylo Vodopianov --- drivers/net/ntnic/adapter/nt4ga_adapter.c | 7 +- drivers/net/ntnic/dbsconfig/ntnic_dbsconfig.c | 2 +- .../link_agx_100g/nt4ga_agx_l

[PATCH v1 14/25] net/ntnic: add handle memory allocation failures

2025-04-30 Thread Oleksandr Kolomeiets
From: Danylo Vodopianov Added checks for `calloc` return values to handle memory allocation failures. Check for null in rpp_lr_nthw_init Signed-off-by: Danylo Vodopianov --- drivers/net/ntnic/nthw/flow_api/flow_group.c | 17 ++-- drivers/net/ntnic/nthw/flow_api/flow_km.c | 4 +++

[PATCH v1 01/25] net/ntnic: remove usage of the variable-length arrays

2025-04-30 Thread Oleksandr Kolomeiets
VLAs with known upper limits are replaced with fixed-length arrays. In case an upper limit of an array cannot be known in advance, the memory for such an array is allocated dynamically using alloca. In comparison to malloc family of functions, the alloca executes faster due to working directly with

[PATCH v1 11/25] net/ntnic: remove usless part of conditional expression

2025-04-30 Thread Oleksandr Kolomeiets
From: Danylo Vodopianov The conditional expressions that always has unchanging state was removed Signed-off-by: Danylo Vodopianov --- drivers/net/ntnic/link_mgmt/link_100g/nt4ga_link_100g.c | 2 +- drivers/net/ntnic/nthw/core/nthw_fpga.c | 4 +--- 2 files changed, 2 insertions(

[PATCH v1 13/25] net/ntnic: add explicitly specificator

2025-04-30 Thread Oleksandr Kolomeiets
From: Danylo Vodopianov Add unsigned long long type to the value to ensure that the value 1 is explicitly treated as a 64-bit unsigned integer. Signed-off-by: Danylo Vodopianov --- .../nthw/flow_api/profile_inline/flow_api_profile_inline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH v1 12/25] net/ntnic: add error logging for hsh

2025-04-30 Thread Oleksandr Kolomeiets
From: Danylo Vodopianov Enhance error logging in hw_db_inline_hsh_deref function to ensure proper handling of HSH RCP preset failures. Signed-off-by: Danylo Vodopianov --- .../nthw/flow_api/profile_inline/flow_api_hw_db_inline.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) di

[PATCH v1 09/25] net/ntnic: remove usless expressions

2025-04-30 Thread Oleksandr Kolomeiets
From: Danylo Vodopianov simplify conditionals and remove redundant checks Signed-off-by: Danylo Vodopianov --- drivers/net/ntnic/dbsconfig/ntnic_dbsconfig.c | 3 +- .../link_agx_100g/nt4ga_agx_link_100g.c | 16 +-- drivers/net/ntnic/nim/i2c_nim.c | 3 +- .../core/

[PATCH v1 10/25] net/ntnic: remove unused code

2025-04-30 Thread Oleksandr Kolomeiets
From: Danylo Vodopianov Remove unused CRC calculation and simplify AVR probe logging. The condition is always false. Signed-off-by: Danylo Vodopianov --- drivers/net/ntnic/nthw/core/nthw_fpga.c | 299 +--- 1 file changed, 11 insertions(+), 288 deletions(-) diff --git a/dri

[PATCH v1 02/25] net/ntnic: handle string truncations when using strlcpy

2025-04-30 Thread Oleksandr Kolomeiets
While strlcpy prevents out-of-bounds access, it allows bugs to remain unnoticed. If unexcepted truncation took place, the respective warning message is emitted. Signed-off-by: Oleksandr Kolomeiets --- drivers/net/ntnic/ntnic_xstats/ntnic_xstats.c | 9 +++-- 1 file changed, 7 insertions(+), 2

[PATCH v1 06/25] net/ntnic: avoid misleading variable names

2025-04-30 Thread Oleksandr Kolomeiets
In the context of the NTNIC driver, the variables named if_index stand for the index of the PHY. However, the term if_index could also refer to the interface index assigned by the OS. To mitigate potential confusion these variables were renamed. Signed-off-by: Oleksandr Kolomeiets --- drivers/ne

[PATCH v1 07/25] net/ntnic: apply packing to the structure

2025-04-30 Thread Oleksandr Kolomeiets
The structure virtq_desc should not contain any paddings, so it has been wrapped with __rte_packed_begin and __rte_packed_end macros. Signed-off-by: Oleksandr Kolomeiets --- drivers/net/ntnic/include/ntnic_virt_queue.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drive

[PATCH v1 04/25] net/ntnic: remove extra memset

2025-04-30 Thread Oleksandr Kolomeiets
The function rte_eth_stats_get fills the structure stats with zeroes before it eventually calls dpdk_stats_collect. That makes the call to memset inside dpdk_stats_collect redundant. Signed-off-by: Oleksandr Kolomeiets --- drivers/net/ntnic/ntnic_ethdev.c | 2 -- 1 file changed, 2 deletions(-)

[PATCH v1 05/25] net/ntnic: include all queues into statistics

2025-04-30 Thread Oleksandr Kolomeiets
Queues with indices greater than or equal to RTE_ETHDEV_QUEUE_STAT_CNTRS are ignored when calculating per-queue statistics, however they should be taken into account for calculating the total. Signed-off-by: Oleksandr Kolomeiets --- drivers/net/ntnic/ntnic_ethdev.c | 32 ++---

[PATCH v1 00/25] net/ntnic: fixes and improvements

2025-04-30 Thread Oleksandr Kolomeiets
* Fix issues detected by static code analyzers CoverityScan and PVS studio - PVS studio: https://inbox.dpdk.org/dev/caoavg170qdnxdfstjcvjhzafy-fs8e98xpba3q8u--wx+k_...@mail.gmail.com/1-a.txt * Fix requested issues mentioned here https://inbox.dpdk.org/dev/20250222134157.73763253@hermes.local/

RE: [PATCH v7 2/4] lib: fix comparison between devices

2025-04-30 Thread Shani Peretz
Hey Stephan, Apologize for the delayed response and appreciate your assistance. I prepared a document outlining the bug and its flow, along with the two solutions we discussed. I hope this document provides a comprehensive overview. Can you take a look? Thank you! https://docs.google.com/docume

[PATCH] net/mlx5: fix flex tunnel validation

2025-04-30 Thread Dariusz Sosnowski
Pattern template validation did not take into account the configured tunnel mode of the flex item. This caused validation failures for templates with flex item registered as tunnel headers. Specifically, any item after such flex item was still considered as outer header, not an inner. This patch f

[PATCH v4 2/2] drivers: add support for IB_BTH header for RSS in cnxk device

2025-04-30 Thread kirankumark
From: Kiran Kumar K Adding support for IB_BTH header for RSS in cnxk device. Signed-off-by: Kiran Kumar K --- drivers/common/cnxk/roc_mbox.h | 1 + drivers/net/cnxk/cnxk_ethdev.c | 3 +++ drivers/net/cnxk/cnxk_ethdev.h | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drive

[PATCH v4 1/2] ethdev: support RSS based on RoCEv2 header

2025-04-30 Thread kirankumark
From: Kiran Kumar K On supporting hardware, RoCEv2 header can be used to perform RSS in the ingress path. Signed-off-by: Kiran Kumar K --- * v4 Changes: - Fix checkpatch issues app/test-pmd/config.c | 5 - doc/guides/rel_notes/release_25_07.rst | 3 +++ lib/ethdev/rte_et

[PATCH v3 2/2] drivers: add support for IB_BTH header for RSS in cnxk device

2025-04-30 Thread kirankumark
From: Kiran Kumar K Adding support for IB_BTH header for RSS in cnxk device. Signed-off-by: Kiran Kumar K --- drivers/common/cnxk/roc_mbox.h | 1 + drivers/net/cnxk/cnxk_ethdev.c | 3 +++ drivers/net/cnxk/cnxk_ethdev.h | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drive

[PATCH v3 1/2] ethdev: support RSS based on RoCEv2 header

2025-04-30 Thread kirankumark
From: Kiran Kumar K On supporting hardware, RoCEv2 header can be used to perform RSS in the ingress path. Signed-off-by: Kiran Kumar K --- V3 Changes: * Adopted review changes related to formating app/test-pmd/config.c | 5 - doc/guides/rel_notes/release_25_07.rst | 3 +++

Re: Regarding Mellanox bifurcated driver on Azure

2025-04-30 Thread Prashant Upadhyaya
On Tue, 29 Apr 2025 at 21:54, Stephen Hemminger wrote: > On Tue, 29 Apr 2025 21:45:36 +0530 > Prashant Upadhyaya wrote: > > > On Mon, 28 Apr 2025 at 21:07, Stephen Hemminger < > step...@networkplumber.org> > > wrote: > > > > > On Mon, 28 Apr 2025 11:31:10 +0530 > > > Prashant Upadhyaya wrote: >

RE: [PATCH] ethdev: remove callback checks from fast path

2025-04-30 Thread Morten Brørup
> From: Sunil Kumar Kori > Sent: Tuesday, 29 April 2025 20.12 > > rte_eth_fp_ops contains ops for fast path APIs. Each API > validates availability of callback and then invoke it. > > Removing these NULL checks instead using dummy callbacks. The description should mention the motivation for thi