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  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:   Wed, 29 Apr 2020 20:57:27 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Michael Walle <michael@...le.cc>
Cc:     cphealy@...il.com, davem@...emloft.net, f.fainelli@...il.com,
        hkallweit1@...il.com, mkubecek@...e.cz, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v1 4/9] net: ethtool: Add attributes for cable
 test reports

On Wed, Apr 29, 2020 at 06:16:05PM +0200, Michael Walle wrote:
> Hi,
> 
> > > > > +enum {
> > > > > +	ETHTOOL_A_CABLE_PAIR_0,
> > > > > +	ETHTOOL_A_CABLE_PAIR_1,
> > > > > +	ETHTOOL_A_CABLE_PAIR_2,
> > > > > +	ETHTOOL_A_CABLE_PAIR_3,
> > > > > +};
> > > > 
> > > > Do we really need this enum, couldn't we simply use a number (possibly
> > > > with a sanity check of maximum value)?
> > > 
> > > They are not strictly required. But it helps with consistence. Are the
> > > pairs numbered 0, 1, 2, 3, or 1, 2, 3, 4?
> > 
> > OK, I'm not strictly opposed to it, it just felt a bit weird.
> 
> Speaking of the pairs. What is PAIR_0 and what is PAIR_3? Maybe
> it is specified somewhere in a standard, but IMHO an example for
> a normal TP cable would help to prevent wild growth amongst the
> PHY drivers and would help to provide consistent reporting towards
> the user space.

Hi Michael

Good question

Section 25.4.3 gives the pin out for 100BaseT. There is no pair
numbering, just transmit+, transmit- and receive+, receive- signals.

1000BaseT calls the signals BI_DA+, BI_DA-, BI_DB+, BI_DB-, BI_DC+,
BI_DC-, BI_DDA+, BI_DD-. Comparing the pinout 100BaseT would use
BI_DA+, BI_DA-, BI_DB+, BI_DB. But 1000BaseT does not really have
transmit and receive pairs due to Auto MDI-X.

BroadReach calls the one pair it has BI_DA+/BI_DA-.

Maybe it would be better to have:

enum {
	ETHTOOL_A_CABLE_PAIR_A,
	ETHTOOL_A_CABLE_PAIR_B,
	ETHTOOL_A_CABLE_PAIR_C,
	ETHTOOL_A_CABLE_PAIR_D,
};

	Andrew

Powered by blists - more mailing lists