RE: [PATCH v4] net/netvsc: fix number Tx queues > Rx queues

2024-05-01 Thread Morten Brørup
> From: Alan Elder [mailto:alan.el...@microsoft.com] > Sent: Monday, 15 April 2024 16.41 > > The previous code allowed the number of Tx queues to be set higher than the > number of Rx queues. If a packet was sent on a Tx queue with index > >= number Rx queues there was a segfault due to accessing

Re: [PATCH] maintainers: update for eal

2024-05-01 Thread Thomas Monjalon
01/05/2024 08:20, Morten Brørup: > > From: Tyler Retzlaff [mailto:roret...@linux.microsoft.com] > > Sent: Tuesday, 30 April 2024 22.52 > > > > Add myself as a maintainer for eal and tests. > > > > Signed-off-by: Tyler Retzlaff > > --- > > Acked-by: Morten Brørup Please write your new baby wit

Re: [RFC] net/ice: Update base code with latest snapshot.

2024-05-01 Thread Thomas Monjalon
Hello Ian, In general, base drivers are updated with multiple commits, one per feature. It helps tracking the changes. Please would it be possible to split? PS: look like you are not registered in the mailing list, this patch was in the moderation queue. 30/04/2024 17:40, Ian Stokes: > The pur

Re: [RFC] net/ice: Update base code with latest snapshot.

2024-05-01 Thread Bruce Richardson
On Wed, May 01, 2024 at 10:19:54AM +0200, Thomas Monjalon wrote: > Hello Ian, > > In general, base drivers are updated with multiple commits, one per feature. > It helps tracking the changes. > > Please would it be possible to split? > Hi Thomas, yes, that is very much the intention. As Ian st

Re: [PATCH] cmdline: configure input buffer size

