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: <cf9b9fb2-89a0-e9f3-9dbf-80d68c1ae361@mellanox.com>
Date:   Sat, 8 Dec 2018 08:41:33 +0000
From:   Eran Ben Elisha <eranbe@...lanox.com>
To:     Tarick Bedeir <tarick@...gle.com>,
        Tariq Toukan <tariqt@...lanox.com>,
        "David S. Miller" <davem@...emloft.net>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net/mlx4_core: Correctly set PFC param if global pause is
 turned off.



On 12/7/2018 10:30 AM, Tarick Bedeir wrote:
> rx_ppp and tx_ppp can be set between 0 and 255, so don't clamp to 1.
> 
> Fixes: 6e8814ceb7e8 ("net/mlx4_en: Fix mixed PFC and Global pause user control requests")
> Signed-off-by: Tarick Bedeir <tarick@...gle.com>
> ---
>   drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
> index f11b45001cad..d290f0787dfb 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
> @@ -1084,8 +1084,8 @@ static int mlx4_en_set_pauseparam(struct net_device *dev,
>   
>   	tx_pause = !!(pause->tx_pause);
>   	rx_pause = !!(pause->rx_pause);
> -	rx_ppp = priv->prof->rx_ppp && !(tx_pause || rx_pause);
> -	tx_ppp = priv->prof->tx_ppp && !(tx_pause || rx_pause);
> +	rx_ppp = (tx_pause || rx_pause) ? 0 : priv->prof->rx_ppp;
> +	tx_ppp = (tx_pause || rx_pause) ? 0 : priv->prof->tx_ppp;
>   
>   	err = mlx4_SET_PORT_general(mdev->dev, priv->port,
>   				    priv->rx_skb_size + ETH_FCS_LEN,
> 

thanks for the Tarick.

Reviewed-by: Eran Ben Elisha <eranbe@...lanox.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