summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorGal Pressman <galp@mellanox.com>2018-03-28 17:46:54 +0300
committerDavid S. Miller <davem@davemloft.net>2018-03-30 09:58:59 -0400
commit9daae9bd47cff82a2a06aca23c458d6c79d09d52 (patch)
tree68e4ed71bac84b9f51e1c2d64a8b41b31195a7a0 /net/core
parent004c3cf1a18becf5ce56f43e8821835e34c15865 (diff)
downloadop-kernel-dev-9daae9bd47cff82a2a06aca23c458d6c79d09d52.zip
op-kernel-dev-9daae9bd47cff82a2a06aca23c458d6c79d09d52.tar.gz
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>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index eca5458..1ddb6b9 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1584,6 +1584,8 @@ const char *netdev_cmd_to_name(enum netdev_cmd cmd)
N(RESEND_IGMP) N(PRECHANGEMTU) N(CHANGEINFODATA) N(BONDING_INFO)
N(PRECHANGEUPPER) N(CHANGELOWERSTATE) N(UDP_TUNNEL_PUSH_INFO)
N(UDP_TUNNEL_DROP_INFO) N(CHANGE_TX_QUEUE_LEN)
+ N(CVLAN_FILTER_PUSH_INFO) N(CVLAN_FILTER_DROP_INFO)
+ N(SVLAN_FILTER_PUSH_INFO) N(SVLAN_FILTER_DROP_INFO)
};
#undef N
return "UNKNOWN_NETDEV_EVENT";
@@ -7665,6 +7667,24 @@ sync_lower:
}
}
+ if (diff & NETIF_F_HW_VLAN_CTAG_FILTER) {
+ if (features & NETIF_F_HW_VLAN_CTAG_FILTER) {
+ dev->features = features;
+ err |= vlan_get_rx_ctag_filter_info(dev);
+ } else {
+ vlan_drop_rx_ctag_filter_info(dev);
+ }
+ }
+
+ if (diff & NETIF_F_HW_VLAN_STAG_FILTER) {
+ if (features & NETIF_F_HW_VLAN_STAG_FILTER) {
+ dev->features = features;
+ err |= vlan_get_rx_stag_filter_info(dev);
+ } else {
+ vlan_drop_rx_stag_filter_info(dev);
+ }
+ }
+
dev->features = features;
}
OpenPOWER on IntegriCloud