[ovs-dev] [PATCH 3/3] ofproto-dpif-xlate: Implement RCU locking in ofproto-dpif-xlate.
alexw at nicira.com
Fri May 9 18:48:01 UTC 2014
Great to see this series.
Based on the offline discussion with Ryan, we think it is not ideal to
double-standard that xlate module cannot take reference to netdev while
modules (e.g. bfd/cfm) must. This makes the code more complicated.
The root cause of this double-standard is the need to guarantee that netdev
does not contains the netdev when it is certain to be removed. Currently,
xport deletion may cause the netdev still in the shash and prevent the
new netdev with same name
One idea is to move the "removal of netdev from shash" logic into a
And this function should be called whenever we are sure the netdev will be
there are not too many places and it is not invovled)
We will discuss this further, and update the thread with the direction to
> +xlate_xport_copy(struct xbridge *xbridge, struct xbundle *xbundle,
> + struct xport *xport)
> + struct skb_priority_to_dscp *pdscp, *new_pdscp;
> + struct xport *new_xport = xzalloc(sizeof *xport);
> + new_xport->ofport = xport->ofport;
> + new_xport->ofp_port = xport->ofp_port;
> + new_xport->xbridge = xbridge;
> + xlate_xport_init(new_xport);
> + xlate_xport_set(new_xport, xport->odp_port, xport->cfm, xport->bfd,
> + xport->stp_port_no, xport->config, xport->state,
> + xport->is_tunnel, xport->may_enable);
> + /* Note that RCU read threads do not take a reference to netdev since
> + * blocks creation of netdevs with the same name after deletion or
> + * modification of the netdev */
> + new_xport->netdev = xport->netdev;
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dev