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: <20200421105551.6f41673a@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Tue, 21 Apr 2020 10:55:51 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Cc:     davem@...emloft.net,
        Arkadiusz Kubalewski <arkadiusz.kubalewski@...el.com>,
        netdev@...r.kernel.org, nhorman@...hat.com, sassmann@...hat.com,
        Piotr Kwapulinski <piotr.kwapulinski@...el.com>,
        Aleksandr Loktionov <aleksandr.loktionov@...el.com>,
        Andrew Bowers <andrewx.bowers@...el.com>
Subject: Re: [net-next 3/4] i40e: Add support for a new feature: Total Port
 Shutdown

On Mon, 20 Apr 2020 18:49:31 -0700 Jeff Kirsher wrote:
> From: Arkadiusz Kubalewski <arkadiusz.kubalewski@...el.com>
> 
> Currently after requesting to down a link on a physical network port,
> the traffic is no longer being processed but the physical link
> with a link partner is still established.
> 
> Total Port Shutdown allows to completely shutdown the port on the
> link-down procedure by physically removing the link from the port.
> 
> Introduced changes:
> - probe NVM if the feature was enabled at initialization of the port
> - special handling on link-down procedure to let FW physically
> shutdown the port if the feature was enabled

How is this different than link-down-on-close?

Perhaps it'd be good to start documenting the private flags in
Documentation/

> Testing Hints (required if no HSD):
> Link up/down, link-down-on-close
> 
> Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@...el.com>
> Signed-off-by: Piotr Kwapulinski <piotr.kwapulinski@...el.com>
> Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@...el.com>
> Tested-by: Andrew Bowers <andrewx.bowers@...el.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>

> @@ -12012,6 +12085,16 @@ static int i40e_sw_init(struct i40e_pf *pf)
>  
>  	pf->tx_timeout_recovery_level = 1;
>  
> +	if (pf->hw.mac.type != I40E_MAC_X722 &&
> +	    i40e_is_total_port_shutdown_enabled(pf)) {
> +		/* Link down on close must be on when total port shutdown
> +		 * is enabled for a given port
> +		 */
> +		pf->flags |= (I40E_FLAG_TOTAL_PORT_SHUTDOWN
> +			  | I40E_FLAG_LINK_DOWN_ON_CLOSE_ENABLED);

FWIW this is the correct code style in the kernel:

flags = BLA |
        BLA2;

> +		dev_info(&pf->pdev->dev,
> +			 "Total Port Shutdown is enabled, link-down-on-close forced on\n");
> +	}
>  	mutex_init(&pf->switch_mutex);
>  
>  sw_init_done:

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