From: "Budiský Jakub" <ibudisky@fit.vutbr.cz>
To: users@dpdk.org
Subject: Re: [dpdk-users] Interrupt mode, queues, own event loop
Date: Tue, 08 Sep 2020 17:09:12 +0200 [thread overview]
Message-ID: <55f6e4564ca63efa9666e75fd9024a07@fit.vutbr.cz> (raw)
In-Reply-To: <db580197366c29c228e3b4b72b703b34@fit.vutbr.cz>
On 2020-09-05 23:21, Budiský Jakub wrote:
> Hi,
>
> thanks for the valuable info!
>
> I've now switched to the `vfio` module even for testing and I can
> confirm I get a set of separate eventfd file descriptors. I've
> encountered a new issue though that appears like a bug to me.
>
> Either one of the file descriptors (`--vfio-intr msix`, always the one
> associated with the last queue, regardless of the initialization
> order) or all of them (`--vfio-intr msi`) are available for reading
> just once per application run. I cannot get any followup interrupts
> and I can confirm by polling that there are new packets that have
> arrived.
>
> With `--vfio-intr legacy` I get a same file descriptor for all my
> workers but it is also only triggered once.
>
> As far as I understand there is no clear flag for the MSI(-X)
> interrupts and so I'm not sure what else to try. There is nothing of
> interest in the application output (not even with `--log-level
> lib.eal:debug`).
>
> Thanks again.
>
> Best regards,
> Jakub Budisky
Hi,
Just letting you know that I've resolved the aforementioned issues and
it seems to be working with the Intel NIC. In the debugging process I've
also tried a 100 Gb NIC from Mellanox with no luck so far (I can't get
an epoll event from their "infinibandevent" (?) file descriptor, but I
didn't invest too much time into investigating it further). On the
bright side, trying a different NIC pointed me towards some of the
issues so I'm glad for that.
For the record, here are the resolutions (it may help somebody in the
future):
– Only the last queue was interrupted because my Flow Director setup was
flawed and didn't match the incoming packets properly. So that one was
unrelated. Needless to say that the (un)reported errors from the
`rte_flow` API were not too helpful.
– The MSI interrupts cannot distinguish between queues, similarly to the
legacy interrupt mechanism. Confirmed this in the DPDK source code. That
explains the difference in behaviour. So if you want per-queue
interrupts you are pretty much stuck with the `vfio` + MSI-X.
– And most importantly; apparently the DPDK RX interrupts were designed
in a way that an "explicit switch back to the polling mode" is necessary
(at least this seems to be the case for the Intel NIC / ixgbe PMD I'm
using). You won't get another interrupt unless you re-enable them. More
specifically, in my current code I now call
`rte_eth_dev_rx_intr_disable` immediately after receiving the event from
`epoll` followed by a read from the file descriptor, and
`rte_eth_dev_rx_intr_enable` after I'm done with the packet bursts
retrieval. I hope I won't miss an interrupt doing it this way due to a
race condition (incoming packet in-between the processing and enabling
the interrupt).
Thanks again for the help I've got.
Best regards,
Jakub Budisky
prev parent reply other threads:[~2020-09-08 15:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-04 10:24 Budiský Jakub
2020-09-04 16:18 ` Stephen Hemminger
2020-09-05 21:21 ` Budiský Jakub
2020-09-08 15:09 ` Budiský Jakub [this message]
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=55f6e4564ca63efa9666e75fd9024a07@fit.vutbr.cz \
--to=ibudisky@fit.vutbr.cz \
--cc=users@dpdk.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).