diff options
author | Rabie Loulou | 2018-03-18 07:29:04 +0100 |
---|---|---|
committer | Saeed Mahameed | 2018-05-17 23:17:34 +0200 |
commit | 56e858df9f4b917cc49d78831a7f5692075bc78f (patch) | |
tree | 866c6e539e6b3dcd82f1f68c219b256dfb67d8a0 /drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | |
parent | net/mlx5: Add destination e-switch owner (diff) | |
download | kernel-qcow2-linux-56e858df9f4b917cc49d78831a7f5692075bc78f.tar.gz kernel-qcow2-linux-56e858df9f4b917cc49d78831a7f5692075bc78f.tar.xz kernel-qcow2-linux-56e858df9f4b917cc49d78831a7f5692075bc78f.zip |
net/mlx5e: Explicitly set destination e-switch in FDB rules
Set a specific destination e-switch when setting a destination vport.
Signed-off-by: Rabie Loulou <rabiel@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Shahar Klein <shahark@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c index 90c8cb31e633..ea93867d1ab4 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c @@ -72,6 +72,11 @@ mlx5_eswitch_add_offloaded_rule(struct mlx5_eswitch *esw, if (flow_act.action & MLX5_FLOW_CONTEXT_ACTION_FWD_DEST) { dest[i].type = MLX5_FLOW_DESTINATION_TYPE_VPORT; dest[i].vport.num = attr->out_rep->vport; + if (MLX5_CAP_ESW(esw->dev, merged_eswitch)) { + dest[i].vport.vhca_id = + MLX5_CAP_GEN(attr->out_mdev, vhca_id); + dest[i].vport.vhca_id_valid = 1; + } i++; } if (flow_act.action & MLX5_FLOW_CONTEXT_ACTION_COUNT) { |