Re: [ovs-dev] [PATCH] datapath: Fix unaligned access when storing stats.

2011-11-18 Thread Ben Pfaff
On Fri, Nov 18, 2011 at 01:39:37PM -0800, Jesse Gross wrote: > On Fri, Nov 18, 2011 at 1:36 PM, Ben Pfaff wrote: > > On Fri, Nov 18, 2011 at 11:08:08AM -0800, Jesse Gross wrote: > >> Both datapath and vport stats contain 64-bit members in a struct > >> but we write them directly in Netlink attribu

Re: [ovs-dev] [PATCH] datapath: Fix unaligned access when storing stats.

2011-11-18 Thread Jesse Gross
On Fri, Nov 18, 2011 at 1:36 PM, Ben Pfaff wrote: > On Fri, Nov 18, 2011 at 11:08:08AM -0800, Jesse Gross wrote: >> 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 o

Re: [ovs-dev] [PATCH] datapath: Fix unaligned access when storing stats.

2011-11-18 Thread Ben Pfaff
On Fri, Nov 18, 2011 at 11:08:08AM -0800, Jesse Gross wrote: > 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

[ovs-dev] [PATCH] datapath: Fix unaligned access when storing stats.

2011-11-18 Thread Jesse Gross
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-