Patch "net/mlx5: E-Switch, return error if encap isn't supported" has been added to the 5.15-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/mlx5: E-Switch, return error if encap isn't supported

to the 5.15-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-mlx5-e-switch-return-error-if-encap-isn-t-suppor.patch
and it can be found in the queue-5.15 subdirectory.

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



commit a034e3c014ee1e677387ba9209a3797d36c82800
Author: Raed Salem <raeds@xxxxxxxxxx>
Date:   Mon Nov 1 16:18:53 2021 +0200

    net/mlx5: E-Switch, return error if encap isn't supported
    
    [ Upstream commit c4c3176739dfa6efcc5b1d1de4b3fd2b51b048c7 ]
    
    On regular ConnectX HCAs getting encap mode isn't supported when the
    E-Switch is in NONE mode. Current code would return no error code when
    trying to get encap mode in such case which is wrong.
    
    Fix by returning error value to indicate failure to caller in such case.
    
    Fixes: 8e0aa4bc959c ("net/mlx5: E-switch, Protect eswitch mode changes")
    Signed-off-by: Raed Salem <raeds@xxxxxxxxxx>
    Reviewed-by: Mark Bloch <mbloch@xxxxxxxxxx>
    Reviewed-by: Maor Dickman <maord@xxxxxxxxxx>
    Signed-off-by: Saeed Mahameed <saeedm@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
index 08534d562d5a9..0c79e11339362 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -3581,7 +3581,7 @@ int mlx5_devlink_eswitch_encap_mode_get(struct devlink *devlink,
 	*encap = esw->offloads.encap;
 unlock:
 	up_write(&esw->mode_lock);
-	return 0;
+	return err;
 }
 
 static bool



[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