Re: [net-next PatchV2] octeontx2-af: map management port always to first PF

From: Jakub Kicinski
Date: Fri Apr 12 2024 - 21:44:54 EST


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).