On Mon, Jul 27, 2020 at 12:19:13PM -0700, Jacob Keller wrote: > > > On 7/27/2020 8:47 AM, Jamie Gloudon wrote: > > Hey, > > > > While having a discussion with Sasha from Intel. I noticed link partner > > advertised support is broken in ethtool 5.7. Sasha hinted to me, the > > new API that ethtool is using. > > > > I see the actual cause in dump_peer_modes() in netlink/settings.c, that > > the mask parameter is set to false for dump_link_modes, dump_pause and > > bitset_get_bit. > > > > Regards, > > Jamie Gloudon > > > > Hi, > > Seems like more detail here would be useful. This is about the ethtool > application. > > Answering the following questions would help: > > - what you wanted to achieve; > > - what you did (including what versions of software and the command > sequence to reproduce the behavior); > > - what you saw happen; > > - what you expected to see; and > > - how the last two are different. > > The mask parameter for dump_link_modes is used to select between > displaying the mask and the value for a bitset. > > According to the source in filling the LINKMODES_PEER, we actually don't > send a mask at all with this setting, so using true for the mask in > dump_link_modes here seems like it would be wrong. > > It appears that to get link partner settings your driver must fill in > lp_advertising. If you're referring to an Intel driver, a quick search > over drivers/net/ethernet/intel shows that only the ice driver currently > supports reporting this information. > > Given this, I am not convinced there is a bug in ethtool. > > Thanks, > Jake
I am using r8169 with phy driver which actually fills lp_advertising. I recompiled ethtool v5.7 with --disable-netlink and "Link partner advertised link modes" works as it should.