[ovs-dev] [netlink v3 4/5] vport: Add smp_wmb() to vport_alloc().

Ben Pfaff blp at nicira.com
Fri Dec 3 21:09:22 UTC 2010


On Thu, Dec 02, 2010 at 06:52:26PM -0800, Jesse Gross wrote:
> On Tue, Nov 16, 2010 at 5:11 PM, Ben Pfaff <blp at nicira.com> wrote:
> > I'm not sure whether this is necessary or makes sense.  If it does, then
> > it should be folded into the previous commit.  If it doesn't, then this
> > commit should be dropped.
> 
> I think it's probably generally unnecessary (it's certainly not needed
> by any of the current vport implementations).  In order to receive
> packets on a different CPU, the vport would need to hand off the
> struct vport pointer somehow.  To do that without any kind of memory
> barrier seems like a bug to me.  Furthermore, the vport implementation
> is required to execute the corresponding read memory barrier, so it's
> better to be symmetrical.

OK, dropped this commit.

> Looking at vport_alloc() further, I would also drop the
> rcu_assign_pointer() in the assignment of params->dp to vport->dp from
> the last commit.  We don't use rcu_dereference on read for it, so
> again it would good to be symmetrical.

OK, I made that change too.

Thank you!




More information about the dev mailing list