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

From: Sunil Kovvuri Goutham
Date: Fri Apr 12 2024 - 08:08:06 EST




> -----Original Message-----
> From: Jakub Kicinski <kuba@xxxxxxxxxx>
> Sent: Friday, April 12, 2024 8:26 AM
> To: Hariprasad Kelam <hkelam@xxxxxxxxxxx>
> Cc: netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
> davem@xxxxxxxxxxxxx; Sunil Kovvuri Goutham <sgoutham@xxxxxxxxxxx>;
> Geethasowjanya Akula <gakula@xxxxxxxxxxx>; Jerin Jacob
> <jerinj@xxxxxxxxxxx>; Linu Cherian <lcherian@xxxxxxxxxxx>; Subbaraya
> Sundeep Bhatta <sbhatta@xxxxxxxxxxx>; Naveen Mamindlapalli
> <naveenm@xxxxxxxxxxx>; edumazet@xxxxxxxxxx; pabeni@xxxxxxxxxx
> Subject: Re: [net-next PatchV2] octeontx2-af: map management
> port always to first PF
>
> ----------------------------------------------------------------------
> On Wed, 10 Apr 2024 18:55:38 +0530 Hariprasad Kelam wrote:
> > The user can enable or disable any MAC block or a few ports of the
> > block. The management port's interface name varies depending on the
> > setup of the user if its not mapped to the first pf.
>
> There is no concept of management port in Linux networking.
> I may be missing the point, but I'm unable to review this in the context of the
> upstream Linux kernel.

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.

Thanks,
Sunil.