Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2554437rdb; Wed, 21 Feb 2024 11:10:09 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVEZoKOODzSq734bFapszF6zRZsYa5HOGqzh38EH655HoMx6gPdKNiLGF/VgMB8i9G7aOrnoWQYMfOE26ZuXUdyJMDCqMPNAPZ2xtz3UA== X-Google-Smtp-Source: AGHT+IFts7gK8oB83yEFfQZrO9UCZRpJb19h/dSTZ7zY6fmZ6xh89slF6IHA1d+ArhC7ir5EC0cD X-Received: by 2002:a05:6a20:c992:b0:1a0:9117:5892 with SMTP id gy18-20020a056a20c99200b001a091175892mr17457237pzb.15.1708542608982; Wed, 21 Feb 2024 11:10:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708542608; cv=pass; d=google.com; s=arc-20160816; b=QBDrp7mLq4PEhx5Tw0DMNzNQXTXI0qhbsHZ1d2l2cPumTECugk5vzppVwCx8xo8Jq/ Yt6WMlVpLYKnyPmuISE8pJq+T/n7QHH4G5lxhXF5CIsov47YEUlFD0uvTBdRVfana6xr njcUKJbfSi4ZRwMrB56/Wo0IDCf4tKFV7KIvME81qwwddPqUxWOI6QnIvpVz1w+bZqzj uixu5ePdRaozbccL7w6dlbyc0ACbtFVW1gQCHneZSuAM0JcViyPN3lJITe3Ah+Loveou tGyIdEpAsxyZNzFKV088Aq74KNxF56CfDKh0sgsMf4ti2jFbWXuipnSPco5hmwkxXGM7 D2NA== 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=8p5cd1wWOgFJMZcpIFQ/DsSnbXhQTtss7RnWj8Ks8SY=; fh=GPHLF0THR9jal1LRZxpWLiDWn58Vwxfs6kgIdBwtwtI=; b=thFVgywN3QBk+MavB0ZLSZInXkqm3dKdu+n+oVlWCLsfOkK/piejl61ENjUP0av0NU XCe8KcK/GWBUd1SG66vuec7Dc7UO146SUznUNrfQtvWoQQmUiWjrP+GdbXGryERcTcgQ nYSDgPIMf1yTEEAHXxKUv6kcVDphwB3iPl9aOFj2n5cVtaVe7/gyBlo5HPrXrrWwUTs0 p4Pql12DjINWCZYS5sG+7c6pbI0XGp0j/c4gDgVNiDvNqYuMj4PiaNg7rWW8x/aQBRDo /rfhHjCJHAOAOc/dXc8PgmNm7zMOvcP4S37iJVjsTO529Lg3zR/lcaTxcEP+El8peaF4 rrow==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="g2/2zmYd"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-75344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75344-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i10-20020a65484a000000b005dc80f256ccsi8565513pgs.849.2024.02.21.11.10.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 11:10:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="g2/2zmYd"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-75344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75344-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E96A82835ED for ; Wed, 21 Feb 2024 19:10:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3027F85C46; Wed, 21 Feb 2024 19:09:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="g2/2zmYd" 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 513FC79DD6; Wed, 21 Feb 2024 19:09:53 +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=1708542594; cv=none; b=ry6er6clkdY0JcbbXPe24ZQWJfm08clRc6kuXvZeSApXBswho2EzkGNMZU3LJD00GxL7hl8RLQUGsHAT+Sv4cJYcXyxTAp4KOGytWpwrsZk22f1Unot8h5nn99ZBqqeYYGJYKwqLzIBrdui69kqub6rRqUgpu5b88Ewv4GpGRl8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708542594; c=relaxed/simple; bh=Mt5aF6Hr76ak8o2cE1OJ5mzFoU6w/C5uo9s6FRkcdgM=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jlP+FjG5Ul7pn8DM2JipqwcGjq9L4VJ2GZDC3+IaBp/HAWuI7vgKRpNrHv/F34nH5FFmfI8JOCVsC+X0IeJTymxM9IU0NOIaAx2J8pA5xqAIbwLywnZZkW4BpEgheFwypCEQXuWKv+WoXwGbsKf9Iy1LaHVPS6HnoqVwy7XwI/w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=g2/2zmYd; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4ADCCC433F1; Wed, 21 Feb 2024 19:09:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708542593; bh=Mt5aF6Hr76ak8o2cE1OJ5mzFoU6w/C5uo9s6FRkcdgM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=g2/2zmYdvzqYK4cj8AmYHmwN5yICBtAIKuHg5Sqd3MvR/UIvL/Grr9eb/tPRMlJ6c 3/uVSI4/ldPebzp1xz66czAakEUVVCUF+/1Vd9wE2t9r/2OY3TlFIXEBmxjxGwbpqx 9xIOMA1rLb5GPk4/nCJkJSDlkJDkwPLJcQhhG7yl0AmLrvLZH66jRRpN73EhmKIX4s Mn3UiacmcxDbx6eHPoizRNG3d72/+xDrP+LYWug3f03N13WdnXOMUafRKltHbJo//F VG4TquIc07EeZX6udOTeZXFwoN4h73D4WJiqXaOENZf67wCpt/wfjykelTASTzQOYG 7hiSVJ31oooEA== Date: Wed, 21 Feb 2024 11:09:52 -0800 From: Jakub Kicinski To: Joe Damato Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Alexei Starovoitov , Amritha Nambiar , "David S. Miller" , Eric Dumazet , Jesper Dangaard Brouer , Larysa Zaremba , Maciej Fijalkowski , Paolo Abeni , Sridhar Samudrala , Stanislav Fomichev , Tariq Toukan Subject: Re: [PATCH net-next 0/2] Expose netdev name in netdev netlink APIs Message-ID: <20240221110952.43c0ae6e@kernel.org> In-Reply-To: <1708531057-67392-1-git-send-email-jdamato@fastly.com> References: <1708531057-67392-1-git-send-email-jdamato@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 Wed, 21 Feb 2024 07:57:28 -0800 Joe Damato wrote: > Greetings: > > The netdev netlink APIs currently provide the ifindex of a device > associated with the NIC queue or NAPI when the netlink API is used. In > order for user applications to map this back to a human readable device > name, user applications must issue a subsequent ioctl (SIOCGIFNAME) in > order to map an ifindex back to a device name. To be clear, if_indextoname() is doing it, right? I wanted to be sure the concern is really number of syscalls, not the difficulty in getting the name. > This patch set adds ifname to the API so that when queue or NAPI > information is retrieved, the human readable string is included. The netdev > netlink YAML spec has been updated to include this field, as well. > > This saves the subsequent call to ioctl and makes the netlink information > more user friendly. Applications might use this information in conjunction > with SO_INCOMING_NAPI_ID to map NAPI IDs to specific NICs with application > specific configuration (e.g. NUMA zone and CPU layout information). For context, the reason why I left the names out is that they can change at any moment, but primarily because there are also altnames now: 2: eth0: [...] altname enp2s0np0 Most of the APIs try to accept altnames as well as the "main" name. If we propagate the name we'll step back into the rtnetlink naming mess :(