X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=datapath%2Fvport-netdev.c;h=c15923b2048515339ea6cac36da56ea4f962d2c2;hb=95986f397de7e5eb8d202c115d1dab5b67777747;hp=778038634aaeec4b06f0f7567a8412efaf5a7c49;hpb=0386824614e9739d4b20b8355cfe973d0a3655c7;p=sliver-openvswitch.git diff --git a/datapath/vport-netdev.c b/datapath/vport-netdev.c index 778038634..c15923b20 100644 --- a/datapath/vport-netdev.c +++ b/datapath/vport-netdev.c @@ -84,36 +84,6 @@ static struct sk_buff *netdev_frame_hook(struct net_bridge_port *p, #error #endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) || \ - defined HAVE_RHEL_OVS_HOOK -static int netdev_init(void) { return 0; } -static void netdev_exit(void) { } -#else -static int port_count; - -static void netdev_init(void) -{ - port_count++; - if (port_count > 1) - return; - - /* Hook into callback used by the bridge to intercept packets. - * Parasites we are. */ - br_handle_frame_hook = netdev_frame_hook; - - return; -} - -static void netdev_exit(void) -{ - port_count--; - if (port_count > 0) - return; - - br_handle_frame_hook = NULL; -} -#endif - static struct net_device *get_dpdev(struct datapath *dp) { struct vport *local; @@ -166,7 +136,6 @@ static struct vport *netdev_create(const struct vport_parms *parms) netdev_vport->dev->priv_flags |= IFF_OVS_DATAPATH; rtnl_unlock(); - netdev_init(); return vport; error_master_upper_dev_unlink: @@ -206,8 +175,6 @@ static void netdev_destroy(struct vport *vport) { struct netdev_vport *netdev_vport = netdev_vport_priv(vport); - netdev_exit(); - rtnl_lock(); if (ovs_netdev_get_vport(netdev_vport->dev)) ovs_netdev_detach_dev(vport);