DPDK usage discussions
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: Jack Humphries <jack@chillysky.com>
Cc: users@dpdk.org, Haiyue Wang <haiyue.wang@intel.com>
Subject: Re: Enable RX interrupts
Date: Mon, 1 Nov 2021 10:46:48 +0300	[thread overview]
Message-ID: <20211101104648.3771e1c4@sovereign> (raw)
In-Reply-To: <73CAB2FD-77CD-4C84-BE8B-F100A1CA55F3@chillysky.com>

2021-10-31 22:50 (UTC-0700), Jack Humphries:
> 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).
> 
> Thanks,
> Jack Humphries

Hi Jack,

Have you called rte_eth_dev_rx_intr_enable(port_id, queue_id)?

Not sure about ixgbe, but vmxnet3 also requires rearming interrupts with it
on each iteration before rte_epoll_wait().
This is what l3fwd-power does by the way (see turn_on_off_intr() function).

+ ixgbe maintainer just in case.

  reply	other threads:[~2021-11-01  7:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-01  5:50 Jack Humphries
2021-11-01  7:46 ` Dmitry Kozlyuk [this message]
2021-11-01  8:56   ` Jack Humphries
2021-11-06 15:12     ` Thomas Monjalon
2021-11-01 15:20 ` Stephen Hemminger
2021-11-01 19:16   ` Jack Humphries
2021-11-01 19:51     ` Stephen Hemminger

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=20211101104648.3771e1c4@sovereign \
    --to=dmitry.kozliuk@gmail.com \
    --cc=haiyue.wang@intel.com \
    --cc=jack@chillysky.com \
    --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).