2024-05-01 Thread Bruce Richardson
On Wed, May 01, 2024 at 08:26:59AM +0300, Gregory Etelson wrote: > DPDK defines cmdline input buffer size to 512 characters. > That buffer size can be too small for long application input. > For example, the following flow template API testpmd command is 444 > bytes long: > ``` > flow queue 0 creat

Re: Run unit tests with C++ too

2024-05-01 Thread Ferruh Yigit
On 4/30/2024 9:57 PM, Patrick Robb wrote: > > > On Tue, Apr 30, 2024 at 4:13 PM Mattias Rönnblom > wrote: > > On 2024-04-30 15:52, Patrick Robb wrote: > > > > > > On Sun, Apr 28, 2024 at 3:46 AM Mattias Rönnblom > mailto:hof...@lysator.liu.se> >

Re: [PATCH] cmdline: configure input buffer size

2024-05-01 Thread Etelson, Gregory
Hello Bruce, Application can set custom cmdline size during DPDK configuration: `meson setup ... -Dc_args='-DRDLINE_CUSTOM_BUF_SIZE=4096' ...` Signed-off-by: Gregory Etelson --- Basic question, what would be the impact of increasing the default from 512 to 1k or 2k? Do we get a large memory

Re: Run unit tests with C++ too

2024-05-01 Thread Bruce Richardson
On Wed, May 01, 2024 at 10:10:57AM +0100, Ferruh Yigit wrote: > On 4/30/2024 9:57 PM, Patrick Robb wrote: > > > > > > On Tue, Apr 30, 2024 at 4:13 PM Mattias Rönnblom > > wrote: > > > > On 2024-04-30 15:52, Patrick Robb wrote: > > > > > > > > > On S

Re: [PATCH v9 1/9] net/tap: do not duplicate fd's

2024-05-01 Thread Ferruh Yigit
On 4/26/2024 4:48 PM, Stephen Hemminger wrote: > The TAP device can use same file descriptopr for both rx and tx queues. > s/descriptopr/descriptor/ > This allows up to 8 queues (versus 4) to be used with secondary process. > > Signed-off-by: Stephen Hemminger <...> > @@ -1141,19 +1132,18 @@

Re: [PATCH v9 5/9] net/tap: rewrite the RSS BPF program

2024-05-01 Thread Ferruh Yigit
On 4/26/2024 4:48 PM, Stephen Hemminger wrote: > Rewrite 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 >

Re: [PATCH v9 0/9] net/tap: fix RSS (BPF) support

2024-05-01 Thread Ferruh Yigit
On 4/26/2024 4:48 PM, 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 > kernel and BPF infrastructure changed. > > This series cleans up the BPF program, implements several > features that were nev

Re: [RFC] net/ice: Update base code with latest snapshot.

2024-05-01 Thread Thomas Monjalon
01/05/2024 11:06, Bruce Richardson: > On Wed, May 01, 2024 at 10:19:54AM +0200, Thomas Monjalon wrote: > > Hello Ian, > > > > In general, base drivers are updated with multiple commits, one per feature. > > It helps tracking the changes. > > > > Please would it be possible to split? > > > > Hi

Re: [PATCH v9 8/9] doc: update documentation of TAP PMD

2024-05-01 Thread Ferruh Yigit
On 4/26/2024 4:48 PM, Stephen Hemminger wrote: > 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 and confusing. > > Signed-off-by: Stephen Hemminger > --- > doc/guides/linux_g

[v2 1/1] docs: af_xdp device plugin repo update

2024-05-01 Thread Maryam Tahhan
Fixup the references to the AF_XDP Device Plugin repo. Fixes: 66a2aca4f512 ("docs: fix AF_XDP device plugin howto") Cc: sta...@dpdk.org Signed-off-by: Maryam Tahhan --- v2: make changes against net-next rather than main --- doc/guides/howto/af_xdp_dp.rst | 14 +++--- doc/guides/nics/af

Re: Run unit tests with C++ too

2024-05-01 Thread Mattias Rönnblom
On 2024-05-01 11:10, Ferruh Yigit wrote: On 4/30/2024 9:57 PM, Patrick Robb wrote: On Tue, Apr 30, 2024 at 4:13 PM Mattias Rönnblom mailto:hof...@lysator.liu.se>> wrote: On 2024-04-30 15:52, Patrick Robb wrote: > > > On Sun, Apr 28, 2024 at 3:46 AM Mattias Rönnblom ma

Re: Run unit tests with C++ too

2024-05-01 Thread Ferruh Yigit
On 5/1/2024 3:14 PM, Mattias Rönnblom wrote: > On 2024-05-01 11:10, Ferruh Yigit wrote: >> On 4/30/2024 9:57 PM, Patrick Robb wrote: >>> >>> >>> On Tue, Apr 30, 2024 at 4:13 PM Mattias Rönnblom >> > wrote: >>> >>> On 2024-04-30 15:52, Patrick Robb wrote: >>>

[DPDK/ethdev Bug 1430] af_xdp: reset stats has no effect on imissed

2024-05-01 Thread bugzilla
https://bugs.dpdk.org/show_bug.cgi?id=1430 Bug ID: 1430 Summary: af_xdp: reset stats has no effect on imissed Product: DPDK Version: 24.03 Hardware: All OS: All Status: UNCONFIRMED Severity: minor

Re: [PATCH] cmdline: configure input buffer size

2024-05-01 Thread Stephen Hemminger
On Wed, 1 May 2024 13:06:47 +0300 (IDT) "Etelson, Gregory" wrote: > > Basic question, what would be the impact of increasing the default from 512 > > to 1k or 2k? Do we get a large memory footprint increase, or is it just an > > extra 1 or 2k of memory used? > > > > /Bruce > > > > Increasing t

Re: Run unit tests with C++ too

2024-05-01 Thread Bruce Richardson
On Wed, May 01, 2024 at 03:38:10PM +0100, Ferruh Yigit wrote: > On 5/1/2024 3:14 PM, Mattias Rönnblom wrote: > > On 2024-05-01 11:10, Ferruh Yigit wrote: > >> On 4/30/2024 9:57 PM, Patrick Robb wrote: > >>> > >>> > >>> On Tue, Apr 30, 2024 at 4:13 PM Mattias Rönnblom >>>

Re: [PATCH v9 0/9] net/tap: fix RSS (BPF) support

2024-05-01 Thread Stephen Hemminger
On Wed, 1 May 2024 12:18:16 +0100 Ferruh Yigit wrote: > Thanks for reviving tap eBPF support, I am for merging this set (as > early as possible). > > But I have two concerns, > 1. Build environment header file dependencies and external library > dependency version changed. Not sure if this will

Re: [PATCH] cmdline: configure input buffer size

2024-05-01 Thread Etelson, Gregory
Hello Stephen, Basic question, what would be the impact of increasing the default from 512 to 1k or 2k? Do we get a large memory footprint increase, or is it just an extra 1 or 2k of memory used? /Bruce Increasing the RDLINE_BUF_SIZE size will also increase application memory usage. However,

[PATCH v10 0/9] net/tap: fix RSS (BPF) flow support

2024-05-01 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 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 use the cu

[PATCH v10 1/9] net/tap: do not duplicate fd's

2024-05-01 Thread Stephen Hemminger
The TAP device can use same file descriptor for both rx and tx queues. This allows up to 8 queues (versus 4) to be used with secondary process. Signed-off-by: Stephen Hemminger --- drivers/net/tap/rte_eth_tap.c | 197 +++--- drivers/net/tap/rte_eth_tap.h | 3 +- dri

[PATCH v10 2/9] net/tap: remove unused fields

2024-05-01 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 --- drivers/net/tap/rte_eth_tap.h | 4 +--- drivers/net/tap/tap_flow.c| 1 - drivers/net/tap/tap_rss.h | 6 -

[PATCH v10 3/9] net/tap: validate and setup parameters for BPF RSS

2024-05-01 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 | 65

[PATCH v10 4/9] net/tap: do not build flow support if header is out of date

2024-05-01 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 v10 5/9] net/tap: rewrite the RSS BPF program

2024-05-01 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 v10 6/9] net/tap: use libbpf to load new BPF program

2024-05-01 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 v10 7/9] net/tap: remove no longer used files

2024-05-01 Thread Stephen Hemminger
The BPF api was replaced by use of libbpf. And the BPF instruction header was replaced by the skeleton. Signed-off-by: Stephen Hemminger --- drivers/net/tap/tap_bpf_api.c | 196 drivers/net/tap/tap_bpf_insns.h | 1741 --- 2 files changed, 1937 deletions(-) de

[PATCH v10 8/9] net/tap: simplify internals

2024-05-01 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 seperate rx_

[PATCH v10 9/9] net/tap: update documentation

2024-05-01 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 and confusing. Signed-off-by: Stephen Hemminger --- doc/guides/nics/tap.rst| 274 +++-- doc/guides/

[PATCH v2 0/3] Improve interactive shell output gathering and logging

2024-05-01 Thread jspewock
From: Jeremy Spewock This version addresses comments from the last and adds an additional improvement to the logging output that comes from interactive shells. The new way of handling logging allows for not only specification of the host that the command is being sent to like before, but also the

[PATCH v2 1/3] dts: Improve output gathering in interactive shells

2024-05-01 Thread jspewock
From: Jeremy Spewock The current implementation of consuming output from interactive shells relies on being able to find an expected prompt somewhere within the output buffer after sending the command. This is useful in situations where the prompt does not appear in the output itself, but in some

[PATCH v2 2/3] dts: Add missing docstring from XML-RPC server

2024-05-01 Thread jspewock
From: Jeremy Spewock When this XML-RPC server implementation was added, the docstring had to be shortened in order to reduce the chances of this race condition being encountered. Now that this race condition issue is resolved, the full docstring can be restored. Signed-off-by: Jeremy Spewock --

[PATCH v2 3/3] dts: Improve logging for interactive shells

2024-05-01 Thread jspewock
From: Jeremy Spewock The messages being logged by interactive shells currently are using the same logger as the node they were created from. Because of this, when sending interactive commands, the logs make no distinction between when you are sending a command directly to the host and when you ar

Re: [RFC v2] net/af_packet: make stats reset reliable

2024-05-01 Thread Ferruh Yigit
On 4/28/2024 4:11 PM, Mattias Rönnblom wrote: > On 2024-04-26 16:38, Ferruh Yigit wrote: >> For stats reset, use an offset instead of zeroing out actual stats >> values, >> get_stats() displays diff between stats and offset. >> This way stats only updated in datapath and offset only updated in stat

Re: [PATCH] net/af_packet: fix statistics

2024-05-01 Thread Ferruh Yigit
On 4/30/2024 4:39 PM, Stephen Hemminger wrote: > The statistics in af_packet driver do not follow the standard > practice of other drivers: > > - Statistics should be maintained as 64 bit even on 32 bit. > ack > - Remove the tx_error counter since it was not correct. >When transmit ring i

Re: [PATCH] cmdline: configure input buffer size

2024-05-01 Thread Bruce Richardson
On Wed, May 01, 2024 at 06:56:37PM +0300, Etelson, Gregory wrote: > Hello Stephen, > > > > > Basic question, what would be the impact of increasing the default from > > > > 512 > > > > to 1k or 2k? Do we get a large memory footprint increase, or is it just > > > > an > > > > extra 1 or 2k of mem

Re: [PATCH] net/af_packet: fix statistics

2024-05-01 Thread Stephen Hemminger
On Wed, 1 May 2024 17:25:59 +0100 Ferruh Yigit wrote: > On 4/30/2024 4:39 PM, Stephen Hemminger wrote: > > The statistics in af_packet driver do not follow the standard > > practice of other drivers: > > > > - Statistics should be maintained as 64 bit even on 32 bit. > > > > ack > > > - R

Re: [PATCH] net/af_packet: fix statistics

2024-05-01 Thread Stephen Hemminger
On Wed, 1 May 2024 17:25:59 +0100 Ferruh Yigit wrote: > > - Do not mark statistics as volatile. > >Instead, READ_ONCE() where necessary. > > > > I did similar [1], and Mattias has some comments on it. > Issue is not in the reader (stats_get) side. Without volatile writer > (datapath thre

Re: [PATCH] net/af_packet: fix statistics

2024-05-01 Thread Stephen Hemminger
On Wed, 1 May 2024 17:25:59 +0100 Ferruh Yigit wrote: > > - Remove the tx_error counter since it was not correct. > >When transmit ring is full it is not an error and > >the driver correctly returns only the number sent. > > > > nack > Transmit full is not only return case here. > Th

[PATCH v2] cmdline: increase input buffer size

2024-05-01 Thread Gregory Etelson
DPDK defines cmdline input buffer size to 512 characters. That buffer size can be too small for long application input. For example, the following flow template API testpmd command is 444 bytes long: ``` flow queue 0 create 0 template_table 1000 \ pattern_template 0 actions_template 0 postpone no

