datapath: Fix unaligned access when storing stats.
authorJesse Gross <jesse@nicira.com>
Fri, 18 Nov 2011 18:54:12 +0000 (10:54 -0800)
committerJesse Gross <jesse@nicira.com>
Fri, 18 Nov 2011 21:41:28 +0000 (13:41 -0800)
commite926dfe3ba5a78acec3b9866ba2dab4095f33ebe
tree3998229b3e3acafe9a5386011e5a993cb22409ee
parent7b9f1974f42d63693676d2611f9276fb8227e071
datapath: Fix unaligned access when storing stats.

Both datapath and vport stats contain 64-bit members in a struct
but we write them directly in Netlink attributes which only
guarantee 32-bit alignment.  This causes problems on RISC
architectures that care about alignment so this computes the stats
on the stack and then memcpy's them.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
datapath/datapath.c