You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Create the first socket.
MMAP Umem, FR/CR RX/TX-Rings.
Register them.
Bind to the socket.
For all further sockets:
Create the socket.
MMAP RX/TX-Ring.
Register RX/TX.
Register shared UMEM from first socket, as well as FR/CR
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!
The text was updated successfully, but these errors were encountered:
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:
For all further sockets:
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!
The text was updated successfully, but these errors were encountered: