Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1007894rdb; Fri, 2 Feb 2024 10:24:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IFPbBTSBcGNHZVaMkWFZnINV16GWuACzSpswT5xoQzYk81FNRfD3QXrN+QapALa3Imtles+ X-Received: by 2002:a05:6512:10c5:b0:511:3aa4:a982 with SMTP id k5-20020a05651210c500b005113aa4a982mr1142574lfg.2.1706898292278; Fri, 02 Feb 2024 10:24:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706898292; cv=pass; d=google.com; s=arc-20160816; b=X+AXlnKP8peJAZ6hOCqVGPnCYETFZ/xLSc+j0PbTEQCYkz8WpaCPHbrQ/moLxpyc59 xa4zehK2O/0jH3udmwjFqnbDlAXTv9R/apZzQv57fZH/sY2KQuerLtJ8ufysC67jB/hH dtVxraU9FusUUYYykZ6XQGukVwuo6byrM0wIX+uY3TJ+Rkl2yQQaGPHe3HkWJbt32hjh +e/pCnBGuNwOjtoCh0z94drtANi9d473lPiX621JwTjLWuxJRvdtnkAhlilHBSnlM3WO BIAj8/QAArpjoBVaERATIvtAqRDhEnzdZ1oFiPgjVOtmZKpeV9MyzdARMjqlQTB/Q5Jr Hxgw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=dZAmFgp9fivbxCWJB0wS143wlUuqJjpTsSX8TxU3wzs=; fh=G3NFf11szaKnn7m2OgCkFEFGDvLSpO34fMgvecKSUwk=; b=d0PbC99ulW6TzCqDn4oODJnfPcPIzLZm1+yvW1XQXrt/nwDrHviVsdSjSBNsjK7nVx gZxNqpLKE0VMIbSw0+TzOJiAiCoRX84O6KxHLFnQ1rrrR54N8DyPmEcZYwjhboxuaw29 7yTn+sx31poR227H8Lb9K6gF93d4ZaOAX5IydbbaTm6Cx9AP0mF6DNpsnh1VYUOU/0rh MIMFiK+T7APXRSZNnDoxtRI9VHNGNycHyxyqK3zvcMObyyU5R6V2kN7f4SWaleRGeVJ2 53t7SYL0prwVubXhgU7in3WIgrBkjAMKHtTol0ozr5FC9jcQipSqAK3wDX5pwzen4c96 gyJA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I1TvU+Lj; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-50316-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50316-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCXc4lC24fgV+8psMGYBlxwgt1pydxQU/M9OBA+lzuEeRNp6ZW2iGl6ILveg50nwR58aQmOTSMdFJfXpXnxmG+W3mE9kSfQUpuAFBxNR/g== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id cw23-20020a170906c79700b00a3735f02e4asi143330ejb.671.2024.02.02.10.24.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 10:24:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50316-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I1TvU+Lj; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-50316-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50316-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 07C991F27435 for ; Fri, 2 Feb 2024 18:24:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 990CC14E2F6; Fri, 2 Feb 2024 18:22:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="I1TvU+Lj" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B890F152DEF; Fri, 2 Feb 2024 18:22:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706898161; cv=none; b=M0gZ4babYzxRRI/SmSfVTIlWbNun2kQRmbLLXoG79yM/PkrczJ09WG+Xot9BUEWi5eJ44nAr0sa7bC9FEJkFnqHanECv+j1lYQJFBkUPaZC+44GQdtfxa4IjjWbFKuYsQWFY/cWS4zf+QU16iis/Pv62xg84u5O8xVBL8RCV4yY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706898161; c=relaxed/simple; bh=svlvAKv5Rsvu79CaMk7L2BcATKO9LgP+bcm0qXURTwE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kXT40s587iTqiLmrwCm3PglsnqX26GDXanspLQaEos6Q+x3gVLuUDWztlw0tlH4BmToxViyX52enzsEYPm1+fYGpciU6ZikEW7QcjRi7FK07cirEy1VQID4FCJAbjdr6+n7BgIlh1EWje8T5FFa7CMu0FPsPGjSEYNQhUGXqPOk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=I1TvU+Lj; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9F75C433F1; Fri, 2 Feb 2024 18:22:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706898161; bh=svlvAKv5Rsvu79CaMk7L2BcATKO9LgP+bcm0qXURTwE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=I1TvU+LjPjr5qbLEIXhr7/DRLc7UIpceNQ5kWHZnw0xpTGQ94/KFqA+FR7dw+gIe9 TAQY0kW36tFvSPdxJIwk/qePlR6anGBbBhKCAnuXDVvwO+u3737/q1pGdLwlnQORkO xSF61brZecFv2S2/NxndiIyhyEPiX6cS7v/2dSJOVKqTX0Aqfb3DGpLcjPUUf9ChVL wFwZeRnYRq/xjtfK8nVM+KWFYAstoemWARClHatdXrrEJP5i1KSnptzOc273mnBYOD 4UDD4jrAbn8EpOUc62qfT90JE1ISVJtRHOoi4/JbYdDbpMYbe1ySHALb0wbjzs5ree q6FH+Kfhb/GWQ== Date: Fri, 2 Feb 2024 10:22:39 -0800 From: Jakub Kicinski To: Joe Damato Cc: "Samudrala, Sridhar" , Eric Dumazet , , , , , , , , , "Wei Wang" , Amritha Nambiar Subject: Re: [net-next 0/3] Per epoll context busy poll support Message-ID: <20240202102239.274ca9bb@kernel.org> In-Reply-To: References: <20240124025359.11419-1-jdamato@fastly.com> <5faf88de-5063-421f-ad78-ad24d931fd17@intel.com> <20240202032806.GA8708@fastly.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 2 Feb 2024 11:23:28 -0600 Samudrala, Sridhar wrote: > > I know I am replying to a stale thread on the patches I've submit (there is > > a v5 now [1]), but I just looked at your message - sorry I didn't reply > > sooner. > > > > The per-queue and per-napi netlink APIs look extremely useful, thanks for > > pointing this out. > > > > In my development tree, I had added SIOCGIFNAME_BY_NAPI_ID which works > > similar to SIOCGIFNAME: it takes a NAPI ID and returns the IF name. This is > > useful on machines with multiple NICs where each NIC could be located in > > one of many different NUMA zones. > > > > The idea was that apps would use SO_INCOMING_NAPI_ID, distribute the NAPI > > ID to a worker thread which could then use SIOCGIFNAME_BY_NAPI_ID to > > compute which NIC the connection came in on. The app would then (via > > configuration) know where to pin that worker thread; ideally somewhere NUMA > > local to the NIC. > > > > I had assumed that such a change would be rejected, but I figured I'd send > > an RFC for it after the per epoll context stuff was done and see if anyone > > thought SIOCGIFNAME_BY_NAPI_ID would be useful for them, as well. > > I think you should be able to get this functionality via the netdev-genl > API to get napi parameters. It returns ifindex as one of the parameters > and you should able to get the name from ifindex. > > $ ./cli.py --spec netdev.yaml --do napi-get --json='{"id": 593}' > {'id': 593, 'ifindex': 12, 'irq': 291, 'pid': 3727} FWIW we also have a C library to access those. Out of curiosity what's the programming language you'd use in user space, Joe?