X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=datapath%2Fvport.h;h=8e70762853f4ce0217a6ee32b9d58a36ff3db0f3;hb=d19cedb28fa32091d149749d326707d8405cbbb6;hp=87d561536c14d4f6e42a405d3170ebfb0cf0b68a;hpb=f7cd0081f525dd1d45fafc68397b5393196e978d;p=openvswitch diff --git a/datapath/vport.h b/datapath/vport.h index 87d56153..8e707628 100644 --- a/datapath/vport.h +++ b/datapath/vport.h @@ -22,9 +22,6 @@ struct vport_parms; /* The following definitions are for users of the vport subsytem: */ -void vport_lock(void); -void vport_unlock(void); - int vport_init(void); void vport_exit(void); @@ -77,6 +74,7 @@ struct vport_err_stats { /** * struct vport - one port within a datapath + * @rcu: RCU callback head for deferred destruction. * @port_no: Index into @dp's @ports array. * @dp: Datapath to which this port belongs. * @kobj: Represents /sys/class/net//brport. @@ -97,6 +95,7 @@ struct vport_err_stats { * XAPI for Citrix XenServer. Deprecated. */ struct vport { + struct rcu_head rcu; u16 port_no; struct datapath *dp; struct kobject kobj; @@ -151,7 +150,8 @@ struct vport_parms { * @exit: Called at module unload. * @create: Create a new vport configured as specified. On success returns * a new vport allocated with vport_alloc(), otherwise an ERR_PTR() value. - * @destroy: Detach and destroy a vport. + * @destroy: Destroys a vport. Must call vport_free() on the vport but not + * before an RCU grace period has elapsed. * @set_options: Modify the configuration of an existing vport. May be %NULL * if modification is not supported. * @get_options: Appends vport-specific attributes for the configuration of an @@ -175,7 +175,8 @@ struct vport_parms { * @get_iflink: Get the system interface index associated with the device that * will be used to send packets (may be different than ifindex for tunnels). * May be null if the device does not have an iflink. - * @get_mtu: Get the device's MTU. + * @get_mtu: Get the device's MTU. May be %NULL if the device does not have an + * MTU (as e.g. some tunnels do not). * @send: Send a packet on the device. Returns the length of the packet sent. */ struct vport_ops {