summaryrefslogtreecommitdiffstats
path: root/net/openvswitch/vport.c
diff options
context:
space:
mode:
authorPravin B Shelar <pshelar@nicira.com>2013-06-17 17:50:33 -0700
committerDavid S. Miller <davem@davemloft.net>2013-06-19 18:07:42 -0700
commitaa310701e787087dbfbccf1409982a96e16c57a6 (patch)
treef426945de6694203f2c34218b4e4b06913b8f58c /net/openvswitch/vport.c
parenta3e82996a8874c4cfe8c7f1be4d552018d8cba7e (diff)
downloadop-kernel-dev-aa310701e787087dbfbccf1409982a96e16c57a6.zip
op-kernel-dev-aa310701e787087dbfbccf1409982a96e16c57a6.tar.gz
openvswitch: Add gre tunnel support.
Add gre vport implementation. Most of gre protocol processing is pushed to gre module. It make use of gre demultiplexer therefore it can co-exist with linux device based gre tunnels. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/vport.c')
-rw-r--r--net/openvswitch/vport.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c
index 413287a..f52dfb9 100644
--- a/net/openvswitch/vport.c
+++ b/net/openvswitch/vport.c
@@ -38,6 +38,10 @@
static const struct vport_ops *vport_ops_list[] = {
&ovs_netdev_vport_ops,
&ovs_internal_vport_ops,
+
+#ifdef CONFIG_NET_IPGRE_DEMUX
+ &ovs_gre_vport_ops,
+#endif
};
/* Protected by RCU read lock for reading, ovs_mutex for writing. */
@@ -404,3 +408,18 @@ void ovs_vport_record_error(struct vport *vport, enum vport_err_type err_type)
spin_unlock(&vport->stats_lock);
}
+
+static void free_vport_rcu(struct rcu_head *rcu)
+{
+ struct vport *vport = container_of(rcu, struct vport, rcu);
+
+ ovs_vport_free(vport);
+}
+
+void ovs_vport_deferred_free(struct vport *vport)
+{
+ if (!vport)
+ return;
+
+ call_rcu(&vport->rcu, free_vport_rcu);
+}
OpenPOWER on IntegriCloud