Commit 65360e54 authored by Shahar Klein's avatar Shahar Klein Committed by Saeed Mahameed

net/mlx5: Properly handle a vport destination when setting FTE

When creating FTE, properly distinguish between destination being vport
or tir. The previous code just worked accidentally b/c of both dest being
in the same offset within a union.
Signed-off-by: default avatarShahar Klein <shahark@mellanox.com>
Reviewed-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: default avatarRoi Dayan <roid@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent a6d04569
......@@ -372,6 +372,9 @@ static int mlx5_cmd_set_fte(struct mlx5_core_dev *dev,
if (dst->dest_attr.type ==
MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE) {
id = dst->dest_attr.ft->id;
} else if (dst->dest_attr.type ==
MLX5_FLOW_DESTINATION_TYPE_VPORT) {
id = dst->dest_attr.vport_num;
} else {
id = dst->dest_attr.tir_num;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment