mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eran Ben Elisha <eranbe@mellanox.com>
To: Tarick Bedeir <tarick@google.com>,
	Tariq Toukan <tariqt@mellanox.com>,
	"David S. Miller" <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net/mlx4_core: Correctly set PFC param if global pause is turned off.
Date: Sat, 8 Dec 2018 08:41:33 +0000	[thread overview]
Message-ID: <cf9b9fb2-89a0-e9f3-9dbf-80d68c1ae361@mellanox.com> (raw)
In-Reply-To: <20181207083026.173789-1-tarick@google.com>



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@google.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@mellanox.com>

  parent reply	other threads:[~2018-12-08  8:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-07  8:30 Tarick Bedeir
2018-12-07 20:41 ` David Miller
2018-12-08  8:41 ` Eran Ben Elisha [this message]
2018-12-09  5:27 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cf9b9fb2-89a0-e9f3-9dbf-80d68c1ae361@mellanox.com \
    --to=eranbe@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tarick@google.com \
    --cc=tariqt@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®