[PATCH v1 1/3] event/dlb2: add support for HW delayed token

2024-05-01 Thread Abdullah Sevincer
In DLB 2.5, hardware assist is available, complementing the Delayed token POP software implementation. When it is enabled, the feature works as follows: It stops CQ scheduling when the inflight limit associated with the CQ is reached. So the feature is activated only if the core is congested. If t

[PATCH v1 0/3] *** DLB2 Enhancements ***

2024-05-01 Thread Abdullah Sevincer
This patchset addresses enhancements made in DLB Driver. Abdullah Sevincer (3): event/dlb2: add support for HW delayed token event/dlb2: add support for dynamic HL entries event/dlb2: enhance DLB credit handling app/test-eventdev/test_perf_common.c | 20 +- drivers/event/dlb2/dlb2.c

[PATCH v1 2/3] event/dlb2: add support for dynamic HL entries

2024-05-01 Thread Abdullah Sevincer
In DLB 2.5, hardware assist is available, complementing the Delayed token POP software implementation. When it is enabled, the feature works as follows: It stops CQ scheduling when the inflight limit associated with the CQ is reached. So the feature is activated only if the core is congested. If t

[PATCH v1 3/3] event/dlb2: enhance DLB credit handling

2024-05-01 Thread Abdullah Sevincer
This commit improves DLB credit handling scenarios when ports hold on to credits but can't release them due to insufficient accumulation (less than 2 * credit quanta). Worker ports now release all accumulated credits when back-to-back zero poll count reaches preset threshold. Producer ports relea

