summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaor Gottlieb <maorg@mellanox.com>2016-09-12 19:16:24 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-10-07 15:21:27 +0200
commit11e4257d6f382b890d872bd8c9fa5c9f266ce2b9 (patch)
treebf416937e34281b0367a94d29b3195b96f6230a7
parentd02402496370a80d6fe0d72a73d9a3b6b297cd1e (diff)
downloadlwn-11e4257d6f382b890d872bd8c9fa5c9f266ce2b9.tar.gz
lwn-11e4257d6f382b890d872bd8c9fa5c9f266ce2b9.zip
IB/mlx5: Set source mac address in FTE
commit ee3da804ad1b1dd4c766199a6e8443542b0aaaef upstream. Set the source mac address in the FTE when L2 specification is provided. Fixes: 038d2ef87572 ('IB/mlx5: Add flow steering support') Signed-off-by: Maor Gottlieb <maorg@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Doug Ledford <dledford@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/infiniband/hw/mlx5/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index b8679e84b14f..c90f57579a92 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -1277,6 +1277,13 @@ static int parse_flow_attr(u32 *match_c, u32 *match_v,
dmac_47_16),
ib_spec->eth.val.dst_mac);
+ ether_addr_copy(MLX5_ADDR_OF(fte_match_set_lyr_2_4, outer_headers_c,
+ smac_47_16),
+ ib_spec->eth.mask.src_mac);
+ ether_addr_copy(MLX5_ADDR_OF(fte_match_set_lyr_2_4, outer_headers_v,
+ smac_47_16),
+ ib_spec->eth.val.src_mac);
+
if (ib_spec->eth.mask.vlan_tag) {
MLX5_SET(fte_match_set_lyr_2_4, outer_headers_c,
vlan_tag, 1);