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: <20180226181948.1ac4fdfa@cakuba.netronome.com>
Date:   Mon, 26 Feb 2018 18:19:48 -0800
From:   Jakub Kicinski <kubakici@...pl>
To:     Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
        Mariusz Stachura <mariusz.stachura@...el.com>
Cc:     davem@...emloft.net, netdev@...r.kernel.org, nhorman@...hat.com,
        sassmann@...hat.com, jogreene@...hat.com,
        Mitch Williams <mitch.a.williams@...el.com>
Subject: Re: [net-next 1/7] i40e: link_down_on_close private flag support

On Mon, 26 Feb 2018 13:39:25 -0800, Jeff Kirsher wrote:
> From: Mariusz Stachura <mariusz.stachura@...el.com>
> 
> This patch introduces new ethtool private flag used for
> forcing true link state. Function i40e_force_link_state that implements
> this functionality was added, it sets phy_type = 0 in order to
> work-around firmware's LESM. False positive error messages were
> suppressed.
> 
> The ndo_open() should not succeed if there were issues with forcing link
> state to be UP.
> 
> Added I40E_PHY_TYPES_BITMASK define with all phy types OR-ed together in
> one bitmask.  Added after phy type definition, so it will be hard to
> forget to include new phy types to the bitmask.
> 
> CC: Jakub Kicinski <kubakici@...pl>
> Signed-off-by: Mariusz Stachura <mariusz.stachura@...el.com>
> Signed-off-by: Mitch Williams <mitch.a.williams@...el.com>
> Tested-by: Andrew Bowers <andrewx.bowers@...el.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>

Thanks, from functional perspective this looks reasonable AFAICT.

We may want to have a conversation about priv flags like this at later
time, since I guess more NICs won't bring the link down when netdev is
closed today..  Although it maybe a larger endeavour, perhaps it would 
be cool to communicate to the user the reason why MAC/PHY is on in some
standard way..  NC-SI and multi-host comes to mind.  

> @@ -7524,6 +7596,9 @@ int i40e_open(struct net_device *netdev)
>  
>  	netif_carrier_off(netdev);
>  
> +	if (i40e_force_link_state(pf, true))
> +		return -EAGAIN;

There are some minor style issues with the rest of the patch, but here
you may want to (a) propagate the actual error value;

>  	err = i40e_vsi_open(vsi);
>  	if (err)
>  		return err;

(b) undo the link state if vsi_open() fails.

Maybe that's a bit of a nitpick...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