From: "Gaul, Maximilian" <maximilian.gaul@hm.edu>
To: Xdp <xdp-newbies@vger.kernel.org>
Subject: Under which circumstances does `xsk_ring_prod__reserve` return 0?
Date: Thu, 14 May 2020 12:03:57 +0000 [thread overview]
Message-ID: <ca3de1dca95241dda545c032a42b0152@hm.edu> (raw)
Hello,
I have this system which handles multiple multicast-streams at once where the user can choose the amount of RX-Queues of the NIC he wants to utilize.
I am testing the scenario where only one RX-Queue is used. Thus, shared umem is used.
At the time a user decides to receive the first multicast-stream, a program ("AF-XDP") is launched by another program ("handler") which handles the user inputs.
This AF-XDP program receives information about a Linux System V message queue through command line arguments.
The first thing the AF-XDP program does is to map a shared memory segment and configuring a umem with it.
After the program launched successfully, the handler sends a message to said queue telling the AF-XDP program to create a new XSK and place its file descriptor into a certain index in the XDP map.
The XSK runs in a separate thread checking every millisecond for packets and sending information about those packet addresses in umem to the handler-program.
To this point, everything works fine. But as soon as the user decides to receive another multicast-stream on the same RX-Queue, `xsk_ring_prod__reserve` suddenly starts to return 0 (e.g. it wasn't able to reserve any packets) even if I call this function a hundred times.
So of course to create another XSK, I have to call `xsk_socket__create` which also takes the umem as an argument.
As this system is running in parallel I was wondering if this problem can occur because suddenly another XSK is registered at the same time as the first XSK tries to register umem frames for its packets?
Best regards
Max
next reply other threads:[~2020-05-14 12:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-14 12:03 Gaul, Maximilian [this message]
2020-05-14 12:17 ` Under which circumstances does `xsk_ring_prod__reserve` return 0? Magnus Karlsson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ca3de1dca95241dda545c032a42b0152@hm.edu \
--to=maximilian.gaul@hm.edu \
--cc=xdp-newbies@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.