Skip to content

Unaligned chunk mode doesn't work in examples. #139

@supernomad

Description

@supernomad

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions