[PATCH v2 4/4] net/af_xdp: remove unused local statistic

2024-05-14 Thread Ciara Loftus
The rx_dropped statistic is never incremented so its existence is pointless. Remove it. Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD") cc: sta...@dpdk.org Reported-by: Stephen Hemminger Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 2 -- 1 file

[PATCH v2 3/4] net/af_xdp: fix stats reset

2024-05-14 Thread Ciara Loftus
t;net/af_xdp: introduce AF_XDP PMD") cc: sta...@dpdk.org Reported-by: Stephen Hemminger Signed-off-by: Ciara Loftus Acked-by: Maryam Tahhan --- v2: * Removed whitespace in rx_stats struct * Fixed typo in commit message drivers/net/af_xdp/rte_eth_af_xdp.c | 18 -- 1 file c

[PATCH v2 2/4] net/af_xdp: fix mbuf alloc failed statistic

2024-05-14 Thread Ciara Loftus
Failures to allocate mbufs in the receive path were not being accounted for in the ethdev statistics. Fix this. Bugzilla ID: 1429 Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD") cc: sta...@dpdk.org Reported-by: Stephen Hemminger Signed-off-by: Ciara Loftus --- v2: * Fix

[PATCH v2 1/4] net/af_xdp: fix port ID not set in Rx mbuf

2024-05-14 Thread Ciara Loftus
Record the port id in the af_xdp rx queue structure and use it to set the port id of the mbuf of a received packed. Bugzilla ID: 1428 Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD") cc: sta...@dpdk.org Reported-by: Stephen Hemminger Signed-off-by: Ciara Loftus Acked-by: Mar

[PATCH v2 0/4] AF_XDP PMD Bugfixes

2024-05-14 Thread Ciara Loftus
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 reset net/af_xdp: remove unused local statistic drivers/net/af_xdp/rte_eth_af_xdp.c | 30 + 1

[PATCH 3/3] net/af_xdp: Fix stats reset

2024-05-10 Thread Ciara Loftus
t;net/af_xdp: introduce AF_XDP PMD") cc: sta...@dpdk.og Reported-by: Stephen Hemminger Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/

[PATCH 2/3] net/af_xdp: Fix mbuf alloc failed statistic

2024-05-10 Thread Ciara Loftus
Failures to allocate mbufs in the receive path were not being accounted for in the ethdev statistics. Fix this. Bugzilla ID: 1429 Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD") cc: sta...@dpdk.og Reported-by: Stephen Hemminger Signed-off-by: Ciara Loftus --- drivers/

[PATCH 1/3] net/af_xdp: Fix port id not set in rx mbuf

2024-05-10 Thread Ciara Loftus
Record the port id in the af_xdp rx queue structure and use it to set the port id of the mbuf of a received packed. Bugzilla ID: 1428 Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD") cc: sta...@dpdk.og Reported-by: Stephen Hemminger Signed-off-by: Ciara Loftus --- drivers/

[RFC PATCH 3/3] net/af_xdp: use autoconf file instead of cflags

2022-07-21 Thread Ciara Loftus
Generate af_xdp_autoconf.h which contains the different features detected by the meson build instead of using cflags. Suggested-by: Andrew Rybchenko Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/compat.h| 8 +--- drivers/net/af_xdp/meson.build | 15 --- 2 files

[RFC PATCH 2/3] net/af_xdp: determine libbpf version by checking for symbols

2022-07-21 Thread Ciara Loftus
Instead of using pkg-config to query the version of the libbpf library, search for symbols in the library and use their presence or absence to determine what version of the library is being linked. Suggested-by: Andrew Rybchenko Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/meson.build

[RFC PATCH 1/3] net/af_xdp: simplify libbpf version checking in meson

2022-07-21 Thread Ciara Loftus
Test if the libbpf version is >= v0.7.0 at the beginning of the meson build. Later when we want to check if the version is <= v0.6.0 just use the inverse of the first check ie. ! >= v0.7.0. Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/meson.build | 12 ++-- 1 file c

[PATCH v2] net/af_xdp: make compatible with libbpf v0.8.0

2022-06-28 Thread Ciara Loftus
off-by: Ciara Loftus --- v2: * Updated release notes * Removed version limiting to libbpf v0.8.0 --- doc/guides/nics/af_xdp.rst | 3 ++- doc/guides/rel_notes/release_22_07.rst | 4 +++ drivers/net/af_xdp/compat.h| 36 +- drivers/net/af_xdp/meson.bu

[PATCH] net/af_xdp: make compatible with libbpf v0.8.0

