Minimum kernel version
- Lenguaje dominante
- Rust
- Estrellas
- 37
- Forks
- 5
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Hi,
No minimum kernel version for `xdpilone` is described. This could be difficult in general depending on exactly what features of the crate are used and how they are used. However, the following information may be useful for users on older kernels.
I attempted to run the `flood-mt` example (unmodified) and found that it was failing with the following sequence of system calls:
```c
[...]
socket(AF_XDP, SOCK_RAW, 0) = 3
setsockopt(3, SOL_XDP, XDP_UMEM_REG, "\0\20\rc\2V\0\0\0\0\20\0\0\0\0\0\0\20\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 32) = 0
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 4
ioctl(4, SIOCGIFINDEX, {ifr_name="enp0s2", ifr_ifindex=3}) = 0
close(4) = 0
getsockopt(3, SOL_SOCKET, SO_NETNS_COOKIE, "\1\0\0\0\0\0\0\0", [8]) = 0
setsockopt(3, SOL_XDP, XDP_UMEM_COMPLETION_RING, [2048], 4) = 0
setsockopt(3, SOL_XDP, XDP_UMEM_FILL_RING, [2048], 4) = 0
getsockopt(3, SOL_XDP, XDP_MMAP_OFFSETS, "\0\0\0\0\0\0\0\0\200\0\0\0\0\0\0\0@\1\0\0\0\0\0\0\304\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\0\0\0\0\0\0\0@\1\0\0\0\0\0\0\304\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\0\0\0\0\0\0\0@\1\0\0\0\0\0\0\304\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\0\0\0\0\0\0\0@\1\0\0\0\0\0\0\304\0\0\0\0\0\0\0", [128]) = 0
mmap(NULL, 16704, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_POPULATE, 3, 0x100000000) = 0x7f8162609000
mmap(NULL, 16704, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_POPULATE, 3, 0x180000000) = 0x7f8162604000
setsockopt(3, SOL_XDP, XDP_TX_RING, [4096], 4) = 0
getsockopt(3, SOL_XDP, XDP_MMAP_OFFSETS, "\0\0\0\0\0\0\0\0\200\0\0\0\0\0\0\0@\1\0\0\0\0\0\0\304\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\0\0\0\0\0\0\0@\1\0\0\0\0\0\0\304\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\0\0\0\0\0\0\0@\1\0\0\0\0\0\0\304\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\0\0\0\0\0\0\0@\1\0\0\0\0\0\0\304\0\0\0\0\0\0\0", [128]) = 0
write(2, "Binding socket ", 15) = 15
write(2, "0", 1) = 1
write(2, " ", 1) = 1
write(2, "3", 1) = 1
write(2, "\n", 1) = 1
bind(3, {sa_family=AF_XDP, sxdp_flags=0, sxdp_ifindex=if_nametoindex("enp0s2"), sxdp_queue_id=0}, 16) = 0
write(2, "Mapping socket ", 15) = 15
write(2, "0", 1) = 1
write(2, "\n", 1) = 1
mmap(NULL, 65856, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_POPULATE, 3, 0x80000000) = -1 EBUSY (Device or resource busy)
[...]
```
The socket/queue setup demonstrated in the `flood-mt` example where the TX ring is mapped after the `bind()` of the XSK depends on https://github.com/torvalds/linux/commit/5f5a7d8d8bd461f515543040ad7d107cc405d30c ("xsk: allow remap of fill and/or completion rings") which was apparently shipped in the 6.4 kernel, otherwise the `mmap()` call will fail with EBUSY.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.