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] [day] [month] [year] [list]
Message-ID: <20210111095704.2f8622c6@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Mon, 11 Jan 2021 09:57:04 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Danielle Ratson <danieller@...dia.com>
Cc:     Danielle Ratson <danieller@...lanox.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "davem@...emloft.net" <davem@...emloft.net>,
        Jiri Pirko <jiri@...dia.com>,
        "andrew@...n.ch" <andrew@...n.ch>,
        "f.fainelli@...il.com" <f.fainelli@...il.com>,
        "mkubecek@...e.cz" <mkubecek@...e.cz>, mlxsw <mlxsw@...dia.com>,
        Ido Schimmel <idosch@...dia.com>
Subject: Re: [PATCH net-next repost v2 1/7] ethtool: Extend link modes
 settings uAPI with lanes

On Mon, 11 Jan 2021 14:00:20 +0000 Danielle Ratson wrote:
> > > @@ -420,6 +423,7 @@ struct ethtool_pause_stats {
> > >   * of the generic netdev features interface.
> > >   */
> > >  struct ethtool_ops {
> > > +	u32     capabilities;  
> > 
> > An appropriately named bitfield seems better. Alternatively maybe let the driver specify which lane counts it can accept?  
> 
> Not sure what did you mean, can you please explain?

-	u32     capabilities;  
+	u32	cap_link_lanes_supported:1;

or

-	u32     capabilities;  
+	u8	max_link_lanes;

		if (!lsettings->autoneg &&
-		    !(dev->ethtool_ops->capabilities & ETHTOOL_CAP_LINK_LANES_SUPPORTED)) {
+		    dev->ethtool_ops->max_link_lanes < req_lanes) {
			NL_SET_ERR_MSG_ATTR(info->extack,
					    tb[ETHTOOL_A_LINKMODES_LANES],
+					    dev->ethtool_ops->max_link_lanes ?
+					    "device does not support this many lanes" :
					    "lanes configuration not supported by device");
			return -EOPNOTSUPP;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