2022-06-24 Thread Ciara Loftus
lso prevent linking with libbpf versions > v0.8.0. Signed-off-by: Ciara Loftus --- doc/guides/nics/af_xdp.rst | 3 ++- drivers/net/af_xdp/compat.h | 36 - drivers/net/af_xdp/meson.build | 7 ++ drivers/net/af_xdp/rte_eth_af_xdp.

[PATCH] net/af_xdp: limit libbpf version to <= v0.7.0

2022-06-23 Thread Ciara Loftus
Linking with libbpf v0.8.0 causes deprication warnings. As a temporary measure, prevent linking with libbpf versions v0.8.0 and greater. This limitation should be removed in the future when appropriate compatibility measures are introduced. Signed-off-by: Ciara Loftus --- doc/guides/nics

[PATCH] net/af_xdp: fix shared umem fill queue reserve

2022-03-11 Thread Ciara Loftus
t creation, depending on the refcnt value. The kernel logs will still be seen for the shared umem queues. Fixes: 81fe6720f84f ("net/af_xdp: reserve fill queue before socket create") Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 22 ++

[PATCH] net/af_xdp: update doc with information on queue setup

2022-02-22 Thread Ciara Loftus
queues. In this case, traffic might land on for example queue 18 which means it will never reach the socket. This commit updates the AF_XDP documentation with instructions on how to configure the interface to ensure the traffic will land on queue 0 and thus reach the socket successfully. Signed-off

[PATCH 2/2] net/af_xdp: reserve fill queue before socket create

2022-02-18 Thread Ciara Loftus
are available before creating the socket, instead of after. Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp

[PATCH 1/2] net/af_xdp: ensure xsk is deleted on Rx queue setup error

2022-02-18 Thread Ciara Loftus
nd custom program loading") Cc: sta...@dpdk.org Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c index 6ac710c6bd..5f

[PATCH v2] net/af_xdp: make the PMD compatible with libbpf >= v0.7.0

2022-02-17 Thread Ciara Loftus
libbpf v0.7.0 deprecates the bpf_prog_load function. Use meson to detect if libbpf >= v0.7.0 is linked and if so, use the recommended replacement functions bpf_object__open_file and bpf_object__load. Signed-off-by: Ciara Loftus --- v1 -> v2: * Fix typo in commit message * Fix typo in meson

[PATCH] net/af_xdp: make the PMD compatible with libbpf >= v0.7.0

2022-02-17 Thread Ciara Loftus
libbpf v0.7.0 deprecates the bpf_prog_load function. Use meson to detect if libbpf >= v0.7.0 is linked and if so, use the recommended replacement functions bpf_object__open_file and bpf_oject__load. Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/compat.h |

[PATCH] net/af_xdp: update docs with libxdp requirements and info

2022-02-11 Thread Ciara Loftus
found. Document this requirement. Also, mention that the following logs which are generated on application launch can be ignored: libbpf: elf: skipping unrecognized data section(7) .xdp_run_config libbpf: elf: skipping unrecognized data section(8) xdp_metadata Signed-off-by: Ciara Loftus

[PATCH v4] net/af_xdp: re-enable secondary process support

2022-02-09 Thread Ciara Loftus
AF_XDP rings being assigned by the kernel in the primary process only. However other operations including retrieval of stats are permitted. Signed-off-by: Ciara Loftus --- v3 -> v4: * Rebase to next-net * Reword limitation which requires Rx and Tx to be disabled. v2 -> v3: * Rebase to ne

[PATCH v3] net/af_xdp: re-enable secondary process support

2022-02-08 Thread Ciara Loftus
secondary process is disabled. However other operations including retrieval of stats are permitted. Signed-off-by: Ciara Loftus --- v2 -> v3: * Rebase to next-net * Updated logs to be more specific about multi-process IPC * Free process_private in _close and _remove functions *

[PATCH v2] net/af_xdp: re-enable secondary process support

2022-02-04 Thread Ciara Loftus
secondary process is disabled. However other operations including retrieval of stats are permitted. Signed-off-by: Ciara Loftus --- v1 -> v2: * Rebase to next-net RFC -> v1: * Added newline to af_xdp.rst * Fixed spelling errors * Fixed potential NULL dereference in init_internals * Fixed potentia

[PATCH v3] net/af_xdp: use libxdp if available

2022-01-28 Thread Ciara Loftus
the version of libxdp on the system, so it is necessary that the library is discoverable using pkg-config in order for the PMD to use it. To verify this, you can run: pkg-config --modversion libxdp [1] https://github.com/libbpf/libbpf/commit/277846bc6c15 Signed-off-by: Ciara Loftus --- v3: *

[PATCH v2] net/af_xdp: use libxdp if available

2022-01-24 Thread Ciara Loftus
the version of libxdp on the system, so it is necessary that the library is discoverable using pkg-config in order for the PMD to use it. To verify this, you can run: pkg-config --modversion libxdp [1] https://github.com/libbpf/libbpf/commit/277846bc6c15 Signed-off-by: Ciara Loftus --- v2: *

