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 B258BA0C52 for ; Mon, 1 Nov 2021 08:46:51 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2F32D40E28; Mon, 1 Nov 2021 08:46:51 +0100 (CET) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) by mails.dpdk.org (Postfix) with ESMTP id 6DBB940DF6 for ; Mon, 1 Nov 2021 08:46:50 +0100 (CET) Received: by mail-lj1-f170.google.com with SMTP id u5so28019496ljo.8 for ; Mon, 01 Nov 2021 00:46:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Sta9mU1zknSS/Gst9i3SNVig/MBRllpr3Iye+y48PAQ=; b=kwN8ucdACfG+h6sYKm6Vukk0uuB6k2Acq1Ri//QaWUPQrsSUx+V4mCi2oY5WGx3KLN 3YUoZGpu5SaYgropqoiwZwNuMbdSl6eLXCnOnwlT1yp2+0yy5o5cO/WEz1EivjA0cE6i 2mz1Z4NSYeKIx1SH2/AFYTVe+gEmSWK5GH6BcmtnqXIjcjFXFh26Vny7/rY0O46vvaEK PUn22Oj+q1q82AzRj4HOjPD6RZZMfj8Q6C5vieJHOaLVtYqc6NYMAhbJsarX/Ts8Gc9Y ClMPKNv1DsUiXfbxmOxLQDwvvUjuNMjHrU898ID8hybnX80879YWOkuT2AY5OKqc92Ve TVMQ== 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=Sta9mU1zknSS/Gst9i3SNVig/MBRllpr3Iye+y48PAQ=; b=mdvFscTYQs98feYse9enoLJAxPsQbxQVOvwOl0SH1uiVde6uHKgd/+QXocHHDK5GYl UysYZw/5MhNk0vmv3AmTZouwTgg75u++EtboZ4RqUUD+yxYiHPP3QyAl/A28a2W4MA69 i5xH25oVx5VYoAZMupUO8MS4QsWAjuLbWIVKszK+BhuwRHq0VjaDf7YRivGi+hwn57GE FAgm1v2WnPaS686R8bI0WwOOChHjQpx0A7doxOp+Kn6ABefkKVcon+dO2IspMrjbCL3v 4kirLSLSr2v11Hqaptjc9eQGkU5Euc72EwS6sxcB0k5FlH8ktP05wT4pb5wGdSv2wWB7 s8ag== X-Gm-Message-State: AOAM531IY7LM0YFteIEkWtERRZMX+xPg+WBaFF9RaR7dqbOC5wAsS0N0 NcRVIrt7erxCGtzaVO1KTIA= X-Google-Smtp-Source: ABdhPJyYXanIdsd+tPiyKxNJXE0CA+7J4u0Ls5xEyA+dVPUVYsy+RMZTMcUfJctlps9m0t+rmm/0JQ== X-Received: by 2002:a05:651c:112c:: with SMTP id e12mr18967031ljo.244.1635752809889; Mon, 01 Nov 2021 00:46:49 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id w24sm1341361lfu.24.2021.11.01.00.46.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Nov 2021 00:46:49 -0700 (PDT) Date: Mon, 1 Nov 2021 10:46:48 +0300 From: Dmitry Kozlyuk To: Jack Humphries Cc: users@dpdk.org, Haiyue Wang Subject: Re: Enable RX interrupts Message-ID: <20211101104648.3771e1c4@sovereign> In-Reply-To: <73CAB2FD-77CD-4C84-BE8B-F100A1CA55F3@chillysky.com> References: <73CAB2FD-77CD-4C84-BE8B-F100A1CA55F3@chillysky.com> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) 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 2021-10-31 22:50 (UTC-0700), Jack Humphries: > 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). >=20 > 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.