summaryrefslogtreecommitdiff
path: root/datapath/vport-netdev.c
diff options
context:
space:
mode:
authorPravin B Shelar <pshelar@nicira.com>2013-10-29 14:10:26 -0700
committerPravin B Shelar <pshelar@nicira.com>2013-10-27 15:03:58 -0700
commit95986f397de7e5eb8d202c115d1dab5b67777747 (patch)
treefa6aef0a3aadd7b055c0c0c3c08d3219bb605188 /datapath/vport-netdev.c
parent0386824614e9739d4b20b8355cfe973d0a3655c7 (diff)
downloadopenvswitch-95986f397de7e5eb8d202c115d1dab5b67777747.tar.gz
datapath: Simplify vport-netdev-hook compatibility code.
Move compat code to netdev_rx_handler_register() definition. It also adds type safety for netdev-hook. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'datapath/vport-netdev.c')
-rw-r--r--datapath/vport-netdev.c33
1 files changed, 0 insertions, 33 deletions
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);