Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2559751rdb; Wed, 21 Feb 2024 11:21:38 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVKDWS+LjO454Cus9n1TeIWJsuJVstUeCTIzRsQ0gR9tGh4o3IuVMsuQpadWyMZjIa0QVdWC8x6oZLMsR2xf+Ob8Wst4kvT39JiUSAyrg== X-Google-Smtp-Source: AGHT+IFZ6QH/mpbMkvSJJXFNmQJ94OTrvKGlgbH14KZKtQKQzDs6n4dM1A9A7VCTCvm1ZjRr6DTR X-Received: by 2002:a05:620a:2951:b0:787:34f7:2498 with SMTP id n17-20020a05620a295100b0078734f72498mr777017qkp.24.1708543297773; Wed, 21 Feb 2024 11:21:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708543297; cv=pass; d=google.com; s=arc-20160816; b=HmLGEUTSaqSdbG42d59PxDFszxBbL7gge0feBAiO05o7CYE1d2dEHK6hfW3J9UiiWV RfUspMA+xq8M2mX8zrlDYqI537/gQIcRDg5ur8D/bWvOfBEFtSu4wFOk4Jo/zAnAotfn YZ370ZFM+3rcMxbvg1oGCKNqqjf6Mbc1JfIpSFIntCXCyP3XGUyGHupMkVG52oBsDJHD khiH66IQxdV7q1+widTfRKeeL0wzssCo2/paATIfvjRczAa+VSxx166cA7SD6/3iKaqo bj5ZPEc8S9NM+KfOs83hRGiy8m6r4YPZgCx2VewYLwmTgH73ZYVnoEwGfUUNElmUuh8g KebA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=pXnITZvZmNDkzIIUT13S2TkCGR7EbwncViIWo1TLK1U=; fh=tmKGY+O5MgYvqVe8Exj3rwvENXlUJrW1rUdTCjnYtm4=; b=DGazycVnnjHixYUA4GAnAe3jSuXOzZtrS7hq/X8TdddIsgluCqSrwIu/p3zPyl6ehq lGEhQMa/LvOSwlrtlOFhlNSziSg4iCMLerR3Eg2ly1qyDezkBHkxapjeRMFhfPBtDKtW n0jvLU5qAIuMh697A5U7JICymOAxGrqunR8Algt+Ja2C1ChlUM8lv026fni3ssbrPn8s O5kKbsTi7+DY1JAsAX8HzVN3QTCjGFiDMKnxoRm9JCl51LXf1oUhvzI+fgzL3wrJKEH8 T1UJ2eBxfrZ74ODAeQErV9p7PwLXWIyp5KZAOWcMf/FhzR7s/c6QBdnXdckQ96cz7HiY vzlw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@fastly.com header.s=google header.b=MHDKAmz1; arc=pass (i=1 spf=pass spfdomain=fastly.com dkim=pass dkdomain=fastly.com dmarc=pass fromdomain=fastly.com); spf=pass (google.com: domain of linux-kernel+bounces-75355-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75355-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fastly.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c16-20020a37e110000000b007877ef11983si3379127qkm.686.2024.02.21.11.21.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 11:21:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75355-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@fastly.com header.s=google header.b=MHDKAmz1; arc=pass (i=1 spf=pass spfdomain=fastly.com dkim=pass dkdomain=fastly.com dmarc=pass fromdomain=fastly.com); spf=pass (google.com: domain of linux-kernel+bounces-75355-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75355-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fastly.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 84A891C23F52 for ; Wed, 21 Feb 2024 19:21:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 91CB485C74; Wed, 21 Feb 2024 19:21:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=fastly.com header.i=@fastly.com header.b="MHDKAmz1" Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 70F5E85927 for ; Wed, 21 Feb 2024 19:21:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708543287; cv=none; b=Yjks7L04fw6akQvytVCvpD/KuH12QIVi4BbSS0X9KYnfvsF/uQRAY6nqGDlQKsUXiNGKtWjYhW9KE2pSsKmnLoDkx6moD1UKbayvm9C6d6ragrXgbpYLMfm32IQdLtwi6VzZLqxw7KW5WcJn0kERbU/KfVJYHtptPxN5XOd/+kc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708543287; c=relaxed/simple; bh=HdMlqULDtWlIMNZNUW7ZLf3uCtFoVG1nSKFK9mt9pBE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qrxPfrzK+ubonCLpFBRP7/CNMzMQMYai3c9Ta7LWIl48q4xc0hwgeqZyTU01AzoEYB0XFP0yoyeRJ13fWF/pP6UkabJbIYnGzZ/BZDjL3BDuqVI26bEJggNO4KlFiDnudCQabKOMjUbyhoiAkiuK/vqcQ5EGLnZuWdYJB4kP4CA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=fastly.com; spf=pass smtp.mailfrom=fastly.com; dkim=pass (1024-bit key) header.d=fastly.com header.i=@fastly.com header.b=MHDKAmz1; arc=none smtp.client-ip=209.85.214.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=fastly.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fastly.com Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-1dc3b4b9b62so997315ad.1 for ; Wed, 21 Feb 2024 11:21:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastly.com; s=google; t=1708543286; x=1709148086; darn=vger.kernel.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=pXnITZvZmNDkzIIUT13S2TkCGR7EbwncViIWo1TLK1U=; b=MHDKAmz1/Yb+kd13xNWPObHRCX0F6NVs2stJpkhXl0fDqbEtzcHn/HuVTi7+HrFQH4 bRcQLbg1fu5khTIZwPdVGGlMgc0T5XJlXi6SmYT8amLqWITTQWrfPIhnCYAYOFzPIu+9 MBjSgKMmhOceS8hq9G6I4bp5GqYBUYxI/mUb8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708543286; x=1709148086; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pXnITZvZmNDkzIIUT13S2TkCGR7EbwncViIWo1TLK1U=; b=pa0lXJA0h8P1H1H4f80TdaU0bkQoDVBXiXYc1BK0fQHTeHl38/yCAtpDHLBtJg7p1s R8MS1gq57zSJ6u/WxwGd0CCRpWTXMAjyl8CjaVRAqMsmPRkN1D+LxVlr7eTSEOanwGYn pt1EMVfc7zoLwWWEfnA0XLZLSPphBJlbzw29FQ6hxdt6c9AFXY4khAWShz0kS4P2MK/C O1RobIAe+/EQTQLtGnCSwwOAu7LN/lb/4jHmL9XXWazw3DXJxNOKK40Mx99mUVxuni04 z0CQ3I9lkzbW37Abf7TA8ifKJFyVHAWKVxr+CfuOGX7RtgakFmgR0zu4COf0EqRyu8gk LbzQ== X-Forwarded-Encrypted: i=1; AJvYcCUmum5Fhx0w065DFxFykSzZv8DTqQsRJcFvKnk+jy4nnXMeP9Xq1CT2m58bg4rsUJmGUOJtm+XAZRQzgpaEHhHvmyC7jcO3JWJlXWxf X-Gm-Message-State: AOJu0YyBE6MLWQ+GgCW6M56ouqpjLwn6PiD7nieVMylI4w2L8AhhioTj 4FPvKOfL8MO1EZza0XbUCC8mWZ/JerehpOV4IvilIDMiGb0D0VDGcPVttEfklRU= X-Received: by 2002:a17:902:e805:b0:1dc:1db2:f60d with SMTP id u5-20020a170902e80500b001dc1db2f60dmr606057plg.2.1708543285751; Wed, 21 Feb 2024 11:21:25 -0800 (PST) Received: from fastly.com (c-24-6-151-244.hsd1.ca.comcast.net. [24.6.151.244]) by smtp.gmail.com with ESMTPSA id kg3-20020a170903060300b001dbbd4ee1f6sm8441720plb.11.2024.02.21.11.21.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Feb 2024 11:21:25 -0800 (PST) Date: Wed, 21 Feb 2024 11:21:23 -0800 From: Joe Damato To: Jakub Kicinski 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: <20240221192122.GB68788@fastly.com> References: <1708531057-67392-1-git-send-email-jdamato@fastly.com> <20240221110952.43c0ae6e@kernel.org> 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-Disposition: inline In-Reply-To: <20240221110952.43c0ae6e@kernel.org> User-Agent: Mutt/1.5.24 (2015-08-30) On Wed, Feb 21, 2024 at 11:09:52AM -0800, Jakub Kicinski wrote: > 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. It seemed a bit odd to me to require the user to hit different APIs -- one to get the ifindex and then another to get the name. I didn't realize you had intentionally left the name out, though. > > 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 :( OK, I see. I didn't realize this was a thing. I suppose what you are saying is that we wouldn't want to expose names at all and stick with ifindexes only, is that right?