[ovs-dev] [PATCH 09/10] datapath: Allocate vports in more RCU friendly manner.
Ben Pfaff
blp at nicira.com
Wed Dec 29 18:19:40 UTC 2010
On Tue, Dec 28, 2010 at 08:50:47PM -0800, Jesse Gross wrote:
> In a few places, when creating a new vport we also need to allocate
> some memory for configuration that can change. This data is protected
> by RCU but we directly access the memory when initializing it. This
> is fine, since the vport has not yet been published and we use the
> apropriate memory barriers when doing so. However, it makes tools
> like sparse unhappy and is also asymmetric since we use RCU to
> derefence the pointers but not to assign them. This cleans that
"dereference"
> up somewhat by initializing the memory first and then using RCU
> to assign it, which makes everyone happy.
>
> Found with sparse.
>
> Signed-off-by: Jesse Gross <jesse at nicira.com>
Acked-by: Ben Pfaff <blp at nicira.com>
More information about the dev
mailing list