While testing out features of XDP I noticed the unaligned mode doesn't work in the example program.
Steps to reproduce:
- Clean clone of bpf-examples.
cd AF_XDP-example
make
sudo ./xdpsock --unaligned --rxdrop -i {interface} -f 1800
Actual output:
$ sudo ./xdpsock --unaligned --rxdrop -i {interface} -f 1800
xdpsock.c:xsk_configure_umem:1016: errno: 22/"Invalid argument"
If I remove the --unaligned and change to a power of 2 frame size everything works. Whats odd to me is that the docs and even git commit for the unaligned mode explicitly state that:
These changes add the ability to support arbitrary frame sizes up to 4k (PAGE_SIZE).
source: https://lwn.net/Articles/795014/:
I went ahead and took a look at where the error was coming from and it seems its in the libxdp implementation for xsk_umem__create at least seemingly so I opened a issue upstream there as well: xdp-project/xdp-tools#538
While testing out features of XDP I noticed the unaligned mode doesn't work in the example program.
Steps to reproduce:
cd AF_XDP-examplemakesudo ./xdpsock --unaligned --rxdrop -i {interface} -f 1800Actual output:
$ sudo ./xdpsock --unaligned --rxdrop -i {interface} -f 1800 xdpsock.c:xsk_configure_umem:1016: errno: 22/"Invalid argument"If I remove the
--unalignedand change to a power of 2 frame size everything works. Whats odd to me is that the docs and even git commit for the unaligned mode explicitly state that:I went ahead and took a look at where the error was coming from and it seems its in the libxdp implementation for
xsk_umem__createat least seemingly so I opened a issue upstream there as well: xdp-project/xdp-tools#538