Patch "[PATCH 092/135] net/mlx5e: Don't try to modify CQ moderation if it is" has been added to the 4.4-stable tree
This is a note to let you know that I've just added the patch titled
[PATCH 092/135] net/mlx5e: Don't try to modify CQ moderation if it is
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
0092-net-mlx5e-Don-t-try-to-modify-CQ-moderation-if-it-is.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
c684d74c4d307ebb9f54e8ec9308c44dd6cd4525Mon Sep 17 00:00:00 2001
From: Gal Pressman <[email protected]>
Date: Wed, 2 Mar 2016 00:13:37 +0200
Subject: [PATCH 092/135] net/mlx5e: Don't try to modify CQ moderation if it is
not supported
[ Upstream commit 7524a5d88b94afef8397a79f1e664af5b7052c22 ]
If CQ moderation is not supported by the device, print a warning on netdevice load, and return error when trying to modify/query cq moderation via ethtool.
Ethernet functionality')
--- drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 6 ++++++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 12 ++++++------ 2 files changed, 12 insertions(+), 6 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +6 -0
@@ -399,6 +399,9 @@ static int mlx5e_get_coalesce(struct net {struct mlx5e_priv *priv =netdev_priv (netdev); +if (!MLX5_CAP_GEN (priv->mdev, cq_moderation)) +return -ENOTSUPP ; + coal->rx_coalesce_usecs = priv->params.rx_cq_moderation_usec; coal->rx_max_coalesced_frames = priv->params.rx_cq_moderation_pkts; coal->tx_coalesce_usecs = priv->params.tx_cq_moderation_usec;
@@ -416,6 +419,9 @@ static int mlx5e_set_coalesce(struct netint tc;int i; +if (!MLX5_CAP_GEN (mdev, cq_moderation)) +return -ENOTSUPP ; + priv->params.tx_cq_moderation_usec = coal->tx_coalesce_usecs; priv->params.tx_cq_moderation_pkts = coal->tx_max_coalesced_frames; priv->params.rx_cq_moderation_usec = coal->rx_coalesce_usecs;
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +6 -6
@@ -863,12 +863,10 @@ static int mlx5e_open_cq(struct mlx5e_chif (err) goto err_destroy_cq; - err =mlx5_core_modify_cq_moderation (mdev, &cq->mcq, - moderation_usecs, - moderation_frames); -if (err) - goto err_destroy_cq; - +if (MLX5_CAP_GEN (mdev, cq_moderation)) +mlx5_core_modify_cq_moderation (mdev, &cq->mcq, + moderation_usecs, + moderation_frames);return 0 ; err_destroy_cq:
@@ -1963,6 +1961,8 @@ static int mlx5e_check_required_hca_cap( }if (!MLX5_CAP_ETH (mdev, self_lb_en_modifiable))mlx5_core_warn (mdev,"Self loop back prevention is not supported\n" ); +if (!MLX5_CAP_GEN (mdev, cq_moderation)) +mlx5_core_warn (mdev,"CQ modiration is not supported\n" );return 0 ; }
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/0093-net-mlx5e-Don-t-modify-CQ-before-it-was-created.patch queue-4.4/0092-net-mlx5e-Don-t-try-to-modify-CQ-moderation-if-it-is.patch