Re: [PATCH v2] vhost: cleanup resubmit info before inflight setup

2024-05-21 Thread Haoqian He
> 2024年4月26日 19:09,Haoqian He 写道: > > This patch fixes a potential VM hang bug when the VM reboots after > vhost live recovery due to missing cleanup virtqueue resubmit info. > > Specifically, if inflight IO that should be resubmitted during > the latest vhost reconnection has not been submitt

Re: [PATCH 0/8] refactor logic to support secondary process

2024-05-21 Thread Ferruh Yigit
On 5/21/2024 3:17 AM, Chaoyong He wrote: >> On 4/19/2024 6:23 AM, Chaoyong He wrote: >>> Refactor data structure and related logic to make the secondary >>> process can work as expect. >>> >> >> Hi Chaoyong, >> >> Patchset looks good, but I have a question related to the motivation of >> moving >>

Re: [PATCH v2 0/4] AF_XDP PMD Bugfixes

2024-05-21 Thread Ferruh Yigit
On 5/14/2024 4:34 PM, Stephen Hemminger wrote: > On Tue, 14 May 2024 08:41:51 + > Ciara Loftus wrote: > >> Series of fixes for the AF_XDP PMD. >> >> Ciara Loftus (4): >> net/af_xdp: fix port ID not set in Rx mbuf >> net/af_xdp: fix mbuf alloc failed statistic >> net/af_xdp: fix stats re

RE: [PATCH] net/mlx5: fix Rx Hash queue resource release in sample flow

2024-05-21 Thread Dariusz Sosnowski
> -Original Message- > From: Jiawei(Jonny) Wang > Sent: Monday, May 20, 2024 17:07 > To: Bing Zhao ; Suanming Mou ; > Dariusz Sosnowski ; Slava Ovsiienko > ; Ori Kam ; Matan Azrad > > Cc: dev@dpdk.org; Raslan Darawsheh ; sta...@dpdk.org > Subject: [PATCH] net/mlx5: fix Rx Hash queue resou

RE: [PATCH 0/8] refactor logic to support secondary process

2024-05-21 Thread Chaoyong He
> On 5/21/2024 3:17 AM, Chaoyong He wrote: > >> On 4/19/2024 6:23 AM, Chaoyong He wrote: > >>> Refactor data structure and related logic to make the secondary > >>> process can work as expect. > >>> > >> > >> Hi Chaoyong, > >> > >> Patchset looks good, but I have a question related to the motivatio

Re: [External] Re: [RFC PATCH] eal/riscv: add support for zawrs extension

2024-05-21 Thread Punit Agrawal
Stanisław Kardach writes: > On Thu, May 2, 2024 at 4:44 PM Daniel Gregory > wrote: >> >> The zawrs extension adds a pair of instructions that stall a core until >> a memory location is written to. This patch uses one of them to >> implement RISCV-specific versions of the rte_wait_until_equal_* >

RE: [PATCH v1] net/cpfl: get running host ID for CPFL PMD

2024-05-21 Thread Wani, Shaiq
-Original Message- From: Stephen Hemminger Sent: Monday, May 20, 2024 11:56 PM To: Wani, Shaiq Cc: dev@dpdk.org Subject: Re: [PATCH v1] net/cpfl: get running host ID for CPFL PMD On Mon, 20 May 2024 04:44:15 + Shaiq Wani wrote: > +static uint8_t > +get_running_host_id(void) > +

Re: [PATCH 0/8] refactor logic to support secondary process

2024-05-21 Thread Ferruh Yigit
On 5/21/2024 12:24 PM, Chaoyong He wrote: >> On 5/21/2024 3:17 AM, Chaoyong He wrote: On 4/19/2024 6:23 AM, Chaoyong He wrote: > Refactor data structure and related logic to make the secondary > process can work as expect. > Hi Chaoyong, Patchset looks good, but

Re: [PATCH v12 07/12] net/tap: use libbpf to load new BPF program

2024-05-21 Thread Ferruh Yigit
On 5/21/2024 5:23 AM, Patrick Robb wrote: > On Mon, May 20, 2024 at 1:49 PM Ferruh Yigit wrote: >> >> @Patric, I assume test environment also doesn't have 'libbpf', version: >> '>= 1.0' which we need to test this feature. >> Is it possible to update test environment to justify this dependency? >>

Re: [PATCH v12 04/12] net/tap: validate and setup parameters for BPF RSS

2024-05-21 Thread Ferruh Yigit
On 5/21/2024 3:01 AM, Stephen Hemminger wrote: > On Mon, 20 May 2024 18:47:08 +0100 > Ferruh Yigit wrote: > >>> + >>> >> >> Why 'rte_convert_rss_key()' is required? Is this making an assumption on >> the CPU architecture? > > > What is happening here is that the key passed in is in cpu native

Re: [PATCH v13 00/11] net/tap: make RSS work again

2024-05-21 Thread Ferruh Yigit
On 5/21/2024 3:47 AM, Stephen Hemminger wrote: > The support of doing RSS for rte_flow_action was a cool idea > but it has been broken for several releases of DPDK as the > underlying kernel and BPF infrastructure changed. > > This series cleans up the BPF program, implements several > features th

