aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/vport-geneve.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/openvswitch/vport-geneve.c')
-rw-r--r--net/openvswitch/vport-geneve.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/net/openvswitch/vport-geneve.c b/net/openvswitch/vport-geneve.c
index 106a9d80b663..70c9765011f4 100644
--- a/net/openvswitch/vport-geneve.c
+++ b/net/openvswitch/vport-geneve.c
@@ -17,6 +17,7 @@
17#include <linux/rculist.h> 17#include <linux/rculist.h>
18#include <linux/udp.h> 18#include <linux/udp.h>
19#include <linux/if_vlan.h> 19#include <linux/if_vlan.h>
20#include <linux/module.h>
20 21
21#include <net/geneve.h> 22#include <net/geneve.h>
22#include <net/icmp.h> 23#include <net/icmp.h>
@@ -28,6 +29,8 @@
28#include "datapath.h" 29#include "datapath.h"
29#include "vport.h" 30#include "vport.h"
30 31
32static struct vport_ops ovs_geneve_vport_ops;
33
31/** 34/**
32 * struct geneve_port - Keeps track of open UDP ports 35 * struct geneve_port - Keeps track of open UDP ports
33 * @gs: The socket created for this port number. 36 * @gs: The socket created for this port number.
@@ -225,11 +228,29 @@ static const char *geneve_get_name(const struct vport *vport)
225 return geneve_port->name; 228 return geneve_port->name;
226} 229}
227 230
228const struct vport_ops ovs_geneve_vport_ops = { 231static struct vport_ops ovs_geneve_vport_ops = {
229 .type = OVS_VPORT_TYPE_GENEVE, 232 .type = OVS_VPORT_TYPE_GENEVE,
230 .create = geneve_tnl_create, 233 .create = geneve_tnl_create,
231 .destroy = geneve_tnl_destroy, 234 .destroy = geneve_tnl_destroy,
232 .get_name = geneve_get_name, 235 .get_name = geneve_get_name,
233 .get_options = geneve_get_options, 236 .get_options = geneve_get_options,
234 .send = geneve_tnl_send, 237 .send = geneve_tnl_send,
238 .owner = THIS_MODULE,
235}; 239};
240
241static int __init ovs_geneve_tnl_init(void)
242{
243 return ovs_vport_ops_register(&ovs_geneve_vport_ops);
244}
245
246static void __exit ovs_geneve_tnl_exit(void)
247{
248 ovs_vport_ops_unregister(&ovs_geneve_vport_ops);
249}
250
251module_init(ovs_geneve_tnl_init);
252module_exit(ovs_geneve_tnl_exit);
253
254MODULE_DESCRIPTION("OVS: Geneve swiching port");
255MODULE_LICENSE("GPL");
256MODULE_ALIAS("vport-type-5");