Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp279505lqp; Fri, 12 Apr 2024 18:44:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUf/M7rToU58tKYA+4yvyL/w9/E0kY/Zh43yOEALFKIXT5L6R6yZS+gSK5u5+xuBaPnmXz2r+8D1MoMGw0tJAOh0KhzFCMOUDltLPLFSA== X-Google-Smtp-Source: AGHT+IGBncw+Uv9TDYlEpslsQjt4GNLW2aHuanMmz80B0z5rpQHqiQEBRjzJlZtNx98ZsCBRdtqz X-Received: by 2002:a05:6871:329a:b0:22e:e286:8a3a with SMTP id mp26-20020a056871329a00b0022ee2868a3amr5584608oac.0.1712972693728; Fri, 12 Apr 2024 18:44:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712972693; cv=pass; d=google.com; s=arc-20160816; b=gSHa1RwYjXgvmgB/8qZrXYXVNSYwS2tNfQco9wKrd1p3J/wip5mj6B2RVKJh2JOKzL MvUxBhoNRUqT92vbDz9Wd9FnHZHkrDyvh03XaEIA/94pf0u9mF+buEmynMm5esddPOpf FwcrVzwDn+GXOcvtkTZn7RNDlB7XXjxR0RubHa7/Jz15+6TNwfhL2X/fkxLrJTSlZdPv ge2RPGlLJhawaUN7NMwLH4nsesDtOFdVmT4LsLHEqWLYlcoE9aVi+iEORU/R0qtA+SuN R9jWr/I+8GIkdyDadk71cs6ud5isqzxO9lEOTkQt1Qx5oMCcgDFOcHG+vvBNq89hLHYi vKjA== 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=czBMMQXXfzCFrWwaIL47eX4cex4yQ/bUB3xj/CaxLbI=; fh=QCPYje7Nwe0AZ5DsRJsXSWfJE5jDpYx1sWXZMaoQ58g=; b=NFWSeKN9lOuvo0XrcVt2Gk+A653BhyA0/xWBTqKqvCyjn8uAmg4KY1hqwsnyNFD3/V 8poxkM6ic3TLUlMOJsWN9ABx5DquV1ouRw/zhPO5z0P8QGbdzsTLERtLFi/QQ9niudSy 8up77smV7PTaj9VJMU3ZRZDZuyqXjwcEBn7RTKI/+l+9/7E6Q2ZhBh5PUe9H1wRPKEWH hprh2gwQIFAK9gVVFoQcamxlSceVKtma9xQhxN70R/LlioVXnM10S6zZsyys64juVy+u w6QvmYmTM6NpqhkKDhRBLvfc57JRJDDh6eG4cltdxQ27bGNyT8jcOlbsWkCtwH/8NVBu mIhw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=q4qtFcMa; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-143500-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143500-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 w19-20020a634913000000b005dc49a8c93fsi4096343pga.764.2024.04.12.18.44.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 18:44:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-143500-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=q4qtFcMa; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-143500-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143500-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 59DAA283DF7 for ; Sat, 13 Apr 2024 01:44:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6AF7218042; Sat, 13 Apr 2024 01:44:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="q4qtFcMa" 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 905E91758B; Sat, 13 Apr 2024 01:44:44 +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=1712972684; cv=none; b=WfX8Hd5e4XUD4gW5PbCPrrhFeOvHeldo+Y1mCSXq9upoiOmtDMwRlZWpes2CC7oZb9NbgMHZ7RbGgvdJj/jcXGs8Hbzdhtc91rwHFYU60flrIjOBtFbaWTKP2oOwxLdwt01yh55axM29CgNDgul1dj+kmVQaTvgVGEOOR03WnRU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712972684; c=relaxed/simple; bh=sGErZXyr/YdrYfCuD5psfBudy0tjfQVP+V5GzMrYuk8=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=u2+30cjSnD5FwPUmil4Cn/ci0XkLqvhuo4nLQlY438WXIJc9cqcOXE0wOiqtBOm65qyHrRs/W/yLiYWK/MmVhmlSGkT8WAy6QmKV9jRKgHX4O8HmvrTvFZamL55aWb5VEhE0pfCnwbY1sTXOqScxk0de2TqlTPpwwLGwMACUOZo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=q4qtFcMa; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3191C113CC; Sat, 13 Apr 2024 01:44:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712972684; bh=sGErZXyr/YdrYfCuD5psfBudy0tjfQVP+V5GzMrYuk8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=q4qtFcMacjqD98Dkv4BFueEEQ1M5YqRHiDswvRgAkd7QUNYmC8SoKE+cVZzRl1g5+ xLcULigzqPGMxkgHR++YfSH0PElXc2JrueYkeZPX8oH+Nz695Nx/IQH6IOR5tEEU+L kA7wmUIO2NKaCsS7ijiYPoz0kt1px2m4o1KpxhNro1ysrW0FOZd6RQrgP2KfwHQ9lO +BLKcclvEb71FjKFlgyHEy/nVcDT4gWF+HZblXn3pkgtwzeivbntFY76sX2+LYkRET 4cqCjrWeGhUDEs0TccvElWYtZBDUNcs1ZZjSvs+WLdS7YyD8XJaDjoqzfg1rVffjOV iN/mzkpTo0kqg== Date: Fri, 12 Apr 2024 18:44:42 -0700 From: Jakub Kicinski To: Sunil Kovvuri Goutham Cc: Hariprasad Kelam , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "davem@davemloft.net" , Geethasowjanya Akula , Jerin Jacob , Linu Cherian , Subbaraya Sundeep Bhatta , Naveen Mamindlapalli , "edumazet@google.com" , "pabeni@redhat.com" Subject: Re: [net-next PatchV2] octeontx2-af: map management port always to first PF Message-ID: <20240412184442.26417b54@kernel.org> In-Reply-To: References: <20240410132538.20158-1-hkelam@marvell.com> <20240411195532.033e21fb@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-Transfer-Encoding: 7bit On Fri, 12 Apr 2024 12:07:40 +0000 Sunil Kovvuri Goutham wrote: > Agree, that there is no concept of management port in Linux. > From Octeon hardware pov, there are multiple MACs and each MAC (internally called RPM) is capable of supporting multiple interfaces (called LMACs). > Let's say there are two RPMs on the board and RPM0 is configured to 2x50G and RPM1 is configured as 4x10G. > When kernel boots with this config, let's say the interface names are eth0, eth1.. eth5. > If user is using 'eth3' for NFS, DHCP, SSH etc (ie for device management purposes) and then if user changes RPM0 > config to 4x10G, then in the subsequent boot the same RPM1:LMAC0 could be named as 'eth5' now. > Customers have reported that their scripts are not working in these scenarios and they want some predictable naming. > > What this patch does is that, RPM:LMAC0 which customer is using for management port is always mapped to > same PCI device, so that interface naming remains unchanged irrespective of different RPM configurations. You should try to associate a devlink port with the netdev, that will give it appropriate predictable naming. (Failing that, just implement ndo_get_phys_port_name directly, but really devlink is much preferred).