Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;
			}