summaryrefslogtreecommitdiff
path: root/datapath/vport-lisp.c
diff options
context:
space:
mode:
authorJustin Pettit <jpettit@nicira.com>2015-04-12 10:13:59 -0700
committerJustin Pettit <jpettit@nicira.com>2015-04-12 10:13:59 -0700
commitdaaeeec0bd4348b1f6ac5ca5a302e57bd11cca01 (patch)
tree5b34ccd589c61547044dfbfcf77636bfcd8ebb61 /datapath/vport-lisp.c
parent717c7fc508044d08210c686c1e8576c29a108f86 (diff)
parente8fe6ad03aa3d25b5ae99190d5aa065705a1b3c8 (diff)
downloadopenvswitch-daaeeec0bd4348b1f6ac5ca5a302e57bd11cca01.tar.gz
Merge remote-tracking branch 'origin/master' into ovn
Conflicts: tutorial/ovs-sandbox
Diffstat (limited to 'datapath/vport-lisp.c')
-rw-r--r--datapath/vport-lisp.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/datapath/vport-lisp.c b/datapath/vport-lisp.c
index 293002fe9..0024eb480 100644
--- a/datapath/vport-lisp.c
+++ b/datapath/vport-lisp.c
@@ -24,6 +24,7 @@
#include <linux/in.h>
#include <linux/ip.h>
#include <linux/net.h>
+#include <linux/module.h>
#include <linux/rculist.h>
#include <linux/udp.h>
@@ -110,6 +111,7 @@ struct lisp_port {
};
static LIST_HEAD(lisp_ports);
+static struct vport_ops ovs_lisp_vport_ops;
static inline struct lisp_port *lisp_vport(const struct vport *vport)
{
@@ -493,7 +495,7 @@ static int lisp_get_egress_tun_info(struct vport *vport, struct sk_buff *skb,
lisp_port->dst_port);
}
-const struct vport_ops ovs_lisp_vport_ops = {
+static struct vport_ops ovs_lisp_vport_ops = {
.type = OVS_VPORT_TYPE_LISP,
.create = lisp_tnl_create,
.destroy = lisp_tnl_destroy,
@@ -501,4 +503,22 @@ const struct vport_ops ovs_lisp_vport_ops = {
.get_options = lisp_get_options,
.send = lisp_send,
.get_egress_tun_info = lisp_get_egress_tun_info,
+ .owner = THIS_MODULE,
};
+
+static int __init ovs_lisp_tnl_init(void)
+{
+ return ovs_vport_ops_register(&ovs_lisp_vport_ops);
+}
+
+static void __exit ovs_lisp_tnl_exit(void)
+{
+ ovs_vport_ops_unregister(&ovs_lisp_vport_ops);
+}
+
+module_init(ovs_lisp_tnl_init);
+module_exit(ovs_lisp_tnl_exit);
+
+MODULE_DESCRIPTION("OVS: LISP switching port");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("vport-type-105");