RE: [PATCH] net/af_packet: fix statistics

2024-05-01 Thread Morten Brørup
> From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Wednesday, 1 May 2024 18.45 > > On Wed, 1 May 2024 17:25:59 +0100 > Ferruh Yigit wrote: > > > > - Remove the tx_error counter since it was not correct. > > >When transmit ring is full it is not an error and > > >the d

[PATCH v2 0/3] DLB2 Enhancements

2024-05-01 Thread Abdullah Sevincer
This patchset addresses DLB enhancements in the DLB driver. Abdullah Sevincer (3): event/dlb2: add support for HW delayed token event/dlb2: add support for dynamic HL entries event/dlb2: enhance DLB credit handling app/test-eventdev/test_perf_common.c | 20 +- drivers/event/dlb2/dl

[PATCH v2 1/3] event/dlb2: add support for HW delayed token

2024-05-01 Thread Abdullah Sevincer
In DLB 2.5, hardware assist is available, complementing the Delayed token POP software implementation. When it is enabled, the feature works as follows: It stops CQ scheduling when the inflight limit associated with the CQ is reached. So the feature is activated only if the core is congested. If t

[PATCH v2 2/3] event/dlb2: add support for dynamic HL entries

2024-05-01 Thread Abdullah Sevincer
In DLB 2.5, hardware assist is available, complementing the Delayed token POP software implementation. When it is enabled, the feature works as follows: It stops CQ scheduling when the inflight limit associated with the CQ is reached. So the feature is activated only if the core is congested. If t

