From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 263E2C4332F for ; Wed, 16 Nov 2022 13:42:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230442AbiKPNlu (ORCPT ); Wed, 16 Nov 2022 08:41:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237884AbiKPNll (ORCPT ); Wed, 16 Nov 2022 08:41:41 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9ACF81E3FC; Wed, 16 Nov 2022 05:41:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=tdYQjrHuPTnZ+b2rbFm8ma7ka8KQeTwqY1MzgMyZJek=; b=eGp+bnP82D3YVfldKwUDMhxqhd KXuhDF/g7fPDia59s5hS5ObQl9hrwD80Z86dhKTO/h4XdtBXYuDSgoCAwXbefnV5NmiKKr/iVFvJe oN4SrJFs2DbHFqX9CoOCM6LsdUK6ZRhqFRnNy5rp5Zt3eZoXnBF6S11Tq1pRo1uiqdvU=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1ovIfW-002ZUr-HD; Wed, 16 Nov 2022 14:41:34 +0100 Date: Wed, 16 Nov 2022 14:41:34 +0100 From: Andrew Lunn To: Rasmus Villemoes Cc: Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/3] net: dsa: use NET_NAME_PREDICTABLE for user ports with name given in DT Message-ID: References: <20221115074356.998747-1-linux@rasmusvillemoes.dk> <20221116105205.1127843-1-linux@rasmusvillemoes.dk> <20221116105205.1127843-3-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221116105205.1127843-3-linux@rasmusvillemoes.dk> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Nov 16, 2022 at 11:52:03AM +0100, Rasmus Villemoes wrote: > When a user port has a label in device tree, the corresponding > netdevice is, to quote include/uapi/linux/netdevice.h, "predictably > named by the kernel". This is also explicitly one of the intended use > cases for NET_NAME_PREDICTABLE, quoting 685343fc3ba6 ("net: add > name_assign_type netdev attribute"): > > NET_NAME_PREDICTABLE: > The ifname has been assigned by the kernel in a predictable way > [...] Examples include [...] and names deduced from hardware > properties (including being given explicitly by the firmware). > > Expose that information properly for the benefit of userspace tools > that make decisions based on the name_assign_type attribute, > e.g. a systemd-udev rule with "kernel" in NamePolicy. > > Signed-off-by: Rasmus Villemoes Reviewed-by: Andrew Lunn Andrew