aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShahar Klein <shahark@mellanox.com>2018-03-22 05:56:51 -0400
committerSaeed Mahameed <saeedm@mellanox.com>2018-05-17 17:17:34 -0400
commit65360e5451121e493944776a7e33d1345c8483e6 (patch)
treee709baf6220e2c11a41860663decb5dfba5bef6b
parenta6d04569120d53ebac1f0e6ffd5497b22c75f037 (diff)
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>
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c
index ef5afd7c9325..0bfce6a82c91 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c
@@ -372,6 +372,9 @@ static int mlx5_cmd_set_fte(struct mlx5_core_dev *dev,
372 if (dst->dest_attr.type == 372 if (dst->dest_attr.type ==
373 MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE) { 373 MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE) {
374 id = dst->dest_attr.ft->id; 374 id = dst->dest_attr.ft->id;
375 } else if (dst->dest_attr.type ==
376 MLX5_FLOW_DESTINATION_TYPE_VPORT) {
377 id = dst->dest_attr.vport_num;
375 } else { 378 } else {
376 id = dst->dest_attr.tir_num; 379 id = dst->dest_attr.tir_num;
377 } 380 }