Re: [PATCH v12 07/12] net/tap: use libbpf to load new BPF program

2024-05-21 Thread Patrick Robb
On Tue, May 21, 2024 at 9:47 AM Ferruh Yigit wrote: > > > If we can have an Ubuntu 24.04 environment, this addresses the libbpf > testing concern. > > @Christian can comment better, but as far as I can see although upgrade > from previous LTS is not supported yet, it is possible to install Ubuntu

Re: [PATCH v13 00/11] net/tap: make RSS work again

2024-05-21 Thread Ferruh Yigit
On 5/21/2024 3:19 PM, Ferruh Yigit wrote: > On 5/21/2024 3:47 AM, Stephen Hemminger wrote: >> The support of doing RSS for rte_flow_action was a cool idea >> but it has been broken for several releases of DPDK as the >> underlying kernel and BPF infrastructure changed. >> >> This series cleans up t

Re: [PATCH v13 00/11] net/tap: make RSS work again

2024-05-21 Thread Ferruh Yigit
On 5/21/2024 3:35 PM, Ferruh Yigit wrote: > On 5/21/2024 3:19 PM, Ferruh Yigit wrote: >> On 5/21/2024 3:47 AM, Stephen Hemminger wrote: >>> The support of doing RSS for rte_flow_action was a cool idea >>> but it has been broken for several releases of DPDK as the >>> underlying kernel and BPF infra

Re: [PATCH] net/ixgbe: don't create a delayed interrupt handler if one already exists

2024-05-21 Thread Bruce Richardson
On Thu, May 16, 2024 at 01:41:22PM +0200, Burakov, Anatoly wrote: > On 4/18/2024 3:53 PM, edwin.brosse...@6wind.com wrote: > > From: Edwin Brossette > > > > Since link state may need some time to stabilize after a link state > > change, we cannot update the link state right after one occurs. So l

Re: [PATCH v2 0/2] dts: update mypy and clean up

2024-05-21 Thread Luca Vizzarro
On 20/05/2024 16:37, Nicholas Pratte wrote: Ran into no issues with this when testing your port stats and info patch, so I'll provide a tested tag as well. Other than a couple of issues listed in dts-check-format, everything looks good. This patch series should address all of the issues in dts

Re: [PATCH v2 5/5] dts: add `show port stats` command to TestPmdShell

2024-05-21 Thread Luca Vizzarro
On 20/05/2024 15:26, Nicholas Pratte wrote: I've been running some local tests using a mock test suite. Each method you created generates output as expected, but show_port_stats_all() is printing out an empty list; I'm not sure this is intentional or not. I don't have much experience with regular

Re: [PATCH v12 07/12] net/tap: use libbpf to load new BPF program

2024-05-21 Thread Aaron Conole
Ferruh Yigit writes: > On 5/21/2024 5:23 AM, Patrick Robb wrote: >> On Mon, May 20, 2024 at 1:49 PM Ferruh Yigit wrote: >>> >>> @Patric, I assume test environment also doesn't have 'libbpf', version: >>> '>= 1.0' which we need to test this feature. >>> Is it possible to update test environment t

Re: [PATCH 0/8] refactor logic to support secondary process

2024-05-21 Thread Ferruh Yigit
On 4/19/2024 6:23 AM, Chaoyong He wrote: > Refactor data structure and related logic to make the secondary process > can work as expect. > > --- > v2: > * Solve the build problem. > --- > > Chaoyong He (8): > net/nfp: fix resource leak of secondary process > net/nfp: fix configuration BAR pro

Re: [PATCH v12 07/12] net/tap: use libbpf to load new BPF program

2024-05-21 Thread Stephen Hemminger
On Tue, 21 May 2024 11:06:59 -0400 Aaron Conole wrote: > > > > If we can have an Ubuntu 24.04 environment, this addresses the libbpf > > testing concern. > > I think it would be good to add as well. 24.04 will be an LTS, so it > should be support for long time. > > > @Christian can comment b

Re: [PATCH v2] net/af_xdp: fix umem map size for zero copy

2024-05-21 Thread Ferruh Yigit
On 5/11/2024 6:26 AM, Frank Du wrote: > The current calculation assumes that the mbufs are contiguous. However, > this assumption is incorrect when the memory spans across a huge page. > Correct to directly read the size from the mempool memory chunks. > > Signed-off-by: Frank Du > Hi Frank, As

Re: [PATCH v12 09/12] net/tap: simplify internals

2024-05-21 Thread Stephen Hemminger
On Mon, 20 May 2024 18:51:37 +0100 Ferruh Yigit wrote: > On 5/2/2024 10:31 PM, Stephen Hemminger wrote: > > The names of Linux network devices are IFNAMSIZ(16) not the > > same as DPDK which has up to 64 characters. Don't need to > > hold onto the whole ifreq to save the remote interface flags. >

Re: [PATCH v12 11/12] net/tap: do not mark queue full as error

2024-05-21 Thread Stephen Hemminger
On Mon, 20 May 2024 18:52:27 +0100 Ferruh Yigit wrote: > On 5/2/2024 10:31 PM, Stephen Hemminger wrote: > > If tap device in kernel returns EAGAIN that means it is full. > > That is not an error. > > > > Signed-off-by: Stephen Hemminger > > --- > > drivers/net/tap/rte_eth_tap.c | 13 --