[PATCH] net/af_xdp: use libxdp if available

2022-01-12 Thread Ciara Loftus
the version of libxdp on the system, so it is necessary that the library is discoverable using pkg-config in order for the PMD to use it. To verify this, you can run: pkg-config --modversion libxdp [1] https://github.com/libbpf/libbpf/commit/277846bc6c15 Signed-off-by: Ciara Loftus --- RFC -&

[PATCH] net/af_xdp: re-enable secondary process support

2022-01-11 Thread Ciara Loftus
secondary process is disabled. However other operations including retrieval of stats are permitted. Signed-off-by: Ciara Loftus --- RFC -> v1: * Added newline to af_xdp.rst * Fixed spelling errors * Fixed potential NULL dereference in init_internals * Fixed potential free of address-of expression

[RFC PATCH] net/af_xdp: reenable secondary process support

2021-12-10 Thread Ciara Loftus
secondary process is disabled. However other operations including retrieval of stats are permitted. Signed-off-by: Ciara Loftus --- doc/guides/nics/af_xdp.rst | 9 ++ doc/guides/nics/features/af_xdp.ini| 1 + doc/guides/rel_notes/release_22_03.rst | 4 + drivers/net/af_xdp

[RFC PATCH] net/af_xdp: use libxdp if available

2021-12-10 Thread Ciara Loftus
prior to v0.7.0 are allowed, as they still contain the required AF_XDP functionality. libbpf still remains a dependency even if libxdp is present, as we use libbpf APIs for program loading. [1] https://github.com/libbpf/libbpf/commit/277846bc6c15 Signed-off-by: Ciara Loftus --- doc/guides/nics

[PATCH] net/af_xdp: fix build with -Wunused-function

2021-12-09 Thread Ciara Loftus
.@dpdk.org Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 121 ++-- 1 file changed, 60 insertions(+), 61 deletions(-) diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c index 96c2c9d939..b3ed704b36 100644 --- a/drivers/

[PATCH 2/2] net/af_xdp: workaround custom program loading issue

2021-11-12 Thread Ciara Loftus
e new bpf link based method. Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 29 ++--- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c index 1c7689c9b4..96c2c9d939

[PATCH 1/2] net/af_xdp: revert use BPF link for XDP programs

