]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Update hw flows when encap source mac changed
authorTonghao Zhang <xiangxia.m.yue@gmail.com>
Mon, 28 Jan 2019 23:28:05 +0000 (15:28 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Feb 2019 01:12:13 +0000 (17:12 -0800)
commite43ed5b991fdd04269c65b6ed357c5ffc1abfc6c
tree6b761039cec2fcde0625d59407e86a8c35dbab47
parentb99d44dd43b6440a4d25ef4c87ca095f24f2fdbb
net/mlx5e: Update hw flows when encap source mac changed

When we offload tc filters to hardware, hardware flows can
be updated when mac of encap destination ip is changed.
But we ignore one case, that the mac of local encap ip can
be changed too, so we should also update them.

To fix it, add route_dev in mlx5e_encap_entry struct to save
the local encap netdevice, and when mac changed, kernel will
flush all the neighbour on the netdevice and send NETEVENT_NEIGH_UPDATE
event. The mlx5 driver will delete the flows and add them when neighbour
available again.

Fixes: de0289686ab6 ("net/mlx5e: Add support to neighbour update flow")
Cc: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
drivers/net/ethernet/mellanox/mlx5/core/en_rep.h