[PATCH v2 3/3] event/dlb2: enhance DLB credit handling

2024-05-01 Thread Abdullah Sevincer
This commit improves DLB credit handling scenarios when ports hold on to credits but can't release them due to insufficient accumulation (less than 2 * credit quanta). Worker ports now release all accumulated credits when back-to-back zero poll count reaches preset threshold. Producer ports relea

RE: [PATCH v2] cmdline: increase input buffer size

2024-05-01 Thread Morten Brørup
+CC: Bruce, Stephen > From: Gregory Etelson [mailto:getel...@nvidia.com] > Sent: Wednesday, 1 May 2024 19.18 > > DPDK defines cmdline input buffer size to 512 characters. > That buffer size can be too small for long application input. > For example, the following flow template API testpmd command

[PATCH v3 0/3] DLB2 Enhancements

2024-05-01 Thread Abdullah Sevincer
This patchset addresses DLB enhancements in the DLB driver. Abdullah Sevincer (3): event/dlb2: add support for HW delayed token event/dlb2: add support for dynamic HL entries event/dlb2: enhance DLB credit handling app/test-eventdev/test_perf_common.c | 20 +- drivers/event/dlb2/dl

[PATCH v3 1/3] event/dlb2: add support for HW delayed token

2024-05-01 Thread Abdullah Sevincer
In DLB 2.5, hardware assist is available, complementing the Delayed token POP software implementation. When it is enabled, the feature works as follows: It stops CQ scheduling when the inflight limit associated with the CQ is reached. So the feature is activated only if the core is congested. If t

[PATCH v3 2/3] event/dlb2: add support for dynamic HL entries

2024-05-01 Thread Abdullah Sevincer
In DLB 2.5, hardware assist is available, complementing the Delayed token POP software implementation. When it is enabled, the feature works as follows: It stops CQ scheduling when the inflight limit associated with the CQ is reached. So the feature is activated only if the core is congested. If t

[PATCH v3 3/3] event/dlb2: enhance DLB credit handling

2024-05-01 Thread Abdullah Sevincer
This commit improves DLB credit handling scenarios when ports hold on to credits but can't release them due to insufficient accumulation (less than 2 * credit quanta). Worker ports now release all accumulated credits when back-to-back zero poll count reaches preset threshold. Producer ports relea

