Skip to content

Commit e0cb8af

Browse files
Paul BlakeySaeed Mahameed
authored andcommitted
net/mlx5: E-Switch, Skip restore modify header between prios of same chain
Restore modify header writes the chain mapping on the packet. This modify header and action is added on all prios connections, and gets overwritten with the same value consecutively in prios of the same chain. Use the chain's modify header only for the last prio of a given tc chain. Signed-off-by: Paul Blakey <[email protected]> Reviewed-by: Oz Shlomo <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 0b3a8b6 commit e0cb8af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ mlx5_esw_chains_add_miss_rule(struct fdb_chain *fdb_chain,
422422
dest.type = MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE;
423423
dest.ft = next_fdb;
424424

425-
if (fdb_chain->chain != mlx5_esw_chains_get_ft_chain(esw) &&
425+
if (next_fdb == tc_end_fdb(esw) &&
426426
fdb_modify_header_fwd_to_table_supported(esw)) {
427427
act.modify_hdr = fdb_chain->miss_modify_hdr;
428428
act.action |= MLX5_FLOW_CONTEXT_ACTION_MOD_HDR;

0 commit comments

Comments
 (0)