datapath: Allocate vports in more RCU friendly manner.
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
dereference the pointers but not to assign them. This cleans that
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@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>