Skip to content

Commit 4eacfe7

Browse files
ayalevinSaeed Mahameed
authored andcommitted
net/mlx5e: Fix error path for ethtool set-priv-flag
Expose error value when failing to comply to command: $ ethtool --set-priv-flags eth2 rx_cqe_compress [on/off] Fixes: be7e87f ("net/mlx5e: Fail safe cqe compressing/moderation mode setting") Signed-off-by: Aya Levin <[email protected]> Reviewed-by: Tariq Toukan <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 96b5b45 commit 4eacfe7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1887,6 +1887,7 @@ static int set_pflag_rx_cqe_compress(struct net_device *netdev,
18871887
{
18881888
struct mlx5e_priv *priv = netdev_priv(netdev);
18891889
struct mlx5_core_dev *mdev = priv->mdev;
1890+
int err;
18901891

18911892
if (!MLX5_CAP_GEN(mdev, cqe_compression))
18921893
return -EOPNOTSUPP;
@@ -1896,7 +1897,10 @@ static int set_pflag_rx_cqe_compress(struct net_device *netdev,
18961897
return -EINVAL;
18971898
}
18981899

1899-
mlx5e_modify_rx_cqe_compression_locked(priv, enable);
1900+
err = mlx5e_modify_rx_cqe_compression_locked(priv, enable);
1901+
if (err)
1902+
return err;
1903+
19001904
priv->channels.params.rx_cqe_compress_def = enable;
19011905

19021906
return 0;

0 commit comments

Comments
 (0)