From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CF23FA0C55 for ; Mon, 1 Nov 2021 20:16:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 94EB740E28; Mon, 1 Nov 2021 20:16:17 +0100 (CET) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by mails.dpdk.org (Postfix) with ESMTP id 111E540DF6 for ; Mon, 1 Nov 2021 20:16:16 +0100 (CET) Received: by mail-pl1-f175.google.com with SMTP id v20so12193307plo.7 for ; Mon, 01 Nov 2021 12:16:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chillysky-com.20210112.gappssmtp.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=2i2ugRNz4FeTkhmvggm7M/wx1QC+cLvcEc1OzdJ68q8=; b=Kb7CcQE4wbBk87hOKq4y+/ymM5Iw8z4AtRM8hNs4OXj7tHwMETVYK3qiXFIvfPPjPr WininDaBoSaU5WbtYBugt2FJ4dpGmeHm2Hg1DEyLWl0Yc8IoyxrH/t6IbOtDynm27aCy Dm7Un9Ea2vc4M4SB00QbobsknfDEZfJ0BocSR6+kNrWtqsefa4dZhR6siHvpv273HpED +BFK7yfyq/iE85OienjwVOc1SuQr2HM8j5SiKQipb4cFjeU8xTS8vfX2ZjDUcIccwVP5 hpGfChpKofTByBLAMKjxM86S9vF6Fosoq1KmY4Gu2lynKiFIW+sJhlkRVXUOD4sC8yWV WFeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=2i2ugRNz4FeTkhmvggm7M/wx1QC+cLvcEc1OzdJ68q8=; b=PKs4zQ4Bfo64NGkTJ90v7MXwZ043bmb5IA401lUiLHXGq91/GM5TAedksYF/25qH1w yvqy0SpJy3PRjGcNJTWEk5YNy4gvLn8896EHDjVSnZnl5nJu3l/eReTTF4nNkOVNL3O6 8DZjFfy0m0Y0Gqh0X8foMabQ1CTkL+I6OlWWLp3IZZvLSbrJFQy49jOB/H7WEzTryxrR udg5YUcV3sysywv1K4/46GXUy1QyKQSBOJYSDShzQCWj0WXUFPHVJvx5GTgMqAVFhWTM jYXLxn25aW3LFyDkOxmANA1wSh5nK8s88LdkgadMFInWMA1wMJ60VNad1DRZZWjUN1Ln HwXw== X-Gm-Message-State: AOAM532PUbKRH4QYLTpFpFLC2Y6dbIwEcEeTmdqtpSO6HM5BuN47lRue UhQvViOfce+C7q3VkkoOFspAqEzpq9gX8p25 X-Google-Smtp-Source: ABdhPJzu4kwfkq7ZvRiPHH0vOYbfQtvd6kHU991PHbOzZsb4HemmDNx8cKD3o5aYcYl2AMpx4+kVZw== X-Received: by 2002:a17:90a:d317:: with SMTP id p23mr954090pju.196.1635794176055; Mon, 01 Nov 2021 12:16:16 -0700 (PDT) Received: from smtpclient.apple (DN200our4.stanford.edu. [128.12.123.100]) by smtp.gmail.com with ESMTPSA id l4sm17949526pfc.121.2021.11.01.12.16.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Nov 2021 12:16:15 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.20.0.1.32\)) Subject: Re: Enable RX interrupts From: Jack Humphries In-Reply-To: <20211101082006.168c25ea@hermes.local> Date: Mon, 1 Nov 2021 12:16:14 -0700 Cc: users@dpdk.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <73CAB2FD-77CD-4C84-BE8B-F100A1CA55F3@chillysky.com> <20211101082006.168c25ea@hermes.local> To: Stephen Hemminger 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Thanks Stephen. I am just using one RX queue from the NIC. I assume that = since I don=E2=80=99t 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 = wrote: >=20 > On Sun, 31 Oct 2021 22:50:40 -0700 > Jack Humphries wrote: >=20 >> Hi folks, >>=20 >> 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. >>=20 >> 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. >>=20 >> port_conf.intr_conf.rxq =3D 1; >>=20 >> ... >>=20 >> 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); >>=20 >> ... >>=20 >> 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. >> } >> } >>=20 >> 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). >=20 > 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.