From 17cd2a70461d31fbe1a43e25a3ae78e9e869fda0 Mon Sep 17 00:00:00 2001 From: Jiawei Wang Date: Tue, 9 Feb 2021 15:14:09 +0200 Subject: [PATCH] mlx5: DR, Fix the default miss vport [ Upstream commit 68b272d7fb2fca010a368265d0423b7f47d0608f ] For FDB sample flow, the termination table on sample destination path must go to the eswitch manager vport. On BlueField, the eswitch manager vport is 0xfffe rather than 0. Change to set the correct destination vport depends on the current eswitch function is ECPF or PF. Fixes: 161d5ad37556 ("mlx5: DR, Add support for destination array action") Signed-off-by: Jiawei Wang Reviewed-by: Hamdan Igbaria Signed-off-by: Yishai Hadas Signed-off-by: Nicolas Morey --- providers/mlx5/dr_action.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/providers/mlx5/dr_action.c b/providers/mlx5/dr_action.c index 4372f413f..d4eb694f0 100644 --- a/providers/mlx5/dr_action.c +++ b/providers/mlx5/dr_action.c @@ -2384,6 +2384,8 @@ dr_action_convert_to_fte_dest(struct mlx5dv_dr_domain *dmn, fte_attr->action |= MLX5_FLOW_CONTEXT_ACTION_FWD_DEST; dest_info->type = MLX5_FLOW_DEST_TYPE_VPORT; + if (dmn->info.caps.is_ecpf) + dest_info->vport_num = ECPF_PORT; break; case DR_ACTION_TYP_VPORT: if (dmn->type != MLX5DV_DR_DOMAIN_TYPE_FDB)