提交 077b1e80 编写于 作者: M Maor Gottlieb 提交者: David S. Miller

net/mlx5: Mask destination mac value in ethtool steering rules

We need to mask the destination mac value with the destination mac
mask when adding steering rule via ethtool.

Fixes: 1174fce8 ('net/mlx5e: Support l3/l4 flow type specs in ethtool flow steering')
Signed-off-by: NMaor Gottlieb <maorg@mellanox.com>
Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d151d73d
...@@ -247,6 +247,7 @@ static int set_flow_attrs(u32 *match_c, u32 *match_v, ...@@ -247,6 +247,7 @@ static int set_flow_attrs(u32 *match_c, u32 *match_v,
} }
if (fs->flow_type & FLOW_MAC_EXT && if (fs->flow_type & FLOW_MAC_EXT &&
!is_zero_ether_addr(fs->m_ext.h_dest)) { !is_zero_ether_addr(fs->m_ext.h_dest)) {
mask_spec(fs->m_ext.h_dest, fs->h_ext.h_dest, ETH_ALEN);
ether_addr_copy(MLX5_ADDR_OF(fte_match_set_lyr_2_4, ether_addr_copy(MLX5_ADDR_OF(fte_match_set_lyr_2_4,
outer_headers_c, dmac_47_16), outer_headers_c, dmac_47_16),
fs->m_ext.h_dest); fs->m_ext.h_dest);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册