Patch "net/mlx5e: Correctly report errors for ethtool rx flows" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net/mlx5e: Correctly report errors for ethtool rx flows

to the 5.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:
     net-mlx5e-correctly-report-errors-for-ethtool-rx-flo.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit a94ac5e33730afc8a292b7a1de5f9c7cb884be22
Author: Cosmin Ratiu <cratiu@xxxxxxxxxx>
Date:   Thu Aug 8 17:41:05 2024 +0300

    net/mlx5e: Correctly report errors for ethtool rx flows
    
    [ Upstream commit cbc796be1779c4dbc9a482c7233995e2a8b6bfb3 ]
    
    Previously, an ethtool rx flow with no attrs would not be added to the
    NIC as it has no rules to configure the hw with, but it would be
    reported as successful to the caller (return code 0). This is confusing
    for the user as ethtool then reports "Added rule $num", but no rule was
    actually added.
    
    This change corrects that by instead reporting these wrong rules as
    -EINVAL.
    
    Fixes: b29c61dac3a2 ("net/mlx5e: Ethtool steering flow validation refactoring")
    Signed-off-by: Cosmin Ratiu <cratiu@xxxxxxxxxx>
    Reviewed-by: Saeed Mahameed <saeedm@xxxxxxxxxx>
    Reviewed-by: Dragos Tatulea <dtatulea@xxxxxxxxxx>
    Signed-off-by: Tariq Toukan <tariqt@xxxxxxxxxx>
    Link: https://patch.msgid.link/20240808144107.2095424-5-tariqt@xxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c
index acd946f2ddbe7..be49a2a53f29d 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c
@@ -676,7 +676,7 @@ mlx5e_ethtool_flow_replace(struct mlx5e_priv *priv,
 	if (num_tuples <= 0) {
 		netdev_warn(priv->netdev, "%s: flow is not valid %d\n",
 			    __func__, num_tuples);
-		return num_tuples;
+		return num_tuples < 0 ? num_tuples : -EINVAL;
 	}
 
 	eth_ft = get_flow_table(priv, fs, num_tuples);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux