Patch "net/mlx5: E-switch, Fix wrong usage of source port rewrite in split rules" has been added to the 6.1-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, Fix wrong usage of source port rewrite in split rules

to the 6.1-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-fix-wrong-usage-of-source-port-rew.patch
and it can be found in the queue-6.1 subdirectory.

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



commit d4cba42fd15fff65aedc1061a10c6a6dcf10e943
Author: Maor Dickman <maord@xxxxxxxxxx>
Date:   Tue Feb 7 15:07:00 2023 +0200

    net/mlx5: E-switch, Fix wrong usage of source port rewrite in split rules
    
    [ Upstream commit 1313d78ac0c1cfcff7bdece8da54b080e71487c4 ]
    
    In few cases, rules with mirror use case are split to two FTEs, one which
    do the mirror action and forward to second FTE which do the rest of the rule
    actions and the second redirect action.
    In case of mirror rules which do split and forward to ovs internal port or
    VF stack devices, source port rewrite should be used in the second FTE but
    it is wrongly also set in the first FTE which break the offload.
    
    Fix this issue by removing the wrong check if source port rewrite is needed to
    be used on the first FTE of the split and instead return EOPNOTSUPP which will
    block offload of rules which mirror to ovs internal port or VF stack devices
    which isn't supported.
    
    Fixes: 10742efc20a4 ("net/mlx5e: VF tunnel TX traffic offloading")
    Fixes: a508728a4c8b ("net/mlx5e: VF tunnel RX traffic offloading")
    Signed-off-by: Maor Dickman <maord@xxxxxxxxxx>
    Reviewed-by: Roi Dayan <roid@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 5b6c54bde97a2..34790a82a0976 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -696,11 +696,11 @@ mlx5_eswitch_add_fwd_rule(struct mlx5_eswitch *esw,
 
 	flow_act.action = MLX5_FLOW_CONTEXT_ACTION_FWD_DEST;
 	for (i = 0; i < esw_attr->split_count; i++) {
-		if (esw_is_indir_table(esw, attr))
-			err = esw_setup_indir_table(dest, &flow_act, esw, attr, false, &i);
-		else if (esw_is_chain_src_port_rewrite(esw, esw_attr))
-			err = esw_setup_chain_src_port_rewrite(dest, &flow_act, esw, chains, attr,
-							       &i);
+		if (esw_attr->dests[i].flags & MLX5_ESW_DEST_CHAIN_WITH_SRC_PORT_CHANGE)
+			/* Source port rewrite (forward to ovs internal port or statck device) isn't
+			 * supported in the rule of split action.
+			 */
+			err = -EOPNOTSUPP;
 		else
 			esw_setup_vport_dest(dest, &flow_act, esw, esw_attr, i, i, false);
 



[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