Enable RX interrupts
Jack Humphries
jack at chillysky.com
Mon Nov 1 20:16:14 CET 2021
Thanks Stephen. I am just using one RX queue from the NIC. I assume that since I don’t need per-queue interrupts here since there is only one queue, I should be good using ixgbe+igb_uio?
Thanks,
Jack
> On Nov 1, 2021, at 8:20 AM, Stephen Hemminger <stephen at networkplumber.org> wrote:
>
> On Sun, 31 Oct 2021 22:50:40 -0700
> Jack Humphries <jack at chillysky.com> wrote:
>
>> Hi folks,
>>
>> Hope all are well. I’m trying to enable interrupts in DPDK so that my network receive thread can sleep on an epoll until packets arrive. I am using the ixgbe kernel driver and igb_uio userspace driver with an Intel 82599ES 10Gbps NIC.
>>
>> I'm doing roughly the following to enable the interrupts, but the epoll never indicates that packets have arrived. The thread only handles packets when the epoll times out. I don't even see interrupts arrive from the device when monitoring /proc/interrupts.
>>
>> port_conf.intr_conf.rxq = 1;
>>
>> ...
>>
>> CHECK_EQ(rte_eth_dev_rx_intr_ctl_q(kPort, kQueue, RTE_EPOLL_PER_THREAD,
>> RTE_INTR_EVENT_ADD, nullptr),
>> 0);
>> CHECK_EQ(rte_eth_dev_rx_intr_enable(kPort, kQueue), 0);
>>
>> ...
>>
>> rte_epoll_event event;
>> while (true) {
>> int n = rte_epoll_wait(RTE_EPOLL_PER_THREAD, &event, /*maxevents=*/1,
>> /*timeout=*/1000);
>> if (n == 0) {
>> // Timeout expired.
>> } else {
>> // Received RX interrupt.
>> }
>> }
>>
>> Given that I don't see anything coming through in /proc/interrupts, I am going to start digging through the ixgbe driver. However, I wanted to ask here first to see if my setup is missing anything obvious. I based it closely on the l3fwd-power example, though I haven't been able to get that example up and running yet since my NIC only has one port plugged in right now and the example requires two (COVID building restrictions).
>
> If you are going to use interrupts you need to have MSI-X to get per-queue interrupts.
> The igb_uio driver doesn't support this; you need to use vfio-pci in kernel to get queue interrupts.
More information about the users
mailing list