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]
Message-ID: <20210201142029.4b7bd903@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Mon, 1 Feb 2021 14:20:29 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Edwin Peer <edwin.peer@...adcom.com>
Cc:     Danielle Ratson <danieller@...dia.com>,
        Michal Kubecek <mkubecek@...e.cz>,
        netdev <netdev@...r.kernel.org>,
        "David S . Miller" <davem@...emloft.net>,
        Jiri Pirko <jiri@...dia.com>, Andrew Lunn <andrew@...n.ch>,
        "f.fainelli@...il.com" <f.fainelli@...il.com>,
        mlxsw <mlxsw@...dia.com>, Ido Schimmel <idosch@...dia.com>
Subject: Re: [PATCH net-next v3 2/7] ethtool: Get link mode in use instead
 of speed and duplex parameters

On Mon, 1 Feb 2021 13:59:45 -0800 Edwin Peer wrote:
> On Mon, Feb 1, 2021 at 1:41 PM Jakub Kicinski <kuba@...nel.org> wrote:
> > > Each link mode implies a very specific media type, the kernel can
> > > reject illegal combinations based on the supported bitmask before
> > > calling upon the driver to select it.  
> >
> > Are you talking about validation against a driver-supplied list of
> > HW-supported modes, or SFP-supported modes for a currently plugged
> > in module?  
> 
> Should they not be the same thing?

Okay. Does "supported modes" in ethtool for bnxt get ANDed with the
supported modes of the plugged in module?

What happens when no module is plugged in? List all?

I've surveyed this behavior a few years back and three vendors I tested
all had different interpretation on what to list in supported modes :/

> > The concern is around "what happens if user selected nnG-SR4 but user
> > plugged in nnG-CR4". The MAC/PHY/serdes settings will be identical.  
> 
> Yes, there would be multiple link modes that map to the same speed and
> lane combination, but that doesn't mean you need to accept them if the
> media doesn't match what's plugged in also. In the above scenario, the
> supported mask should not list SR because CR is physically plugged in.
> That way, the user knows what options are legal and the kernel knows
> what it can reject.

If the modes depend on what's plugged in - what happens if cable gets
removed? We (you, Danielle, I) can agree what we think is best, but
history teaches us that doesn't matter in long run. We had a similar
conversation when it comes to FEC. There simply is no way for upstream
developers to review the behavior is correct.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