#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;
netdev_vport->dev->priv_flags |= IFF_OVS_DATAPATH;
rtnl_unlock();
- netdev_init();
return vport;
error_master_upper_dev_unlink:
{
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);