2024-03-26 17:54:32 +01:00
|
|
|
# SPDX-License-Identifier: GPL-2.0+ OR MIT
|
|
|
|
|
2025-02-14 16:09:46 -08:00
|
|
|
TEST_GEN_FILES = iou-zcrx
|
|
|
|
|
2024-03-26 17:54:32 +01:00
|
|
|
TEST_PROGS = \
|
2024-05-07 11:40:58 -04:00
|
|
|
csum.py \
|
2024-03-26 17:54:32 +01:00
|
|
|
devlink_port_split.py \
|
2024-11-07 10:12:11 -08:00
|
|
|
devmem.py \
|
2024-03-26 17:54:32 +01:00
|
|
|
ethtool.sh \
|
|
|
|
ethtool_extended_state.sh \
|
|
|
|
ethtool_mm.sh \
|
|
|
|
ethtool_rmon.sh \
|
|
|
|
hw_stats_l3.sh \
|
|
|
|
hw_stats_l3_gre.sh \
|
2025-02-14 16:09:46 -08:00
|
|
|
iou-zcrx.py \
|
2025-02-24 16:22:27 -07:00
|
|
|
irq.py \
|
2024-03-26 17:54:32 +01:00
|
|
|
loopback.sh \
|
2024-04-29 07:44:26 -07:00
|
|
|
pp_alloc_fail.py \
|
2025-07-11 18:20:05 -07:00
|
|
|
rss_api.py \
|
2024-06-25 18:24:56 -07:00
|
|
|
rss_ctx.py \
|
2025-02-24 19:44:16 +02:00
|
|
|
rss_input_xfrm.py \
|
2025-02-18 14:54:26 -08:00
|
|
|
tso.py \
|
2025-04-25 14:10:18 +07:00
|
|
|
xsk_reconfig.py \
|
2024-03-26 17:54:32 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
TEST_FILES := \
|
|
|
|
ethtool_lib.sh \
|
|
|
|
#
|
|
|
|
|
|
|
|
TEST_INCLUDES := \
|
2024-04-29 07:44:22 -07:00
|
|
|
$(wildcard lib/py/*.py ../lib/py/*.py) \
|
2024-03-26 17:54:32 +01:00
|
|
|
../../../net/lib.sh \
|
|
|
|
../../../net/forwarding/lib.sh \
|
|
|
|
../../../net/forwarding/ipip_lib.sh \
|
|
|
|
../../../net/forwarding/tc_common.sh \
|
|
|
|
#
|
|
|
|
|
2024-11-07 10:12:10 -08:00
|
|
|
# YNL files, must be before "include ..lib.mk"
|
|
|
|
YNL_GEN_FILES := ncdevmem
|
|
|
|
TEST_GEN_FILES += $(YNL_GEN_FILES)
|
2025-02-24 16:22:27 -07:00
|
|
|
TEST_GEN_FILES += $(patsubst %.c,%.o,$(wildcard *.bpf.c))
|
2024-11-07 10:12:10 -08:00
|
|
|
|
2024-03-26 17:54:32 +01:00
|
|
|
include ../../../lib.mk
|
2024-11-07 10:12:10 -08:00
|
|
|
|
|
|
|
# YNL build
|
|
|
|
YNL_GENS := ethtool netdev
|
|
|
|
include ../../../net/ynl.mk
|
2025-02-24 16:22:27 -07:00
|
|
|
|
|
|
|
include ../../../net/bpf.mk
|
for-6.15/io_uring-rx-zc-20250325
-----BEGIN PGP SIGNATURE-----
iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmfjTP8QHGF4Ym9lQGtl
cm5lbC5kawAKCRD301j7KXHgpm6oEACnpGL52FAKTVj14GDqFo6Pq0Jmnh07x8qj
mpHFPwxfWAzRiuNyji2iS9ecS2cnlkixNyMWZipXRi4KJAUjJH6YDd7IofUI3Glf
6v7b6srFSvsWJIJ8LdkJHLHAJuzYnJvFZ8apwgQczEDqgHq7BAunM1sVQ+mydjYk
EXT4kN6DSBOPzwr9GAay52f8nXhbqdHfT+YTGHPHg+QToojL6gD7vvW57w/QqD/x
91hJef1z01cSIsDZOxA0EUeD+9bBAHpoamr/e3IOOCVYCN6hy0dGa9g0QGbbpVyE
AeU4FGZLV9J8OOfvHVraDt5Wn3IXxYaMu22dSn1S6tVinwjXhJR2LAA+t4fGHAkt
i38LjOsIbopSQn/cNhzwC8UZcHLqnVsdDolHlHzsVFVfcpck2/4JFpUeP8QhWgrk
f9tY12QUf/oEaWm0/sUCHZNFxpIGeFA5FFXf0Z92clnzBuiuWoesBNvxqY/2DeZn
IDNXiv+Trxr6kFEjTpzPeuxbWrn4PJ7afQSAFcEmOCguk5riM+zJZNIKg0TxUHSS
tt6sfxmTP1DhgDKad5kT3MLyzOcx47Kbjf4dj6KmRnD+3DGwwN2F7X7R1GJylPSp
RLOzJ+Ouuy9UmBN6JMsT4BmR9+FJTVirADU926d/ZqCTtRV8Tnq/6HHmKmmr4CR0
THJ0PJqQjg==
=MOve
-----END PGP SIGNATURE-----
Merge tag 'for-6.15/io_uring-rx-zc-20250325' of git://git.kernel.dk/linux
Pull io_uring zero-copy receive support from Jens Axboe:
"This adds support for zero-copy receive with io_uring, enabling fast
bulk receive of data directly into application memory, rather than
needing to copy the data out of kernel memory.
While this version only supports host memory as that was the initial
target, other memory types are planned as well, with notably GPU
memory coming next.
This work depends on some networking components which were queued up
on the networking side, but have now landed in your tree.
This is the work of Pavel Begunkov and David Wei. From the v14 posting:
'We configure a page pool that a driver uses to fill a hw rx queue
to hand out user pages instead of kernel pages. Any data that ends
up hitting this hw rx queue will thus be dma'd into userspace
memory directly, without needing to be bounced through kernel
memory. 'Reading' data out of a socket instead becomes a
_notification_ mechanism, where the kernel tells userspace where
the data is. The overall approach is similar to the devmem TCP
proposal
This relies on hw header/data split, flow steering and RSS to
ensure packet headers remain in kernel memory and only desired
flows hit a hw rx queue configured for zero copy. Configuring this
is outside of the scope of this patchset.
We share netdev core infra with devmem TCP. The main difference is
that io_uring is used for the uAPI and the lifetime of all objects
are bound to an io_uring instance. Data is 'read' using a new
io_uring request type. When done, data is returned via a new shared
refill queue. A zero copy page pool refills a hw rx queue from this
refill queue directly. Of course, the lifetime of these data
buffers are managed by io_uring rather than the networking stack,
with different refcounting rules.
This patchset is the first step adding basic zero copy support. We
will extend this iteratively with new features e.g. dynamically
allocated zero copy areas, THP support, dmabuf support, improved
copy fallback, general optimisations and more'
In a local setup, I was able to saturate a 200G link with a single CPU
core, and at netdev conf 0x19 earlier this month, Jamal reported
188Gbit of bandwidth using a single core (no HT, including soft-irq).
Safe to say the efficiency is there, as bigger links would be needed
to find the per-core limit, and it's considerably more efficient and
faster than the existing devmem solution"
* tag 'for-6.15/io_uring-rx-zc-20250325' of git://git.kernel.dk/linux:
io_uring/zcrx: add selftest case for recvzc with read limit
io_uring/zcrx: add a read limit to recvzc requests
io_uring: add missing IORING_MAP_OFF_ZCRX_REGION in io_uring_mmap
io_uring: Rename KConfig to Kconfig
io_uring/zcrx: fix leaks on failed registration
io_uring/zcrx: recheck ifq on shutdown
io_uring/zcrx: add selftest
net: add documentation for io_uring zcrx
io_uring/zcrx: add copy fallback
io_uring/zcrx: throttle receive requests
io_uring/zcrx: set pp memory provider for an rx queue
io_uring/zcrx: add io_recvzc request
io_uring/zcrx: dma-map area for the device
io_uring/zcrx: implement zerocopy receive pp memory provider
io_uring/zcrx: grab a net device
io_uring/zcrx: add io_zcrx_area
io_uring/zcrx: add interface queue and refill queue
2025-03-28 13:45:52 -07:00
|
|
|
|
2025-02-14 16:09:46 -08:00
|
|
|
$(OUTPUT)/iou-zcrx: LDLIBS += -luring
|