lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 10 Jun 2019 17:31:57 +0300
From:   Ido Schimmel <idosch@...sch.org>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     davem@...emloft.net, netdev@...r.kernel.org, amitc@...lanox.com,
        mlxsw@...lanox.com, Ido Schimmel <idosch@...lanox.com>
Subject: Re: [PATCH net-next 1/3] selftests: mlxsw: Add ethtool_lib.sh

On Mon, Jun 10, 2019 at 03:59:14PM +0200, Andrew Lunn wrote:
> > +speeds_get()
> > +{
> > +	local dev=$1; shift
> > +	local with_mode=$1; shift
> > +
> > +	local speeds_str=$(ethtool "$dev" | \
> > +		# Snip everything before the link modes section.
> > +		sed -n '/Supported link modes:/,$p' | \
> > +		# Quit processing the rest at the start of the next section.
> > +		# When checking, skip the header of this section (hence the 2,).
> > +		sed -n '2,${/^[\t][^ \t]/q};p' | \
> > +		# Drop the section header of the current section.
> > +		cut -d':' -f2)
> 
> ethtool gives you two lists of link modes:
> 
> $ sudo ethtool eth17
> Settings for eth17:
>          Supported ports: [ TP ]
>          Supported link modes:   10baseT/Half 10baseT/Full 
>                                  100baseT/Half 100baseT/Full 
>                                  1000baseT/Full 
>          Supported pause frame use: No
>          Supports auto-negotiation: Yes
>          Supported FEC modes: Not reported
>          Advertised link modes:  10baseT/Half 10baseT/Full 
>                                  100baseT/Half 100baseT/Full 
>                                  1000baseT/Full
> 
> and if auto-neg has completed, there is potentially a third list, what
> the peer is advertising.
> 
> Since this test is all about auto-neg, you should be using Advertised
> link modes, not Supported link modes. There can be supported link
> modes which you cannot advertise.

Andrew, are you suggestion to split speeds_get() into
supported_speeds_get() and advertised_speeds_get() and use each where
appropriate? Note that not all the tests are testing with autoneg on.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