diff options
Diffstat (limited to 'net/openvswitch/vport-netdev.c')
-rw-r--r-- | net/openvswitch/vport-netdev.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/net/openvswitch/vport-netdev.c b/net/openvswitch/vport-netdev.c index d21f77d875ba..877ee74b4f08 100644 --- a/net/openvswitch/vport-netdev.c +++ b/net/openvswitch/vport-netdev.c | |||
@@ -33,6 +33,8 @@ | |||
33 | #include "vport-internal_dev.h" | 33 | #include "vport-internal_dev.h" |
34 | #include "vport-netdev.h" | 34 | #include "vport-netdev.h" |
35 | 35 | ||
36 | static struct vport_ops ovs_netdev_vport_ops; | ||
37 | |||
36 | /* Must be called with rcu_read_lock. */ | 38 | /* Must be called with rcu_read_lock. */ |
37 | static void netdev_port_receive(struct vport *vport, struct sk_buff *skb) | 39 | static void netdev_port_receive(struct vport *vport, struct sk_buff *skb) |
38 | { | 40 | { |
@@ -224,10 +226,20 @@ struct vport *ovs_netdev_get_vport(struct net_device *dev) | |||
224 | return NULL; | 226 | return NULL; |
225 | } | 227 | } |
226 | 228 | ||
227 | const struct vport_ops ovs_netdev_vport_ops = { | 229 | static struct vport_ops ovs_netdev_vport_ops = { |
228 | .type = OVS_VPORT_TYPE_NETDEV, | 230 | .type = OVS_VPORT_TYPE_NETDEV, |
229 | .create = netdev_create, | 231 | .create = netdev_create, |
230 | .destroy = netdev_destroy, | 232 | .destroy = netdev_destroy, |
231 | .get_name = ovs_netdev_get_name, | 233 | .get_name = ovs_netdev_get_name, |
232 | .send = netdev_send, | 234 | .send = netdev_send, |
233 | }; | 235 | }; |
236 | |||
237 | int __init ovs_netdev_init(void) | ||
238 | { | ||
239 | return ovs_vport_ops_register(&ovs_netdev_vport_ops); | ||
240 | } | ||
241 | |||
242 | void ovs_netdev_exit(void) | ||
243 | { | ||
244 | ovs_vport_ops_unregister(&ovs_netdev_vport_ops); | ||
245 | } | ||