[PATCH v4 0/3] DLB2 Enhancements

2024-05-01 Thread Abdullah Sevincer
This patchset addresses DLB enhancements in the DLB driver. Abdullah Sevincer (3): event/dlb2: add support for HW delayed token event/dlb2: add support for dynamic HL entries event/dlb2: enhance DLB credit handling app/test-eventdev/test_perf_common.c | 20 +- drivers/event/dlb2/dl

[PATCH v4 1/3] event/dlb2: add support for HW delayed token

2024-05-01 Thread Abdullah Sevincer
In DLB 2.5, hardware assist is available, complementing the Delayed token POP software implementation. When it is enabled, the feature works as follows: It stops CQ scheduling when the inflight limit associated with the CQ is reached. So the feature is activated only if the core is congested. If t

[PATCH v4 2/3] event/dlb2: add support for dynamic HL entries

2024-05-01 Thread Abdullah Sevincer
In DLB 2.5, hardware assist is available, complementing the Delayed token POP software implementation. When it is enabled, the feature works as follows: It stops CQ scheduling when the inflight limit associated with the CQ is reached. So the feature is activated only if the core is congested. If t

[PATCH v4 3/3] event/dlb2: enhance DLB credit handling

2024-05-01 Thread Abdullah Sevincer
This commit improves DLB credit handling scenarios when ports hold on to credits but can't release them due to insufficient accumulation (less than 2 * credit quanta). Worker ports now release all accumulated credits when back-to-back zero poll count reaches preset threshold. Producer ports relea

Re: [PATCH v9 1/9] net/tap: do not duplicate fd's

2024-05-01 Thread Stephen Hemminger
On Wed, 1 May 2024 12:13:45 +0100 Ferruh Yigit wrote: > > diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c > > index fa50fe45d7..a78fd50cd4 100644 > > --- a/drivers/net/tap/tap_flow.c > > +++ b/drivers/net/tap/tap_flow.c > > @@ -1595,8 +1595,9 @@ tap_flow_isolate(struct rte_et

[DPDK/ethdev Bug 1431] net/tap: treats kernel device full as error

2024-05-01 Thread bugzilla
https://bugs.dpdk.org/show_bug.cgi?id=1431 Bug ID: 1431 Summary: net/tap: treats kernel device full as error Product: DPDK Version: 24.03 Hardware: All OS: All Status: UNCONFIRMED Severity: normal

[DPDK/ethdev Bug 1432] net/tap: use kernel for TSO offload

2024-05-01 Thread bugzilla
https://bugs.dpdk.org/show_bug.cgi?id=1432 Bug ID: 1432 Summary: net/tap: use kernel for TSO offload Product: DPDK Version: 24.03 Hardware: All OS: All Status: UNCONFIRMED Severity: enhancement P

[PATCH v11 0/9] net/tap fix RSS (BPF) flow support

2024-05-01 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 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 use the cu

[PATCH v11 1/9] net/tap: do not duplicate fd's

2024-05-01 Thread Stephen Hemminger
The TAP device can use same file descriptor for both rx and tx queues. This allows up to 8 queues (versus 4) to be used with secondary process. Bugzilla ID: 1381 Signed-off-by: Stephen Hemminger --- drivers/net/tap/rte_eth_tap.c | 192 ++ drivers/net/tap/rte_eth_t

[PATCH v11 2/9] net/tap: remove unused fields

2024-05-01 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 --- drivers/net/tap/rte_eth_tap.h | 4 +--- drivers/net/tap/tap_flow.c| 1 - drivers/net/tap/tap_rss.h | 6 -

[PATCH v11 3/9] net/tap: validate and setup parameters for BPF RSS

2024-05-01 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 | 65

[PATCH v11 4/9] net/tap: do not build flow support if header is out of date

2024-05-01 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 v11 5/9] net/tap: rewrite the RSS BPF program

