* [PATCH] net/mlx4_core: Correctly set PFC param if global pause is turned off.
@ 2018-12-07 8:30 Tarick Bedeir
2018-12-07 20:41 ` David Miller
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Tarick Bedeir @ 2018-12-07 8:30 UTC (permalink / raw)
To: Eran Ben Elisha, Tariq Toukan, David S. Miller
Cc: netdev, linux-rdma, linux-kernel, Tarick Bedeir
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,
--
2.20.0.rc2.403.gdbc3b29805-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] net/mlx4_core: Correctly set PFC param if global pause is turned off.
2018-12-07 8:30 [PATCH] net/mlx4_core: Correctly set PFC param if global pause is turned off Tarick Bedeir
@ 2018-12-07 20:41 ` David Miller
2018-12-08 8:41 ` Eran Ben Elisha
2018-12-09 5:27 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-12-07 20:41 UTC (permalink / raw)
To: tarick; +Cc: eranbe, tariqt, netdev, linux-rdma, linux-kernel
From: Tarick Bedeir <tarick@google.com>
Date: Fri, 7 Dec 2018 00:30:26 -0800
> 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>
Tariq and co., please review.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net/mlx4_core: Correctly set PFC param if global pause is turned off.
2018-12-07 8:30 [PATCH] net/mlx4_core: Correctly set PFC param if global pause is turned off Tarick Bedeir
2018-12-07 20:41 ` David Miller
@ 2018-12-08 8:41 ` Eran Ben Elisha
2018-12-09 5:27 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Eran Ben Elisha @ 2018-12-08 8:41 UTC (permalink / raw)
To: Tarick Bedeir, Tariq Toukan, David S. Miller
Cc: netdev, linux-rdma, linux-kernel
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>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net/mlx4_core: Correctly set PFC param if global pause is turned off.
2018-12-07 8:30 [PATCH] net/mlx4_core: Correctly set PFC param if global pause is turned off Tarick Bedeir
2018-12-07 20:41 ` David Miller
2018-12-08 8:41 ` Eran Ben Elisha
@ 2018-12-09 5:27 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-12-09 5:27 UTC (permalink / raw)
To: tarick; +Cc: eranbe, tariqt, netdev, linux-rdma, linux-kernel
From: Tarick Bedeir <tarick@google.com>
Date: Fri, 7 Dec 2018 00:30:26 -0800
> 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>
Applied and queued up for -stable.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-12-09 5:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-07 8:30 [PATCH] net/mlx4_core: Correctly set PFC param if global pause is turned off Tarick Bedeir
2018-12-07 20:41 ` David Miller
2018-12-08 8:41 ` Eran Ben Elisha
2018-12-09 5:27 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.