summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-04-21 15:36:04 -0400
committerDavid S. Miller <davem@davemloft.net>2016-04-21 15:36:04 -0400
commit22d37b6b0058365a80378ee6198d21e7f6c86327 (patch)
treedfb1140e166ecf89f994f667e0cb9e73969845e8 /include/net
parent7f348a60762afd4cd0e4e7fa14cfa66331b7c30e (diff)
parent681e683ff30ada19f73c17c38a528528dd8824f1 (diff)
downloadblackbird-obmc-linux-22d37b6b0058365a80378ee6198d21e7f6c86327.tar.gz
blackbird-obmc-linux-22d37b6b0058365a80378ee6198d21e7f6c86327.zip
Merge branch 'geneve-vxlan-deps'
Hannes Frederic Sowa says: ==================== net: network drivers should not depend on geneve/vxlan This patchset removes the dependency of network drivers on vxlan or geneve, so those don't get autoloaded when the nic driver is loaded. Also audited the code such that vxlan_get_rx_port and geneve_get_rx_port are not called without rtnl lock. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/geneve.h6
-rw-r--r--include/net/vxlan.h6
2 files changed, 4 insertions, 8 deletions
diff --git a/include/net/geneve.h b/include/net/geneve.h
index e6c23dc765f7..cb544a530146 100644
--- a/include/net/geneve.h
+++ b/include/net/geneve.h
@@ -62,13 +62,11 @@ struct genevehdr {
struct geneve_opt options[];
};
-#if IS_ENABLED(CONFIG_GENEVE)
-void geneve_get_rx_port(struct net_device *netdev);
-#else
static inline void geneve_get_rx_port(struct net_device *netdev)
{
+ ASSERT_RTNL();
+ call_netdevice_notifiers(NETDEV_OFFLOAD_PUSH_GENEVE, netdev);
}
-#endif
#ifdef CONFIG_INET
struct net_device *geneve_dev_create_fb(struct net *net, const char *name,
diff --git a/include/net/vxlan.h b/include/net/vxlan.h
index d442eb3129cd..673e9f9e6da7 100644
--- a/include/net/vxlan.h
+++ b/include/net/vxlan.h
@@ -390,13 +390,11 @@ static inline __be32 vxlan_compute_rco(unsigned int start, unsigned int offset)
return vni_field;
}
-#if IS_ENABLED(CONFIG_VXLAN)
-void vxlan_get_rx_port(struct net_device *netdev);
-#else
static inline void vxlan_get_rx_port(struct net_device *netdev)
{
+ ASSERT_RTNL();
+ call_netdevice_notifiers(NETDEV_OFFLOAD_PUSH_VXLAN, netdev);
}
-#endif
static inline unsigned short vxlan_get_sk_family(struct vxlan_sock *vs)
{
OpenPOWER on IntegriCloud