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 14089A0C57 for ; Mon, 1 Nov 2021 16:20:13 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D788D40E28; Mon, 1 Nov 2021 16:20:12 +0100 (CET) Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by mails.dpdk.org (Postfix) with ESMTP id 23C1940DF6 for ; Mon, 1 Nov 2021 16:20:11 +0100 (CET) Received: by mail-pg1-f179.google.com with SMTP id g184so17459977pgc.6 for ; Mon, 01 Nov 2021 08:20:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1vcPym9Ao/ok7S2S3O0ZOrlAno1nA4YO2TAjRQEht+Y=; b=JRzG+Cmbytw3Op/ND6TfUBBghrpU+hAicWk9v/K9xfcsgKI2wFlHM0ZkaIhec9xO3f oQJei+Sq5jho/tFdXKrgMDv9iVRZfDTS/EKimFdnPjDhlkhqzHjCEomcL/IbzrVY67D8 8RxUgBrOkeQ4nVOyKQ0FUWPspdjkvymJGVnZbimnIBayWcv5GWgDLGiBNhQwkuv/MnDq wgjL05dfV5E0nIcsId0CMK5O0wK5FRkN+bm2/dVslztApmvNoBB3G8ji+joThBTDn9xx D9Ruz80mtWTPBT0vPauUz8kMG3cdji+9EL8mYsD6jeZ5Yu2prr+Rw+/85Od9u6uZNi2I bTXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1vcPym9Ao/ok7S2S3O0ZOrlAno1nA4YO2TAjRQEht+Y=; b=HLo9WU/vgalJiUmB8C7ACtGOUqbSwMwsxmChAbaiShzpiJf0QnAg3LpVT35JzWPysc gaGwV+hlA1XWHHxEW8S9V2CuQdl1bVFuWILYkdSLbN19SII2+WjfOxlX51wZQ2RI5Had HJToQx8KJyknWPMdSy3i7IcVcuNwfq3RgyW+rGibG6q8LdK+8HxyLNqYwOYq1dd9OXHd Wq+RVfRpuKgrlot2YetxArJRTFRDIqNJln/aZEKRxBEDyAu/3xJ1B/l/u/WCFQinlxaZ UBud8nhIrdX8+RQ9+hCnlBEblYJgwKVwRQiAevO1U34DvuFvcsbohdPjx2PR2TGK5jDe 2Jow== X-Gm-Message-State: AOAM530nOMxFISltehsx7l6o0HYgXZZ4ln5NvbeIMoQnessmoB6AMv6R OhaiHHopLl7paBtLi0MeG6daTBAaCW/T8Q== X-Google-Smtp-Source: ABdhPJxAdqVJkpWnYypZKW6nOJoNljdwWDqICXa0jQRh7g7R/eP64s/+VKuijbBeVKiUkavOnMJiEQ== X-Received: by 2002:aa7:83cd:0:b0:480:9e79:fae5 with SMTP id j13-20020aa783cd000000b004809e79fae5mr14523948pfn.42.1635780010308; Mon, 01 Nov 2021 08:20:10 -0700 (PDT) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id j6sm13321006pgf.60.2021.11.01.08.20.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Nov 2021 08:20:10 -0700 (PDT) Date: Mon, 1 Nov 2021 08:20:06 -0700 From: Stephen Hemminger To: Jack Humphries Cc: users@dpdk.org Subject: Re: Enable RX interrupts Message-ID: <20211101082006.168c25ea@hermes.local> In-Reply-To: <73CAB2FD-77CD-4C84-BE8B-F100A1CA55F3@chillysky.com> References: <73CAB2FD-77CD-4C84-BE8B-F100A1CA55F3@chillysky.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 On Sun, 31 Oct 2021 22:50:40 -0700 Jack Humphries wrote: > Hi folks, >=20 > Hope all are well. I=E2=80=99m trying to enable interrupts in DPDK so tha= t my network receive thread can sleep on an epoll until packets arrive. I a= m 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 n= ever indicates that packets have arrived. The thread only handles packets w= hen 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 h= ere first to see if my setup is missing anything obvious. I based it closel= y on the l3fwd-power example, though I haven't been able to get that exampl= e up and running yet since my NIC only has one port plugged in right now an= d 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.