datapath-windows Release lock on HVUpdateNIC
[cascardo/ovs.git] / datapath / vport.h
index a08a7ce..c289d60 100644 (file)
@@ -101,6 +101,7 @@ struct vport_portids {
  * @ops: Class structure.
  * @percpu_stats: Points to per-CPU statistics used and maintained by vport
  * @err_stats: Points to error statistics used and maintained by vport
+ * @detach_list: list used for detaching vport in net-exit call.
  */
 struct vport {
        struct rcu_head rcu;
@@ -115,6 +116,7 @@ struct vport {
        struct pcpu_sw_netstats __percpu *percpu_stats;
 
        struct vport_err_stats err_stats;
+       struct list_head detach_list;
 };
 
 /**
@@ -173,6 +175,9 @@ struct vport_ops {
        int (*send)(struct vport *, struct sk_buff *);
        int (*get_egress_tun_info)(struct vport *, struct sk_buff *,
                                   struct ovs_tunnel_info *);
+
+       struct module *owner;
+       struct list_head list;
 };
 
 enum vport_err_type {
@@ -221,16 +226,6 @@ static inline struct vport *vport_from_priv(void *priv)
 void ovs_vport_receive(struct vport *, struct sk_buff *,
                       const struct ovs_tunnel_info *);
 
-/* List of statically compiled vport implementations.  Don't forget to also
- * add yours to the list at the top of vport.c.
- */
-extern const struct vport_ops ovs_netdev_vport_ops;
-extern const struct vport_ops ovs_internal_vport_ops;
-extern const struct vport_ops ovs_geneve_vport_ops;
-extern const struct vport_ops ovs_gre_vport_ops;
-extern const struct vport_ops ovs_gre64_vport_ops;
-extern const struct vport_ops ovs_vxlan_vport_ops;
-extern const struct vport_ops ovs_lisp_vport_ops;
 
 static inline void ovs_skb_postpush_rcsum(struct sk_buff *skb,
                                      const void *start, unsigned int len)
@@ -238,4 +233,7 @@ static inline void ovs_skb_postpush_rcsum(struct sk_buff *skb,
        if (skb->ip_summed == CHECKSUM_COMPLETE)
                skb->csum = csum_add(skb->csum, csum_partial(start, len, 0));
 }
+
+int ovs_vport_ops_register(struct vport_ops *ops);
+void ovs_vport_ops_unregister(struct vport_ops *ops);
 #endif /* vport.h */