Skip to content

Commit 8c9cc1e

Browse files
roidayankuba-moo
authored andcommitted
net/mlx5: E-Switch, Allow offloading fwd dest flow table with vport
Before this commit a fwd dest flow table resulted in ignoring vport dests which is incorrect and is supported. With this commit the dests can be a mix of flow table and vport dests. There is still a limitation that there cannot be more than one flow table dest. Signed-off-by: Roi Dayan <[email protected]> Reviewed-by: Maor Dickman <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 1330bd9 commit 8c9cc1e

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -483,25 +483,27 @@ esw_setup_dests(struct mlx5_flow_destination *dest,
483483
!(attr->flags & MLX5_ATTR_FLAG_SLOW_PATH)) {
484484
esw_setup_sampler_dest(dest, flow_act, attr->sample_attr.sampler_id, *i);
485485
(*i)++;
486-
} else if (attr->dest_ft) {
487-
esw_setup_ft_dest(dest, flow_act, esw, attr, spec, *i);
488-
(*i)++;
489486
} else if (attr->flags & MLX5_ATTR_FLAG_SLOW_PATH) {
490487
esw_setup_slow_path_dest(dest, flow_act, esw, *i);
491488
(*i)++;
492489
} else if (attr->flags & MLX5_ATTR_FLAG_ACCEPT) {
493490
esw_setup_accept_dest(dest, flow_act, chains, *i);
494491
(*i)++;
495-
} else if (attr->dest_chain) {
496-
err = esw_setup_chain_dest(dest, flow_act, chains, attr->dest_chain,
497-
1, 0, *i);
498-
(*i)++;
499492
} else if (esw_is_indir_table(esw, attr)) {
500493
err = esw_setup_indir_table(dest, flow_act, esw, attr, spec, true, i);
501494
} else if (esw_is_chain_src_port_rewrite(esw, esw_attr)) {
502495
err = esw_setup_chain_src_port_rewrite(dest, flow_act, esw, chains, attr, i);
503496
} else {
504497
*i = esw_setup_vport_dests(dest, flow_act, esw, esw_attr, *i);
498+
499+
if (attr->dest_ft) {
500+
err = esw_setup_ft_dest(dest, flow_act, esw, attr, spec, *i);
501+
(*i)++;
502+
} else if (attr->dest_chain) {
503+
err = esw_setup_chain_dest(dest, flow_act, chains, attr->dest_chain,
504+
1, 0, *i);
505+
(*i)++;
506+
}
505507
}
506508

507509
return err;

0 commit comments

Comments
 (0)