2024-05-01 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 v11 6/9] net/tap: use libbpf to load new BPF program

2024-05-01 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 v11 8/9] net/tap: simplify internals

2024-05-01 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 v11 7/9] net/tap: remove no longer used files

2024-05-01 Thread Stephen Hemminger
The BPF api was replaced by use of libbpf. And the BPF instruction header was replaced by the skeleton. Signed-off-by: Stephen Hemminger --- drivers/net/tap/tap_bpf_api.c | 196 drivers/net/tap/tap_bpf_insns.h | 1741 --- 2 files changed, 1937 deletions(-) de

[PATCH v11 9/9] net/tap: update documentation

2024-05-01 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 and confusing. Signed-off-by: Stephen Hemminger --- doc/guides/nics/tap.rst| 274 +++-- doc/guides/

Re: [RFC v2] net/af_packet: make stats reset reliable

2024-05-01 Thread Mattias Rönnblom
On 2024-05-01 18:19, Ferruh Yigit wrote: On 4/28/2024 4:11 PM, Mattias Rönnblom wrote: On 2024-04-26 16:38, Ferruh Yigit wrote: For stats reset, use an offset instead of zeroing out actual stats values, get_stats() displays diff between stats and offset. This way stats only updated in datapath

[RFC v6 1/6] eal: extend bit manipulation functionality

2024-05-01 Thread Mattias Rönnblom
Add functionality to test and modify the value of individual bits in 32-bit or 64-bit words. These functions have no implications on memory ordering, atomicity and does not use volatile and thus does not prevent any compiler optimizations. RFC v6: * Have rte_bit_test() accept const-marked bitset

[RFC v6 2/6] eal: add unit tests for bit operations

2024-05-01 Thread Mattias Rönnblom
Extend bitops tests to cover the rte_bit_[test|set|clear|assign|flip]() functions. The tests are converted to use the test suite runner framework. RFC v6: * Test rte_bit_*test() usage through const pointers. RFC v4: * Remove redundant line continuations. Signed-off-by: Mattias Rönnblom Acked

[RFC v6 3/6] eal: add exactly-once bit access functions

2024-05-01 Thread Mattias Rönnblom
Add test/set/clear/assign/flip functions which prevents certain compiler optimizations and guarantees that program-level memory loads and/or stores will actually occur. These functions are useful when interacting with memory-mapped hardware devices. The "once" family of functions does not promise

[RFC v6 6/6] eal: add unit tests for atomic bit access functions

2024-05-01 Thread Mattias Rönnblom
Extend bitops tests to cover the rte_bit_atomic_*() family of functions. RFC v4: * Add atomicity test for atomic bit flip. RFC v3: * Rename variable 'main' to make ICC happy. Signed-off-by: Mattias Rönnblom Acked-by: Morten Brørup Acked-by: Tyler Retzlaff --- app/test/test_bitops.c | 315 +

[RFC v6 4/6] eal: add unit tests for exactly-once bit access functions

2024-05-01 Thread Mattias Rönnblom
Extend bitops tests to cover the rte_bit_once_*() family of functions. RFC v5: * Atomic bit op implementation moved from this patch to the proper patch in the series. (Morten Brørup) RFC v4: * Remove redundant continuations. Signed-off-by: Mattias Rönnblom Acked-by: Morten Brørup Acked-by

[RFC v6 0/6] Improve EAL bit operations API

2024-05-01 Thread Mattias Rönnblom
This patch set represent an attempt to improve and extend the RTE bitops API, in particular for functions that operate on individual bits. All new functionality is exposed to the user as generic selection macros, delegating the actual work to private (__-marked) static inline functions. Public fun

[RFC v6 5/6] eal: add atomic bit operations

2024-05-01 Thread Mattias Rönnblom
Add atomic bit test/set/clear/assign/flip and test-and-set/clear/assign/flip functions. All atomic bit functions allow (and indeed, require) the caller to specify a memory order. RFC v6: * Have rte_bit_atomic_test() accept const-marked bitsets. RFC v4: * Add atomic bit flip. * Mark macro-gene