Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHARED_UMEM creation #427

Open
jaydizz opened this issue Jun 8, 2024 · 0 comments
Open

SHARED_UMEM creation #427

jaydizz opened this issue Jun 8, 2024 · 0 comments

Comments

@jaydizz
Copy link

jaydizz commented Jun 8, 2024

Hi all,
currently I am writing a pure golang library for using AF_XDP sockets. Little heads up: I do not want or need any support in my go code :)
I rather have a question regarding the creation of multiple sockets sharing UMEM. I have been reading the source-code of the tutorials here as well as the source of libxdp and I am none the wiser.
If I understand correctly, to create multiple XSKs with a single shared UMEM you would go along the lines of this:
For the first socket:

  1. Create the first socket.
  2. MMAP Umem, FR/CR RX/TX-Rings.
  3. Register them.
  4. Bind to the socket.

For all further sockets:

  1. Create the socket.
  2. MMAP RX/TX-Ring.
  3. Register RX/TX.
  4. Register shared UMEM from first socket, as well as FR/CR
  5. Bind with flags |= XDP_SHARED_UMEM and set the shared_umem_fd to the fd of the first socket.

If I do that, the bind-syscall returns "EINVAL" and after countless hours of debugging I am out of options of what values are considered invalid. Right now I am questioning if I am understanding this procedure correctly of if I am missing something.
Maybe someone here can help me.

Much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant