From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <users-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 92547A0C52
	for <public@inbox.dpdk.org>; Mon,  1 Nov 2021 06:50:44 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 7D3CB40E28;
	Mon,  1 Nov 2021 06:50:44 +0100 (CET)
Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com
 [209.85.215.173])
 by mails.dpdk.org (Postfix) with ESMTP id D9B1340DF6
 for <users@dpdk.org>; Mon,  1 Nov 2021 06:50:42 +0100 (CET)
Received: by mail-pg1-f173.google.com with SMTP id e65so16268893pgc.5
 for <users@dpdk.org>; Sun, 31 Oct 2021 22:50:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=chillysky-com.20210112.gappssmtp.com; s=20210112;
 h=from:content-transfer-encoding:mime-version:subject:message-id:date
 :to; bh=u+XC1xVL97QLmMlxhmSJv1ZT6rxUSsm1n91W7NjotBo=;
 b=KqMUMRsrDBIZL0WcAfkVoi2vX/m9yD9dlqgzMKS8IaAde2aUrRyc7DwJSVrOGIRAh9
 jmPmGvYmWKG0GJVJLu3ZyG/BcWdEfOJ5ZoN1uM9rdOFaJFi2edKL7xef8umeUBxV2Cvk
 XHSyA7TVnlOUWu/uMJ+Y1dfBqArQ63W64ZE4dKvd9PDlvUNochocWbxMeXNH/lGbpy0V
 jR3RPqD3i3fK7qPe+YqL0dtmbZA2+yFaM75BA/lrfIsnv16Wh5ibcUjocngjPB/aWU4N
 6TWeAmc2qqn228qwZl2M1D/Bgq0YyrRrXXi7c8PnAd1U5B8EBRZ4SctS/ly0Qo3TA8uf
 yAow==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:content-transfer-encoding:mime-version
 :subject:message-id:date:to;
 bh=u+XC1xVL97QLmMlxhmSJv1ZT6rxUSsm1n91W7NjotBo=;
 b=NBZNHQN+nAytd45IQEtdC/OwosDkv8ALa/mhIKnaUaBzSriBOdZoHBEXY4QylmhyFN
 /R5DiJsxagA3TdWtv7b6FDr0G4ZnongoIeh87CdoysQvWpd0wJuJNMiF79T9rK3Y7gZG
 raRk/x/H134LitOv1CuNhGcV9UaFtkw86bZk/8BGuuOoAy8rbkkmm1tVTlyWVATAHyGJ
 XPqsC7IWjF74fwAIBlw+GG+nRpeFQ7NDFdy0jX8UnglW6D3LwuJpjUTod83pCyzoBt1V
 8Uph3mFPzx1HmVWTq4JsswbO49sbb8rnSlAfw4CFh7Uv7imXRhBE+KPHV+KuzK7q+QCy
 ZZEA==
X-Gm-Message-State: AOAM531GA6Zy6AhRW29cqsxZeeNRNElgCUsfAIufAMjMRJ3JNhMJTRi9
 qfAvyptyBLPnrueMKIW/C003iUpGEDV//Q==
X-Google-Smtp-Source: ABdhPJxeEjdKYarSGnOkTD/yECBKvwvMNueTeil/+WiIGI0H1n8s03plxfL3cMKt5968jxo/3aE8IA==
X-Received: by 2002:a05:6a00:1a8a:b0:47b:fd77:a7b with SMTP id
 e10-20020a056a001a8a00b0047bfd770a7bmr26239048pfv.58.1635745841535; 
 Sun, 31 Oct 2021 22:50:41 -0700 (PDT)
Received: from smtpclient.apple (DN160vrd000d6kb000000000009c.stanford.edu.
 [2607:f6d0:d:3516::12c])
 by smtp.gmail.com with ESMTPSA id ms15sm367170pjb.26.2021.10.31.22.50.40
 for <users@dpdk.org>
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 31 Oct 2021 22:50:41 -0700 (PDT)
From: Jack Humphries <jack@chillysky.com>
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.20.0.1.32\))
Subject: Enable RX interrupts 
Message-Id: <73CAB2FD-77CD-4C84-BE8B-F100A1CA55F3@chillysky.com>
Date: Sun, 31 Oct 2021 22:50:40 -0700
To: users@dpdk.org
X-Mailer: Apple Mail (2.3693.20.0.1.32)
X-BeenThere: users@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK usage discussions <users.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/users>,
 <mailto:users-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/users/>
List-Post: <mailto:users@dpdk.org>
List-Help: <mailto:users-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/users>,
 <mailto:users-request@dpdk.org?subject=subscribe>
Errors-To: users-bounces@dpdk.org

Hi folks,

Hope all are well. I=E2=80=99m 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 =3D 1;

...

CHECK_EQ(rte_eth_dev_rx_intr_ctl_q(kPort, kQueue, RTE_EPOLL_PER_THREAD,
                                   RTE_INTR_EVENT_ADD, nullptr),
         0);=20
CHECK_EQ(rte_eth_dev_rx_intr_enable(kPort, kQueue), 0);

...

rte_epoll_event event;
while (true) {
  int n =3D rte_epoll_wait(RTE_EPOLL_PER_THREAD, &event, =
/*maxevents=3D*/1,
                         /*timeout=3D*/1000);
  if (n =3D=3D 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=