Skip to content

Commit 1313d78

Browse files
dickmanmaorSaeed Mahameed
authored andcommitted
net/mlx5: E-switch, Fix wrong usage of source port rewrite in split rules
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: 10742ef ("net/mlx5e: VF tunnel TX traffic offloading") Fixes: a508728 ("net/mlx5e: VF tunnel RX traffic offloading") Signed-off-by: Maor Dickman <[email protected]> Reviewed-by: Roi Dayan <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 7ba930f commit 1313d78

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -723,11 +723,11 @@ mlx5_eswitch_add_fwd_rule(struct mlx5_eswitch *esw,
723723

724724
flow_act.action = MLX5_FLOW_CONTEXT_ACTION_FWD_DEST;
725725
for (i = 0; i < esw_attr->split_count; i++) {
726-
if (esw_is_indir_table(esw, attr))
727-
err = esw_setup_indir_table(dest, &flow_act, esw, attr, false, &i);
728-
else if (esw_is_chain_src_port_rewrite(esw, esw_attr))
729-
err = esw_setup_chain_src_port_rewrite(dest, &flow_act, esw, chains, attr,
730-
&i);
726+
if (esw_attr->dests[i].flags & MLX5_ESW_DEST_CHAIN_WITH_SRC_PORT_CHANGE)
727+
/* Source port rewrite (forward to ovs internal port or statck device) isn't
728+
* supported in the rule of split action.
729+
*/
730+
err = -EOPNOTSUPP;
731731
else
732732
esw_setup_vport_dest(dest, &flow_act, esw, esw_attr, i, i, false);
733733

0 commit comments

Comments
 (0)