Commit 11e4257d authored by Maor Gottlieb's avatar Maor Gottlieb Committed by Greg Kroah-Hartman

IB/mlx5: Set source mac address in FTE

commit ee3da804 upstream.

Set the source mac address in the FTE when L2 specification
is provided.

Fixes: 038d2ef8 ('IB/mlx5: Add flow steering support')
Signed-off-by: default avatarMaor Gottlieb <maorg@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d0240249
...@@ -1277,6 +1277,13 @@ static int parse_flow_attr(u32 *match_c, u32 *match_v, ...@@ -1277,6 +1277,13 @@ static int parse_flow_attr(u32 *match_c, u32 *match_v,
dmac_47_16), dmac_47_16),
ib_spec->eth.val.dst_mac); 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) { if (ib_spec->eth.mask.vlan_tag) {
MLX5_SET(fte_match_set_lyr_2_4, outer_headers_c, MLX5_SET(fte_match_set_lyr_2_4, outer_headers_c,
vlan_tag, 1); vlan_tag, 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment