RE: [EXTERNAL] Re: [PATCH 2/3] net: mana: Implement set_link_ksettings in ethtool for speed
From: Haiyang Zhang
Date: Tue Mar 25 2025 - 16:28:54 EST
> -----Original Message-----
> From: Andrew Lunn <andrew@xxxxxxx>
> Sent: Tuesday, March 25, 2025 3:59 PM
> To: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
> Cc: Jakub Kicinski <kuba@xxxxxxxxxx>; Erni Sri Satya Vennela
> <ernis@xxxxxxxxxxxxxxxxxxx>; KY Srinivasan <kys@xxxxxxxxxxxxx>;
> wei.liu@xxxxxxxxxx; Dexuan Cui <decui@xxxxxxxxxxxxx>;
> andrew+netdev@xxxxxxx; davem@xxxxxxxxxxxxx; edumazet@xxxxxxxxxx;
> pabeni@xxxxxxxxxx; Long Li <longli@xxxxxxxxxxxxx>; Konstantin Taranov
> <kotaranov@xxxxxxxxxxxxx>; horms@xxxxxxxxxx; brett.creeley@xxxxxxx;
> surenb@xxxxxxxxxx; schakrabarti@xxxxxxxxxxxxxxxxxxx;
> kent.overstreet@xxxxxxxxx; shradhagupta@xxxxxxxxxxxxxxxxxxx;
> erick.archer@xxxxxxxxxxx; rosenp@xxxxxxxxx; linux-hyperv@xxxxxxxxxxxxxxx;
> netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; linux-
> rdma@xxxxxxxxxxxxxxx; Paul Rosswurm <paulros@xxxxxxxxxxxxx>
> Subject: Re: [EXTERNAL] Re: [PATCH 2/3] net: mana: Implement
> set_link_ksettings in ethtool for speed
>
> > This patch is just to support the ethtool option for the speed.
> > And seems there is no option on ethtool to reset NIC to the default
> > speed?
>
> There is no such thing as default speed. Speed is either:
>
> 1) Negotiated with the link partner, picking the highest speed link
> modes both partners support
>
> 2) Forced to a specific speed, based on one of the link modes the
> interfaces supports.
>
> Since you don't have link modes, you are abusing the API. You should
> choose a different API which actually fits what you are doing,
> configuring a leaky bucket shaper.
>
Could you please point us to the interface struct, callback function
names, and/or docs you are suggesting us to use?
Thanks,
- Haiyang