Re: [RFC PATCH v2] dts: skip test cases based on capabilities

2024-05-21 Thread Luca Vizzarro
On 11/04/2024 09:48, Juraj Linkeš wrote: +def get_capas_rxq( +self, supported_capabilities: MutableSet, unsupported_capabilities: MutableSet +) -> None: +"""Get all rxq capabilities and divide them into supported and unsupported. + +Args: +supported_c

[PATCH v8 0/8] Common statistics routines for SW based PMD's

2024-05-21 Thread Stephen Hemminger
Adds common code for collecting basic statistics used by many SW based PMD's such as af_packet, af_xdp, null, tap and ring. This version uses two counters (current and offset) to implement SMP safe reset on 64 bit platforms; this avoids having to do locked operation in the fast path. On 32 bit pl

[PATCH v8 1/8] eal: generic 64 bit counter

2024-05-21 Thread Stephen Hemminger
This header implements 64 bit counters using atomic operations but with a weak memory ordering so that they are safe against load/store splits on 32 bit platforms. Signed-off-by: Stephen Hemminger Acked-by: Morten Brørup --- lib/eal/include/meson.build | 1 + lib/eal/include/rte_counter.h |

[PATCH v8 2/8] ethdev: add common counters for statistics

2024-05-21 Thread Stephen Hemminger
Introduce common helper routines for keeping track of per-queue statistics in SW PMD's. The code in several drivers had copy/pasted the same code for this, but had common issues with 64 bit counters on 32 bit platforms. Signed-off-by: Stephen Hemminger --- lib/ethdev/ethdev_swstats.c | 101 +

[PATCH v8 3/8] net/af_packet: use generic SW stats

2024-05-21 Thread Stephen Hemminger
Use the new generic SW stats. Add a note about how errors and kernel full should be handled. Signed-off-by: Stephen Hemminger --- drivers/net/af_packet/rte_eth_af_packet.c | 78 +-- 1 file changed, 17 insertions(+), 61 deletions(-) diff --git a/drivers/net/af_packet/rte_eth_

[PATCH v8 4/8] net/af_xdp: use generic SW stats

2024-05-21 Thread Stephen Hemminger
Use common code for all SW stats. Signed-off-by: Stephen Hemminger --- drivers/net/af_xdp/rte_eth_af_xdp.c | 85 - 1 file changed, 22 insertions(+), 63 deletions(-) diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c index 6ba455bb

[PATCH v8 5/8] net/pcap: use generic SW stats

2024-05-21 Thread Stephen Hemminger
Use common statistics for SW drivers. Signed-off-by: Stephen Hemminger --- drivers/net/pcap/pcap_ethdev.c | 100 - 1 file changed, 22 insertions(+), 78 deletions(-) diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c index bfec085045..468

[PATCH v8 6/8] net/ring: use generic SW stats

2024-05-21 Thread Stephen Hemminger
Use generic per-queue infrastructure. Signed-off-by: Stephen Hemminger --- drivers/net/ring/rte_eth_ring.c | 63 +++-- 1 file changed, 20 insertions(+), 43 deletions(-) diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index b16f5d55f2..3

[PATCH v8 7/8] net/tap: use generic SW stats

2024-05-21 Thread Stephen Hemminger
Use new common sw statistics. Signed-off-by: Stephen Hemminger --- drivers/net/tap/rte_eth_tap.c | 75 ++- drivers/net/tap/rte_eth_tap.h | 15 ++- 2 files changed, 16 insertions(+), 74 deletions(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/

[PATCH v8 8/8] net/null: use generic SW stats

2024-05-21 Thread Stephen Hemminger
Use the new common code for statistics. This also fixes the bug that this driver was not accounting for bytes. Signed-off-by: Stephen Hemminger --- drivers/net/null/rte_eth_null.c | 83 + 1 file changed, 21 insertions(+), 62 deletions(-) diff --git a/drivers/net/

[PATCH v14 00/11] net/tap: make RSS work again

2024-05-21 Thread Stephen Hemminger
The support of doing RSS for rte_flow_action was a cool idea but it has been broken for several releases of DPDK as the underlying kernel and BPF infrastructure changed. This series cleans up the BPF program, implements several features that were never completed in the original code and changes

[PATCH v14 01/11] net/tap: fix fd check in flow_isolate

2024-05-21 Thread Stephen Hemminger
The check for receive queue fd in flow_isolate is incorrect. If queue has not been setup then fd will be -1 not 0. Signed-off-by: Stephen Hemminger Acked-by: Ferruh Yigit --- drivers/net/tap/tap_flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/tap/tap_flow.

[PATCH v14 02/11] net/tap: do not duplicate fd's

2024-05-21 Thread Stephen Hemminger
The TAP device can use same file descriptor for both rx and tx queues which reduces the number of fd's required. MP process support passes file descriptors from primary to secondary process; but because of the restriction on max fd's passed RTE_MP_MAX_FD_NUM (8) the TAP device was restricted to on

[PATCH v14 03/11] net/tap: remove unused fields

2024-05-21 Thread Stephen Hemminger
The driver doesn't support these other hash types, and there is no reason to implement these in future. The rss_flows list was set but never used. Signed-off-by: Stephen Hemminger Acked-by: Ferruh Yigit --- drivers/net/tap/rte_eth_tap.h | 4 +--- drivers/net/tap/tap_flow.c| 1 - drivers/net

[PATCH v14 04/11] net/tap: validate and setup parameters for BPF RSS

2024-05-21 Thread Stephen Hemminger
The flow RSS support via BPF was not using the key, or hash type parameters. Which is good because they were never properly setup. Fix the setup and validate the flow parameters, the BPF side gets fixed later. Signed-off-by: Stephen Hemminger --- drivers/net/tap/tap_flow.c | 75

[PATCH v14 05/11] net/tap: do not build flow support if header is out of date

2024-05-21 Thread Stephen Hemminger
The proper place for finding bpf structures and functions is in linux/bpf.h. The original version was trying to workaround the case where the build environment was running on old pre BPF version of Glibc, but the target environment had BPF. Having own private (and divergent) version headers leads

[PATCH v14 06/11] net/tap: rewrite the RSS BPF program

2024-05-21 Thread Stephen Hemminger
Rewrite of the BPF program used to do queue based RSS. Important changes: - uses newer BPF map format BTF - accepts key as parameter rather than constant default - can do L3 or L4 hashing - supports IPv4 options - supports IPv6 extension headers - re

[PATCH v14 07/11] net/tap: use libbpf to load new BPF program

2024-05-21 Thread Stephen Hemminger
There were multiple issues in the RSS queue support in the TAP driver. This required extensive rework of the BPF support. Change the BPF loading to use bpftool to create a skeleton header file, and load with libbpf. The BPF is always compiled from source so less chance that source and instructions

[PATCH v14 09/11] net/tap: simplify internals

2024-05-21 Thread Stephen Hemminger
The names of Linux network devices are IFNAMSIZ(16) not the same as DPDK which has up to 64 characters. Don't need to hold onto the whole ifreq to save the remote interface flags. Make sure packet and byte counters are read once, so that global and per-queue values add up. No need for separate rx_

[PATCH v14 08/11] net/tap: remove no longer used files

2024-05-21 Thread Stephen Hemminger
The BPF api was replaced by use of libbpf. And the BPF instruction header is replaced by the new tap_rss.skel.h which is generated via bpftool. Signed-off-by: Stephen Hemminger --- drivers/net/tap/tap_bpf_api.c | 196 drivers/net/tap/tap_bpf_insns.h | 1741 ---

[PATCH v14 10/11] net/tap: remove extraneous newlines

2024-05-21 Thread Stephen Hemminger
Some log messages contained extra newlines. Signed-off-by: Stephen Hemminger Acked-by: Ferruh Yigit --- drivers/net/tap/rte_eth_tap.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 3614aaf

[PATCH v14 11/11] net/tap: update documentation

2024-05-21 Thread Stephen Hemminger
The driver support of flows has changed and the wording in the guide was awkward. Drop references to DPDK pktgen in this documentation since it is not required, confusing and abandoned. Signed-off-by: Stephen Hemminger --- doc/guides/nics/tap.rst | 274 +++-

Re: [PATCH v2] net/af_xdp: fix umem map size for zero copy

2024-05-21 Thread Ferruh Yigit
On 5/11/2024 6:26 AM, Frank Du wrote: > The current calculation assumes that the mbufs are contiguous. However, > this assumption is incorrect when the memory spans across a huge page. > Correct to directly read the size from the mempool memory chunks. > > Signed-off-by: Frank Du > > --- > v2: >

[PATCH v15 00/11] net/tap: make RSS work again

2024-05-21 Thread Stephen Hemminger
The support of doing RSS for rte_flow_action was a cool idea but it has been broken for several releases of DPDK as the underlying kernel and BPF infrastructure changed. This series cleans up the BPF program, implements several features that were never completed in the original code and changes to

[PATCH v15 01/11] net/tap: fix fd check in flow_isolate

2024-05-21 Thread Stephen Hemminger
The check for receive queue fd in flow_isolate is incorrect. If queue has not been setup then fd will be -1 not 0. Signed-off-by: Stephen Hemminger Acked-by: Ferruh Yigit --- drivers/net/tap/tap_flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/tap/tap_flow.

[PATCH v15 02/11] net/tap: do not duplicate fd's

2024-05-21 Thread Stephen Hemminger
The TAP device can use same file descriptor for both rx and tx queues which reduces the number of fd's required. MP process support passes file descriptors from primary to secondary process; but because of the restriction on max fd's passed RTE_MP_MAX_FD_NUM (8) the TAP device was restricted to on

[PATCH v15 03/11] net/tap: remove unused fields

2024-05-21 Thread Stephen Hemminger
The driver doesn't support these other hash types, and there is no reason to implement these in future. The rss_flows list was set but never used. Signed-off-by: Stephen Hemminger Acked-by: Ferruh Yigit --- drivers/net/tap/rte_eth_tap.h | 4 +--- drivers/net/tap/tap_flow.c| 1 - drivers/net

[PATCH v15 04/11] net/tap: validate and setup parameters for BPF RSS

2024-05-21 Thread Stephen Hemminger
The flow RSS support via BPF was not using the key, or hash type parameters. Which is good because they were never properly setup. Fix the setup and validate the flow parameters, the BPF side gets fixed later. Signed-off-by: Stephen Hemminger --- drivers/net/tap/tap_flow.c | 75

[PATCH v15 05/11] net/tap: do not build flow support if header is out of date

2024-05-21 Thread Stephen Hemminger
The proper place for finding bpf structures and functions is in linux/bpf.h. The original version was trying to workaround the case where the build environment was running on old pre BPF version of Glibc, but the target environment had BPF. Having own private (and divergent) version headers leads

[PATCH v15 06/11] net/tap: rewrite the RSS BPF program

2024-05-21 Thread Stephen Hemminger
Rewrite of the BPF program used to do queue based RSS. Important changes: - uses newer BPF map format BTF - accepts key as parameter rather than constant default - can do L3 or L4 hashing - supports IPv4 options - supports IPv6 extension headers - re

[PATCH v15 07/11] net/tap: use libbpf to load new BPF program

2024-05-21 Thread Stephen Hemminger
There were multiple issues in the RSS queue support in the TAP driver. This required extensive rework of the BPF support. Change the BPF loading to use bpftool to create a skeleton header file, and load with libbpf. The BPF is always compiled from source so less chance that source and instructions

[PATCH v15 09/11] net/tap: simplify internals

2024-05-21 Thread Stephen Hemminger
The names of Linux network devices are IFNAMSIZ(16) not the same as DPDK which has up to 64 characters. Don't need to hold onto the whole ifreq to save the remote interface flags. Make sure packet and byte counters are read once, so that global and per-queue values add up. No need for separate rx_

[PATCH v15 08/11] net/tap: remove no longer used files

2024-05-21 Thread Stephen Hemminger
The BPF api was replaced by use of libbpf. And the BPF instruction header is replaced by the new tap_rss.skel.h which is generated via bpftool. Signed-off-by: Stephen Hemminger --- drivers/net/tap/tap_bpf_api.c | 196 drivers/net/tap/tap_bpf_insns.h | 1741 ---

[PATCH v15 10/11] net/tap: remove extraneous newlines

2024-05-21 Thread Stephen Hemminger
Some log messages contained extra newlines. Signed-off-by: Stephen Hemminger Acked-by: Ferruh Yigit --- drivers/net/tap/rte_eth_tap.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 3614aaf

[PATCH v15 11/11] net/tap: update documentation

2024-05-21 Thread Stephen Hemminger
The driver support of flows has changed and the wording in the guide was awkward. Drop references to DPDK pktgen in this documentation since it is not required, confusing and abandoned. Signed-off-by: Stephen Hemminger --- doc/guides/nics/tap.rst | 274 +++-

[PATCH v9 0/8] Common statistics for SW PMD's

2024-05-21 Thread Stephen Hemminger
Adds common code for collecting basic statistics used by many SW based PMD's such as af_packet, af_xdp, null, tap and ring. This version uses two counters (current and offset) to implement SMP safe reset on 64 bit platforms; this avoids having to do locked operation in the fast path. On 32 bit pl

[PATCH v9 1/8] eal: generic 64 bit counter

2024-05-21 Thread Stephen Hemminger
This header implements 64 bit counters using atomic operations but with a weak memory ordering so that they are safe against load/store splits on 32 bit platforms. Signed-off-by: Stephen Hemminger Acked-by: Morten Brørup --- lib/eal/include/meson.build | 1 + lib/eal/include/rte_counter.h |

[PATCH v9 2/8] ethdev: add common counters for statistics

2024-05-21 Thread Stephen Hemminger
Introduce common helper routines for keeping track of per-queue statistics in SW PMD's. The code in several drivers had copy/pasted the same code for this, but had common issues with 64 bit counters on 32 bit platforms. Signed-off-by: Stephen Hemminger --- lib/ethdev/ethdev_swstats.c | 101 +

[PATCH v9 3/8] net/af_packet: use generic SW stats

2024-05-21 Thread Stephen Hemminger
Use the new generic SW stats. Add a note about how errors and kernel full should be handled. Signed-off-by: Stephen Hemminger --- drivers/net/af_packet/rte_eth_af_packet.c | 78 +-- 1 file changed, 17 insertions(+), 61 deletions(-) diff --git a/drivers/net/af_packet/rte_eth_

[PATCH v9 4/8] net/af_xdp: use generic SW stats

2024-05-21 Thread Stephen Hemminger
Use common code for all SW stats. Signed-off-by: Stephen Hemminger --- drivers/net/af_xdp/rte_eth_af_xdp.c | 85 - 1 file changed, 22 insertions(+), 63 deletions(-) diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c index 6ba455bb

[PATCH v9 5/8] net/pcap: use generic SW stats

2024-05-21 Thread Stephen Hemminger
Use common statistics for SW drivers. Signed-off-by: Stephen Hemminger --- drivers/net/pcap/pcap_ethdev.c | 100 - 1 file changed, 22 insertions(+), 78 deletions(-) diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c index bfec085045..468

[PATCH v9 6/8] net/ring: use generic SW stats

2024-05-21 Thread Stephen Hemminger
Use generic per-queue infrastructure. Signed-off-by: Stephen Hemminger --- drivers/net/ring/rte_eth_ring.c | 63 +++-- 1 file changed, 20 insertions(+), 43 deletions(-) diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index b16f5d55f2..3

[PATCH v9 7/8] net/tap: use generic SW stats

2024-05-21 Thread Stephen Hemminger
Use new common sw statistics. Signed-off-by: Stephen Hemminger --- drivers/net/tap/rte_eth_tap.c | 75 ++- drivers/net/tap/rte_eth_tap.h | 15 ++- 2 files changed, 16 insertions(+), 74 deletions(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/

[PATCH v9 8/8] net/null: use generic SW stats

2024-05-21 Thread Stephen Hemminger
Use the new common code for statistics. This also fixes the bug that this driver was not accounting for bytes. Signed-off-by: Stephen Hemminger --- drivers/net/null/rte_eth_null.c | 83 + 1 file changed, 21 insertions(+), 62 deletions(-) diff --git a/drivers/net/

Re: [PATCH v13 00/11] net/tap: make RSS work again

2024-05-21 Thread Patrick Robb
On Tue, May 21, 2024 at 10:38 AM Ferruh Yigit wrote: > > > Hi Patric, > > I guess './devtools/check-meson.py' checks are missing in the CI, I > don't remember seeing any complain about it in the CI. > > Is it possible to add this task to the CI task-list backlog? > Correct, this script is not run

Re: [PATCH v13 00/11] net/tap: make RSS work again

2024-05-21 Thread Ferruh Yigit
On 5/21/2024 10:23 PM, Patrick Robb wrote: > On Tue, May 21, 2024 at 10:38 AM Ferruh Yigit wrote: >> >> >> Hi Patric, >> >> I guess './devtools/check-meson.py' checks are missing in the CI, I >> don't remember seeing any complain about it in the CI. >> >> Is it possible to add this task to the CI

[PATCH v2] hash: provide crc32 functions based on intrinsics

2024-05-21 Thread Tyler Retzlaff
MSVC does not support inline asm so replace crc32 inline function implementations with intrinsics compatible with all toolchains. Signed-off-by: Tyler Retzlaff --- lib/hash/rte_crc_x86.h | 38 +- 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/

[PATCH v2] hash: provide crc32 functions based on intrinsics

2024-05-21 Thread Tyler Retzlaff
MSVC does not support inline asm so replace crc32 inline function implementations with intrinsics compatible with all toolchains. v2: * just provide inline functions based on intrinsics and remove inline asm versions. Tyler Retzlaff (1): hash: provide crc32 functions based on intrinsi

RE: [PATCH v2] net/af_xdp: fix umem map size for zero copy

2024-05-21 Thread Du, Frank
> -Original Message- > From: Ferruh Yigit > Sent: Wednesday, May 22, 2024 1:58 AM > To: Du, Frank ; dev@dpdk.org; Andrew Rybchenko > ; Morten Brørup > > Cc: Loftus, Ciara ; Burakov, Anatoly > > Subject: Re: [PATCH v2] net/af_xdp: fix umem map size for zero copy > > On 5/11/2024 6:26 AM,

Re: [PATCH v2] hash: provide crc32 functions based on intrinsics

2024-05-21 Thread Stephen Hemminger
On Tue, 21 May 2024 17:02:14 -0700 Tyler Retzlaff wrote: > MSVC does not support inline asm so replace crc32 inline function > implementations with intrinsics compatible with all toolchains. > > Signed-off-by: Tyler Retzlaff > --- always good to remove asm since in tends not to get optimized.

[PATCH v5 00/32] replace use of rte_memcpy() with fixed size

2024-05-21 Thread Stephen Hemminger
The DPDK has a lot of unnecessary usage of rte_memcpy. This patch set replaces cases where rte_memcpy is used with a fixed size constant size. Typical example is: rte_memcpy(mac_addrs, mac.addr_bytes, RTE_ETHER_ADDR_LEN); which can be replaced with: memcpy(mac_addrs, mac.addr_bytes

[PATCH v5 01/32] cocci/rte_memcpy: add script to eliminate fixed size rte_memcpy

2024-05-21 Thread Stephen Hemminger
Rte_memcpy need not be used for the simple case of copying a fix size structure because it is not faster and will hide problems from code analysis tools. Coverity, Fortify and other analyzers special case memcpy() and can find issues that rte_memcpy() will hide. Many platforms use memcpy instead o

[PATCH v5 02/32] eal: replace use of fixed size rte_memcpy

2024-05-21 Thread Stephen Hemminger
Automatically generated by devtools/cocci/rte_memcpy.cocci Signed-off-by: Stephen Hemminger --- lib/eal/common/eal_common_options.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c index e541f079

[PATCH v5 03/32] ethdev: replace uses of rte_memcpy

2024-05-21 Thread Stephen Hemminger
Replace use of rte_memcpy in ethdev. Most of these were fixed size, and the others were not in the fast path. Where possible replace memcpy() with structure assignment which has same effect is type safe. Signed-off-by: Stephen Hemminger ethdev: struct assign --- lib/ethdev/rte_ethdev.c | 12 ++

[PATCH v5 04/32] eventdev: replace use of fixed size rte_memcpy

2024-05-21 Thread Stephen Hemminger
Automatically generated by devtools/cocci/rte_memcpy.cocci Signed-off-by: Stephen Hemminger --- lib/eventdev/rte_event_crypto_adapter.c | 2 +- lib/eventdev/rte_event_dma_adapter.c| 4 ++-- lib/eventdev/rte_event_timer_adapter.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff

[PATCH v5 05/32] cryptodev: replace use of fixed size rte_memcpy

2024-05-21 Thread Stephen Hemminger
Automatically generated by devtools/cocci/rte_memcpy.cocci Signed-off-by: Stephen Hemminger --- lib/cryptodev/rte_cryptodev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c index 886eb7adc4..137525 100644 ---

[PATCH v5 06/32] ip_frag: replace use of fixed size rte_memcpy

2024-05-21 Thread Stephen Hemminger
Automatically generated by devtools/cocci/rte_memcpy.cocci Signed-off-by: Stephen Hemminger --- lib/ip_frag/rte_ipv6_fragmentation.c | 4 +--- lib/ip_frag/rte_ipv6_reassembly.c| 6 ++ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/ip_frag/rte_ipv6_fragmentation.c b/l

[PATCH v5 07/32] net: replace use of fixed size rte_memcpy

2024-05-21 Thread Stephen Hemminger
Automatically generated by devtools/cocci/rte_memcpy.cocci Signed-off-by: Stephen Hemminger --- lib/net/rte_ether.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/net/rte_ether.c b/lib/net/rte_ether.c index f59c20289d..761b38f805 100644 --- a/lib/net/rte_ether.c +++ b/li

[PATCH v5 08/32] lpm: replace use of fixed size rte_memcpy

2024-05-21 Thread Stephen Hemminger
Automatically generated by devtools/cocci/rte_memcpy.cocci Signed-off-by: Stephen Hemminger --- lib/lpm/rte_lpm6.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/lpm/rte_lpm6.c b/lib/lpm/rte_lpm6.c index 46d8f71a2d..242695dd4d 100644 --- a/lib/lpm/rte_lpm6.c +++ b/lib/

[PATCH v5 09/32] node: replace use of fixed size rte_memcpy

2024-05-21 Thread Stephen Hemminger
Automatically generated by devtools/cocci/rte_memcpy.cocci Signed-off-by: Stephen Hemminger --- lib/node/ip6_lookup.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/node/ip6_lookup.c b/lib/node/ip6_lookup.c index 309964f60f..b8e567ccd9 100644 --- a/lib/node/ip6_l

[PATCH v5 10/32] pdcp: replace use of fixed size rte_memcpy

2024-05-21 Thread Stephen Hemminger
Automatically generated by devtools/cocci/rte_memcpy.cocci Signed-off-by: Stephen Hemminger --- lib/pdcp/pdcp_process.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/pdcp/pdcp_process.c b/lib/pdcp/pdcp_process.c index 9b9b881124..6

[PATCH v5 11/32] pipeline: replace use of fixed size rte_memcpy

2024-05-21 Thread Stephen Hemminger
Automatically generated by devtools/cocci/rte_memcpy.cocci Signed-off-by: Stephen Hemminger --- lib/pipeline/rte_table_action.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/pipeline/rte_table_action.c b/lib/pipeline/rte_table_action.c index 87c3e0e2c9..aec84dee

[PATCH v5 12/32] rib: replace use of fixed size rte_memcpy

2024-05-21 Thread Stephen Hemminger
Mostly automatically generated by devtools/cocci/rte_memcpy.cocci The fib/trie.c was relying on headers rte_rib6 -> rte_memcpy -> rte_vect since rib6 is no longer using rte_memcpy need to get rte_vect.h Signed-off-by: Stephen Hemminger --- lib/fib/trie.c | 2 +- lib/rib/rte_rib6.h | 5 +++-

[PATCH v5 13/32] security: replace use of fixed size rte_memcpy

2024-05-21 Thread Stephen Hemminger
Automatically generated by devtools/cocci/rte_memcpy.cocci Signed-off-by: Stephen Hemminger --- lib/security/rte_security.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/security/rte_security.c b/lib/security/rte_security.c index e5c862f5f5..28d59ef388 100644 --- a/

[PATCH v5 14/32] bus: remove unneeded rte_memcpy.h include

2024-05-21 Thread Stephen Hemminger
Included here but never used. Signed-off-by: Stephen Hemminger --- drivers/bus/auxiliary/linux/auxiliary.c | 1 - drivers/bus/fslmc/fslmc_bus.c| 1 - drivers/bus/fslmc/fslmc_vfio.c | 1 - drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c | 1 - drivers/bus/fslmc/portal/dpaa2_hw_dpc

[PATCH v5 15/32] raw: replace use of fixed size rte_memcpy

2024-05-21 Thread Stephen Hemminger
Automatically generated by devtools/cocci/rte_memcpy.cocci Signed-off-by: Stephen Hemminger --- drivers/raw/ifpga/afu_pmd_he_hssi.c | 3 +-- drivers/raw/ifpga/afu_pmd_he_lpbk.c | 3 +-- drivers/raw/ifpga/afu_pmd_he_mem.c | 3 +-- drivers/raw/ifpga/afu_pmd_n3000.c

[PATCH v5 16/32] baseband: replace use of fixed size rte_memcpy

2024-05-21 Thread Stephen Hemminger
Automatically generated by devtools/cocci/rte_memcpy.cocci Signed-off-by: Stephen Hemminger --- drivers/baseband/acc/rte_acc100_pmd.c | 16 +++- drivers/baseband/acc/rte_vrb_pmd.c | 21 ++--- drivers/baseband/la12xx/bbdev_la12xx.c | 4 ++-- 3 files changed, 19 i

[PATCH v5 17/32] common: replace use of fixed size rte_memcpy

2024-05-21 Thread Stephen Hemminger
Automatically generated by devtools/cocci/rte_memcpy.cocci Also, remove unnecessary includes of rte_memcpy.h Signed-off-by: Stephen Hemminger --- drivers/common/idpf/idpf_common_device.c | 4 ++-- drivers/common/idpf/idpf_common_virtchnl.c | 10 ++ drivers/common/qat/qat_qp.c

[PATCH v5 18/32] crypto: replace use of fixed size rte_memcpy

2024-05-21 Thread Stephen Hemminger
Automatically generated by devtools/cocci/rte_memcpy.cocci Signed-off-by: Stephen Hemminger Acked-by: Hemant Agrawal --- drivers/crypto/ccp/ccp_crypto.c | 14 ++--- drivers/crypto/cnxk/cnxk_cryptodev_ops.c | 2 +- drivers/crypto/cnxk/cnxk_se.h | 2 +- driver

[PATCH v5 19/32] event: replace use of fixed size rte_memcpy

2024-05-21 Thread Stephen Hemminger
Automatically generated by devtools/cocci/rte_memcpy.cocci Also, remove unnecessary includes of rte_memcpy.h Signed-off-by: Stephen Hemminger --- drivers/event/cnxk/cnxk_eventdev_selftest.c | 1 - drivers/event/cnxk/cnxk_tim_evdev.c | 4 ++-- drivers/event/dlb2/dlb2.c

[PATCH v5 20/32] mempool: replace use of fixed size rte_memcpy

2024-05-21 Thread Stephen Hemminger
Automatically generated by devtools/cocci/rte_memcpy.cocci Signed-off-by: Stephen Hemminger Acked-by: Hemant Agrawal --- drivers/mempool/dpaa/dpaa_mempool.c | 4 ++-- drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/

[PATCH v5 21/32] ml/cnxk: replace use of fixed size rte_memcpy

2024-05-21 Thread Stephen Hemminger
Automatically generated by devtools/cocci/rte_memcpy.cocci Signed-off-by: Stephen Hemminger --- drivers/ml/cnxk/cn10k_ml_model.c | 8 +--- drivers/ml/cnxk/cn10k_ml_ops.c | 11 +++ drivers/ml/cnxk/cnxk_ml_ops.c| 2 +- drivers/ml/cnxk/mvtvm_ml_model.c | 8 +--- drivers/ml/

[PATCH v5 22/32] app/test-pmd: replace use of fixed size rte_memcpy

2024-05-21 Thread Stephen Hemminger
Automatically generated by devtools/cocci/rte_memcpy.cocci Signed-off-by: Stephen Hemminger --- app/test-pmd/cmdline.c | 48 ++--- app/test-pmd/cmdline_flow.c | 24 +-- app/test-pmd/config.c | 8 +++ app/test-pmd/csumonly.c | 1

[PATCH v5 24/32] app/test-eventdev: replace use of fixed size rte_memcpy

2024-05-21 Thread Stephen Hemminger
Automatically generated by devtools/cocci/rte_memcpy.cocci Signed-off-by: Stephen Hemminger --- app/test-eventdev/test_pipeline_common.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pip

[PATCH v5 23/32] app/graph: replace use of fixed size rte_memcpy

2024-05-21 Thread Stephen Hemminger
Automatically generated by devtools/cocci/rte_memcpy.cocci Signed-off-by: Stephen Hemminger --- app/graph/neigh.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/graph/neigh.c b/app/graph/neigh.c index 79fd542c89..77f0766133 100644 --- a/app/graph/neigh.c +++ b/ap

[PATCH v5 25/32] app/test: replace use of fixed size rte_memcpy

2024-05-21 Thread Stephen Hemminger
Automatically generated by devtools/cocci/rte_memcpy.cocci Signed-off-by: Stephen Hemminger --- app/test/commands.c | 1 - app/test/packet_burst_generator.c | 4 +-- app/test/test_crc.c | 5 ++-- app/test/test_cryptodev.c | 18 ++

[PATCH v5 26/32] app/test-pipeline: remove unused rte_memcpy.h include

2024-05-21 Thread Stephen Hemminger
This included but never used here. Signed-off-by: Stephen Hemminger --- app/test-pipeline/config.c | 1 - app/test-pipeline/init.c| 1 - app/test-pipeline/main.c| 1 - app/test-pipeline/runtime.c | 1 - 4 files changed, 4 deletions(-) diff --git a/app/test-pipeline/config.c b/app/test-

  1   2   >