mirror of https://gitee.com/openkylin/linux.git
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: Shahar Klein <shahark@mellanox.com> Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com> Reviewed-by: Roi Dayan <roid@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
This commit is contained in:
parent
a6d0456912
commit
65360e5451
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue