mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 23:58:05 +00:00
net/mlx5e: Fix error path for ethtool set-priv-flag
[ Upstream commit4eacfe72e3
] Expose error value when failing to comply to command: $ ethtool --set-priv-flags eth2 rx_cqe_compress [on/off] Fixes:be7e87f92b
("net/mlx5e: Fail safe cqe compressing/moderation mode setting") Signed-off-by: Aya Levin <ayal@nvidia.com> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
235d33fe3d
commit
a9923184fa
1 changed files with 5 additions and 1 deletions
|
@ -1747,6 +1747,7 @@ static int set_pflag_rx_cqe_compress(struct net_device *netdev,
|
|||
{
|
||||
struct mlx5e_priv *priv = netdev_priv(netdev);
|
||||
struct mlx5_core_dev *mdev = priv->mdev;
|
||||
int err;
|
||||
|
||||
if (!MLX5_CAP_GEN(mdev, cqe_compression))
|
||||
return -EOPNOTSUPP;
|
||||
|
@ -1756,7 +1757,10 @@ static int set_pflag_rx_cqe_compress(struct net_device *netdev,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
mlx5e_modify_rx_cqe_compression_locked(priv, enable);
|
||||
err = mlx5e_modify_rx_cqe_compression_locked(priv, enable);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
priv->channels.params.rx_cqe_compress_def = enable;
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue