]> git.baikalelectronics.ru Git - kernel.git/commit
net: Call add/kill vid ndo on vlan filter feature toggling
authorGal Pressman <galp@mellanox.com>
Wed, 28 Mar 2018 14:46:54 +0000 (17:46 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 30 Mar 2018 13:58:59 +0000 (09:58 -0400)
commit9cc1e543022e2fd9efddd57d184b9c6c0ab32c3c
tree68e4ed71bac84b9f51e1c2d64a8b41b31195a7a0
parent6b57dfde8437c97e6369fdef0a0aaf6701d359a9
net: Call add/kill vid ndo on vlan filter feature toggling

NETIF_F_HW_VLAN_[CS]TAG_FILTER features require more than just a bit
flip in dev->features in order to keep the driver in a consistent state.
These features notify the driver of each added/removed vlan, but toggling
of vlan-filter does not notify the driver accordingly for each of the
existing vlans.

This patch implements a similar solution to NETIF_F_RX_UDP_TUNNEL_PORT
behavior (which notifies the driver about UDP ports in the same manner
that vids are reported).

Each toggling of the features propagates to the 8021q module, which
iterates over the vlans and call add/kill ndo accordingly.

Signed-off-by: Gal Pressman <galp@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/if_vlan.h
include/linux/netdevice.h
net/8021q/vlan.c
net/8021q/vlan.h
net/8021q/vlan_core.c
net/core/dev.c