2021-11-12 Thread Ciara Loftus
0cc6e893b ("net/af_xdp: use BPF link for XDP programs") Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/compat.h | 124 drivers/net/af_xdp/meson.build | 7 -- drivers/net/af_xdp/rte_eth_af_xdp.c | 13 ++- 3 files changed, 5 insertions(+

[dpdk-dev] [PATCH] net/af_xdp: set the max Rx pktlen value correctly

2021-10-22 Thread Ciara Loftus
etting the max_rx_pktlen equal to the max size of the Ethernet frame as expected, and the max MTU equal to the max_rx_pktlen less the overhead which is set to the size of an Ethernet header plus CRC. Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length") Signed-off-by: Ciara Loftus ---

[dpdk-dev] [PATCH v2] net/af_xdp: use bpf link for XDP programs

2021-10-22 Thread Ciara Loftus
, bpf_link will be used for the AF_XDP netdev. Signed-off-by: Ciara Loftus Signed-off-by: Maciej Fijalkowski --- drivers/net/af_xdp/compat.h | 124 drivers/net/af_xdp/meson.build | 7 ++ drivers/net/af_xdp/rte_eth_af_xdp.c | 13 +-- 3 files ch

[dpdk-dev] [PATCH] net/af_xdp: use bpf link for XDP programs

2021-10-14 Thread Ciara Loftus
, bpf_link will be used for the AF_XDP netdev. Signed-off-by: Ciara Loftus Signed-off-by: Maciej Fijalkowski --- drivers/net/af_xdp/compat.h | 120 drivers/net/af_xdp/meson.build | 7 ++ drivers/net/af_xdp/rte_eth_af_xdp.c | 13 +-- 3 files ch

[dpdk-dev] [PATCH v2] net/af_xdp: disable secondary process support

2021-10-08 Thread Ciara Loftus
using rte_mp_msg to pass the state to the secondary process that it requires in order to work. Bugzilla ID: 805 Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD") Cc: sta...@dpdk.org Signed-off-by: Ciara Loftus Reported-by: Stephen Hemminger --- doc/guides/rel_notes/release_21_1

[dpdk-dev] [PATCH] net/af_xdp: do not attempt probe for secondary processes

2021-09-30 Thread Ciara Loftus
rg Signed-off-by: Ciara Loftus Reported-by: Stephen Hemminger --- drivers/net/af_xdp/rte_eth_af_xdp.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c index 9bea0a895a..d61cb0aa7c 10

[dpdk-dev] [PATCH] net/af_xdp: fix build warning for kernels < 5.4

2021-05-10 Thread Ciara Loftus
. Doing this removes a build warning on kernels before 5.4 which complained about the second function being defined but not used. Fixes: 2aa51cdd559e ("net/af_xdp: fix trigger for syscall on Tx") Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/compat.h

[dpdk-dev] [PATCH 2/2] net/af_xdp: only use recvfrom if busy polling is enabled

2021-04-20 Thread Ciara Loftus
stead of poll syscall") Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/compat.h | 28 ++-- drivers/net/af_xdp/rte_eth_af_xdp.c | 10 +++--- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/drivers/net/af_xdp/compat.h b/drivers/net/af

[dpdk-dev] [PATCH 1/2] net/af_xdp: fix trigger for syscall on tx

2021-04-20 Thread Ciara Loftus
busy polling") Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/compat.h | 14 -- drivers/net/af_xdp/rte_eth_af_xdp.c | 4 ++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/net/af_xdp/compat.h b/drivers/net/af_xdp/compat.h index 545c8aa395..

[dpdk-dev] [PATCH] net/af_xdp: fix unchecked return of recvfrom()

2021-03-25 Thread Ciara Loftus
'void'. Coverity issue: 369671 Fixes: 63e8989fe5a4 ("net/af_xdp: use recvfrom instead of poll syscall") Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/af_xdp/rte_eth_af_xd

[dpdk-dev] [PATCH v3 3/3] net/af_xdp: preferred busy polling

2021-03-10 Thread Ciara Loftus
. Signed-off-by: Ciara Loftus --- doc/guides/nics/af_xdp.rst | 38 ++- doc/guides/rel_notes/release_21_05.rst | 4 + drivers/net/af_xdp/compat.h| 14 +++ drivers/net/af_xdp/rte_eth_af_xdp.c| 135 +++-- 4 files changed, 179 insertions(+),

[dpdk-dev] [PATCH v3 2/3] net/af_xdp: Use recvfrom() instead of poll()

2021-03-10 Thread Ciara Loftus
poll() is more expensive and requires more tuning when used with the upcoming busy polling functionality. Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers

[dpdk-dev] [PATCH v3 1/3] net/af_xdp: allow bigger batch sizes

2021-03-10 Thread Ciara Loftus
rx/tx need to be sized at compile-time. Allowing a larger batch size allows for fewer batches and thus larger bulk operations, fewer ring accesses and fewer syscalls which should yield improved performance. Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_

[dpdk-dev] [PATCH v3 0/3] AF_XDP Preferred Busy Polling

2021-03-10 Thread Ciara Loftus
iour of busy_budget=0 * Ensure we bail out any of the new setsockopts fail [1] https://lwn.net/Articles/837010/ Ciara Loftus (3): net/af_xdp: allow bigger batch sizes net/af_xdp: Use recvfrom() instead of poll() net/af_xdp: preferred busy polling doc/guides/nics/af_xdp.rst |

[dpdk-dev] [PATCH v2 3/3] net/af_xdp: preferred busy polling

2021-03-09 Thread Ciara Loftus
. Signed-off-by: Ciara Loftus --- doc/guides/nics/af_xdp.rst | 38 +++- doc/guides/rel_notes/release_21_05.rst | 4 + drivers/net/af_xdp/compat.h| 14 +++ drivers/net/af_xdp/rte_eth_af_xdp.c| 117 ++--- 4 files changed, 161 insertions(+),

[dpdk-dev] [PATCH v2 2/3] net/af_xdp: Use recvfrom() instead of poll()

2021-03-09 Thread Ciara Loftus
poll() is more expensive and requires more tuning when used with the upcoming busy polling functionality. Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers

[dpdk-dev] [PATCH v2 1/3] net/af_xdp: allow bigger batch sizes

2021-03-09 Thread Ciara Loftus
rx/tx need to be sized at compile-time. Allowing a larger batch size allows for fewer batches and thus larger bulk operations, fewer ring accesses and fewer syscalls which should yield improved performance. Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_

[dpdk-dev] [PATCH v2 0/3] AF_XDP Preferred Busy Polling

2021-03-09 Thread Ciara Loftus
olling via setsockopt instead of using the presence of the flag RFC->v1: * Fixed behaviour of busy_budget=0 * Ensure we bail out any of the new setsockopts fail [1] https://lwn.net/Articles/837010/ Ciara Loftus (3): net/af_xdp: allow bigger batch sizes net/af_xdp: Use recvfrom() instea

[dpdk-dev] [PATCH] net/af_xdp: fix error handling during Rx queue setup

2021-03-01 Thread Ciara Loftus
("net/af_xdp: support unaligned umem chunks") Cc: sta...@dpdk.org Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c index

[dpdk-dev] [PATCH 3/3] net/af_xdp: preferred busy polling

2021-02-24 Thread Ciara Loftus
. Signed-off-by: Ciara Loftus --- doc/guides/nics/af_xdp.rst | 38 - drivers/net/af_xdp/compat.h | 13 + drivers/net/af_xdp/rte_eth_af_xdp.c | 85 - 3 files changed, 121 insertions(+), 15 deletions(-) diff --git a/doc/guides/nics/af_

[dpdk-dev] [PATCH 2/3] net/af_xdp: Use recvfrom() instead of poll()

2021-02-24 Thread Ciara Loftus
poll() is more expensive and requires more tuning when used with the upcoming busy polling functionality. Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers

[dpdk-dev] [PATCH 1/3] net/af_xdp: Increase max batch size to 512

2021-02-24 Thread Ciara Loftus
Prior to this the max size was 32 which was unnecessarily small. Also enforce the max batch size for TX for both copy and zero copy modes. Prior to this only copy mode enforced the max size. Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 8 1 file changed, 4

[dpdk-dev] [PATCH 0/3] AF_XDP Preferred Busy Polling

2021-02-24 Thread Ciara Loftus
FC->v1: * Fixed behaviour of busy_budget=0 * Ensure we bail out if any of the new setsockopts fail [1] https://lwn.net/Articles/837010/ Ciara Loftus (3): net/af_xdp: Increase max batch size to 512 net/af_xdp: Use recvfrom() instead of poll() net/af_xdp: preferred busy polling doc/guid

[dpdk-dev] [PATCH RFC 3/3] net/af_xdp: preferred busy polling

2021-02-18 Thread Ciara Loftus
. Signed-off-by: Ciara Loftus --- doc/guides/nics/af_xdp.rst | 38 +- drivers/net/af_xdp/compat.h | 13 + drivers/net/af_xdp/rte_eth_af_xdp.c | 80 - 3 files changed, 116 insertions(+), 15 deletions(-) diff --git a/doc/guides/nics/af_

[dpdk-dev] [PATCH RFC 2/3] net/af_xdp: Use recvfrom() instead of poll()

2021-02-18 Thread Ciara Loftus
poll() is more expensive and requires more tuning when used with the upcoming busy polling functionality. Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers

[dpdk-dev] [PATCH RFC 1/3] net/af_xdp: Increase max batch size to 512

2021-02-18 Thread Ciara Loftus
Prior to this the max size was 32 which was unnecessarily small. Also enforce the max batch size for TX for both copy and zero copy modes. Prior to this only copy mode enforced the max size. Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 8 1 file changed, 4

[dpdk-dev] [PATCH RFC 0/3] AF_XDP Preferred Busy Polling

2021-02-18 Thread Ciara Loftus
dev=net_af_xdp0,iface=eth0,busy_budget=512 14.32Mpps To disable preferred busy polling: ./dpdk-testpmd --vdev=net_af_xdp0,iface=eth0,busy_budget=0 [1] https://lwn.net/Articles/837010/ Ciara Loftus (3): net/af_xdp: Increase max batch size to 512 net/af_xdp: Use recvfrom() instead of poll

[dpdk-dev] [PATCH v2] net/af_xdp: document 32-bit OS kernel requirement

2020-11-17 Thread Ciara Loftus
AF_XDP will not work on 32-bit kernels before version 5.4. Document this restriction in the driver guide. Signed-off-by: Ciara Loftus --- doc/guides/nics/af_xdp.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/guides/nics/af_xdp.rst b/doc/guides/nics/af_xdp.rst index 052e59a3ae

[dpdk-dev] [PATCH] net/af_xdp: fix 32-bit build for older kernels

2020-11-12 Thread Ciara Loftus
ixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Cc: sta...@dpdk.org Signed-off-by: Ciara Loftus --- doc/guides/nics/af_xdp.rst | 1 + drivers/net/af_xdp/rte_eth_af_xdp.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/guides/

[dpdk-dev] [PATCH v2] net/af_xdp: don't allow umem sharing for xsks with same ctx

2020-10-13 Thread Ciara Loftus
eue=0,shared_umem=1 Supporting this scenario would require locks, which would impact the performance of the more typical cases - xsks with different netdev,qid tuples. Signed-off-by: Ciara Loftus Fixes: 74b46340e2d4 ("net/af_xdp: support shared UMEM") --- v2: * Add doc update * Fix commit messa

[dpdk-dev] [PATCH] net/af_xdp: Don't allow umem sharing for xsks with same netdev, qid

2020-10-08 Thread Ciara Loftus
Supporting this would require locks, which would impact the performance of the more typical cases - xsks with different qids and netdevs. Signed-off-by: Ciara Loftus Fixes: 74b46340e2d4 ("net/af_xdp: support shared UMEM") --- drivers/net/af_xdp/rte_eth_af_

[dpdk-dev] [PATCH v4] net/af_xdp: use rte_strscpy instead of strncpy

2020-10-07 Thread Ciara Loftus
strncpy may leave the destination buffer not NULL terminated so use rte_strscpy instead. Coverity issue: 362975 Fixes: 339b88c6a91f ("net/af_xdp: support multi-queue") Signed-off-by: Ciara Loftus --- v4: * actually use rte_strscpy instead of strlcpy v3: * use rte_strscpy instead of s

[dpdk-dev] [PATCH v3] net/af_xdp: use rte_strscpy instead of strncpy

2020-10-07 Thread Ciara Loftus
strncpy may leave the destination buffer not NULL terminated so use rte_strscpy instead. Coverity issue: 362975 Fixes: 339b88c6a91f ("net/af_xdp: support multi-queue") Signed-off-by: Ciara Loftus --- v3: * use rte_strscpy instead of strlcpy v2: * use strlcpy instead of snprintf d

[dpdk-dev] [PATCH v2] net/af_xdp: use strlcpy instead of strncpy

2020-10-07 Thread Ciara Loftus
strncpy may leave the destination buffer not NULL terminated so use strlcpy instead. Coverity issue: 362975 Fixes: 339b88c6a91f ("net/af_xdp: support multi-queue") Signed-off-by: Ciara Loftus --- v2: * use strlcpy instead of snprintf drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +- 1 fi

[dpdk-dev] [PATCH] net/af_xdp: use snprintf instead of strncpy

2020-10-07 Thread Ciara Loftus
strncpy may leave the destination buffer not NULL terminated so use snprintf instead. Coverity issue: 362975 Fixes: 339b88c6a91f ("net/af_xdp: support multi-queue") Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[dpdk-dev] [PATCH v3] net/af_xdp: custom XDP program loading

2020-09-25 Thread Ciara Loftus
the PMD, using some criteria defined in the program. This can be useful for filtering purposes, for example if we only want a subset of packets to reach userspace or to drop or process a subset of packets in the kernel. Note: a netdev may only load one program. Signed-off-by: Ciara Loftus Tested-b

[dpdk-dev] [PATCH v3 0/1] net/af_xdp: shared UMEM support

2020-09-23 Thread Ciara Loftus
nce the kernel is released (~December) this will no longer be necessary. [1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=acabf32805f7 Ciara Loftus (1): net/af_xdp: shared UMEM support doc/guides/nics/af_xdp.rst | 6 +- drivers/net/af_xdp/compa

[dpdk-dev] [PATCH v3 1/1] net/af_xdp: shared UMEM support

2020-09-23 Thread Ciara Loftus
UMEM multiple times. Throughput was measured to remain within 2% of the default mode (not sharing UMEM). A version of libbpf >= v0.2.0 is required and the appropriate pkg-config file for libbpf must be installed such that meson can determine the version. Signed-off-by: Ciara Loftus ---

[dpdk-dev] [PATCH v2 1/1] net/af_xdp: shared UMEM support

2020-09-18 Thread Ciara Loftus
UMEM multiple times. Throughput was measured to remain within 2% of the default mode (not sharing UMEM). A version of libbpf >= v0.2.0 is required and the appropriate pkg-config file for libbpf must be installed such that meson can determine the version. Signed-off-by: Ciara Loftus ---

[dpdk-dev] [PATCH v2 0/1] net/af_xdp: shared UMEM support

2020-09-18 Thread Ciara Loftus
nce the kernel is released (~December) this will no longer be necessary. [1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=acabf32805f7 Ciara Loftus (1): net/af_xdp: shared UMEM support doc/guides/nics/af_xdp.rst | 6 +- drivers/net/af_xdp/compa

[dpdk-dev] [PATCH v2] net/af_xdp: custom XDP program loading

2020-09-18 Thread Ciara Loftus
the PMD, using some criteria defined in the program. This can be useful for filtering purposes, for example if we only want a subset of packets to reach userspace or to drop or process a subset of packets in the kernel. Note: a netdev may only load one program. Signed-off-by: Ciara Loftus Tested-b

[dpdk-dev] [PATCH] net/af_xdp: fix umem size

2020-09-10 Thread Ciara Loftus
d not take this into account. This commit adds the amount by which the address was aligned to the size of the UMEM. Bugzilla ID: 532 Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Cc: sta...@dpdk.org Signed-off-by: Ciara Loftus --- drivers/net/af_

[dpdk-dev] [PATCH 1/1] net/af_xdp: shared UMEM support

2020-09-07 Thread Ciara Loftus
UMEM multiple times. Throughput was measured to remain within 2% of the default mode (not sharing UMEM). A version of libbpf >= v0.2.0 is required and the appropriate pkg-config file for libbpf must be installed such that meson can determine the version. Signed-off-by: Ciara Loftus ---

[dpdk-dev] [PATCH 0/1] net/af_xdp: shared UMEM support

2020-09-07 Thread Ciara Loftus
nce the kernel is released (~December) this will no longer be necessary. [1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=acabf32805f7 Ciara Loftus (1): net/af_xdp: shared UMEM support doc/guides/nics/af_xdp.rst | 6 +- drivers/net/af_xdp/compa

[dpdk-dev] [PATCH] net/af_xdp: custom XDP program loading

2020-08-28 Thread Ciara Loftus
the PMD, using some criteria defined in the program. Note: a netdev may only load one program. Signed-off-by: Ciara Loftus --- doc/guides/nics/af_xdp.rst | 1 + drivers/net/af_xdp/rte_eth_af_xdp.c | 100 ++-- 2 files changed, 95 insertions(+), 6 deletions(-) dif

[dpdk-dev] [PATCH RFC 0/1] net/af_xdp: shared UMEM support

2020-08-11 Thread Ciara Loftus
/project/netdev/cover/1595307848-20719-1-git-send-email-magnus.karls...@intel.com/ [2] https://git.dpdk.org/dpdk/commit/?id=ee584e9710b9abd60ee9faef664e106dcea10085 Ciara Loftus (1): net/af_xdp: shared UMEM support doc/guides/nics/af_xdp.rst | 5 +- drivers/net/af_xdp/rte_eth_af_xdp.c

[dpdk-dev] [PATCH RFC 1/1] net/af_xdp: shared UMEM support

2020-08-11 Thread Ciara Loftus
is set. UMEMs can only be shared across PMDs with the same mempool, up to a limited number of PMDs goverened by the size of the given mempool. The benefit of sharing UMEM across PMDs is a saving in memory due to not having to register the UMEM multiple times. Signed-off-by: Ciara Loftus --- doc

[dpdk-dev] [PATCH] net/af_xdp: change return value from Rx to unsigned

2020-08-07 Thread Ciara Loftus
The af_xdp rx function was returning a negative value on error, when an unsigned value is expected. Fix this. Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Cc: sta...@dpdk.org Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +- 1 file

[dpdk-dev] [PATCH] net/af_xdp: don't free the mempool on umem destruction

2020-07-24 Thread Ciara Loftus
Other PMDs may be using the mempool, so don't free it when destroying the UMEM. Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Cc: sta...@dpdk.org Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 1 - 1 file changed, 1 deletion(-) diff

[dpdk-dev] [PATCH] maintainers: update for af_xdp

2020-06-30 Thread Ciara Loftus
Replace Xiaolong Ye with Ciara Loftus. Signed-off-by: Ciara Loftus --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 1cce93a0f8..6cdd8bd1e4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -565,7 +565,7 @@ F: drivers/net/af_packet

[dpdk-dev] [PATCH] net/af_xdp: revert change to SP/SC ring for copy mode

2020-06-25 Thread Ciara Loftus
: use single producer/consumer ring") Cc: sta...@dpdk.org Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c index 06124ba789..2fab916

[dpdk-dev] [PATCH v2] net/af_xdp: optimisations to improve packet loss

2020-06-23 Thread Ciara Loftus
to ~3Gbps. Signed-off-by: Ciara Loftus Acked-by: Xiaolong Ye --- v1->v2: - added emulated tx_free_thresh as suggested by Stephen Hemminger drivers/net/af_xdp/rte_eth_af_xdp.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/net/af_xdp/rte_et

[dpdk-dev] [PATCH] net/af_xdp: optimisations to improve packet loss

2020-06-12 Thread Ciara Loftus
the driver. With these changes, a benchmark which measured the packet rate at which 0.01% packet loss could be reached improved from ~0.1G to ~3Gbps. Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) di

[dpdk-dev] [PATCH] doc: update af_xdp documentation on MTU limitations

2020-02-18 Thread Ciara Loftus
Explain how kernel driver RX buffer sizes affect the maximum MTU size in practice. Signed-off-by: Ciara Loftus --- doc/guides/nics/af_xdp.rst | 26 +++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/doc/guides/nics/af_xdp.rst b/doc/guides/nics/af_xdp.rst

[dpdk-dev] [PATCH v4 1/3] net/af_xdp: fix umem frame size & headroom calculations

2020-02-13 Thread Ciara Loftus
rectly used mb_pool->private_data_size and didn't include mb_pool->header_size or the mbuf priv size. Fix this. Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Cc: sta...@dpdk.org Signed-off-by: Ciara Loftus Reviewed-by: Xiaolong Ye --- drivers/

[dpdk-dev] [PATCH v4 3/3] net/af_xdp: fix maximum MTU value

2020-02-13 Thread Ciara Loftus
mode. Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Cc: sta...@dpdk.org Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/net/af_xdp/rte_eth_a

[dpdk-dev] [PATCH v4 2/3] net/af_xdp: use correct fill queue addresses

2020-02-13 Thread Ciara Loftus
arger packets which are close to the size of the mbuf. Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Cc: sta...@dpdk.org Signed-off-by: Ciara Loftus Reviewed-by: Xiaolong Ye --- drivers/net/af_xdp/rte_eth_af_xdp.c | 25 + 1 file changed, 17 i

[dpdk-dev] [PATCH v4 0/3] AF_XDP PMD Fixes

2020-02-13 Thread Ciara Loftus
ET_HEADROOM from max mtu for copy mode. v3: * Fix send-email issue - use in-reply-to v2: * Include mbuf priv size in rx mbuf data_off calculation Ciara Loftus (3): net/af_xdp: fix umem frame size & headroom calculations net/af_xdp: use correct fill queue addresses net/af_xdp: fix maximum

[dpdk-dev] [PATCH v3 0/3] AF_XDP PMD Fixes

2020-02-10 Thread Ciara Loftus
issue - use in-reply-to v2: * Include mbuf priv size in rx mbuf data_off calculation Ciara Loftus (3): net/af_xdp: fix umem frame size & headroom calculations net/af_xdp: use correct fill queue addresses net/af_xdp: fix maximum MTU value drivers/net/af_xdp/rte_eth_af_xdp.c | 61 ++

[dpdk-dev] [PATCH v3 3/3] net/af_xdp: fix maximum MTU value

2020-02-10 Thread Ciara Loftus
mode. Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Cc: sta...@dpdk.org Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/net/af_xdp/rte_eth_a

[dpdk-dev] [PATCH v3 1/3] net/af_xdp: fix umem frame size & headroom calculations

2020-02-10 Thread Ciara Loftus
rectly used mb_pool->private_data_size and didn't include mb_pool->header_size or the mbuf priv size. Fix this. Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Cc: sta...@dpdk.org Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 13

[dpdk-dev] [PATCH v3 2/3] net/af_xdp: use correct fill queue addresses

2020-02-10 Thread Ciara Loftus
arger packets which are close to the size of the mbuf. Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Cc: sta...@dpdk.org Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-

[dpdk-dev] [PATCH v2 2/3] net/af_xdp: use correct fill queue addresses

2020-02-07 Thread Ciara Loftus
arger packets which are close to the size of the mbuf. Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Cc: sta...@dpdk.org Signed-off-by: Ciara Loftus --- v2: * Include mbuf priv size in rx mbuf data_off calculation Ciara Loftus (3): net/af_xdp: fix umem frame

[dpdk-dev] [PATCH v2 3/3] net/af_xdp: fix maximum MTU value

2020-02-07 Thread Ciara Loftus
mode. Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Cc: sta...@dpdk.org Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/net/af_xdp/rte_eth_a

[dpdk-dev] [PATCH v2 1/3] net/af_xdp: fix umem frame size & headroom calculations

2020-02-07 Thread Ciara Loftus
rectly used mb_pool->private_data_size and didn't include mb_pool->header_size or the mbuf priv size. Fix this. Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Cc: sta...@dpdk.org Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 13

[dpdk-dev] [PATCH v2 0/3] AF_XDP PMD Fixes

2020-02-07 Thread Ciara Loftus
value The maximum MTU for af_xdp zero copy is equal to the page size less the frame overhead introduced by AF_XDP (XDP HR = 256) and DPDK (frame hr = 320). The patch updates this value to reflect this, and removes some unneeded constants for both zero-copy and copy mode. v2: * Include mbuf priv

[dpdk-dev] [PATCH 3/3] net/af_xdp: fix maximum MTU value

2020-02-07 Thread Ciara Loftus
mode. Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Cc: sta...@dpdk.org Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/net/af_xdp/rte_eth_a

[dpdk-dev] [PATCH 1/3] net/af_xdp: fix umem frame size & headroom calculations

2020-02-07 Thread Ciara Loftus
rectly used mb_pool->private_data_size and didn't include mb_pool->header_size or the mbuf priv size. Fix this. Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Cc: sta...@dpdk.org Signed-off-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 13

  1   2   >