diff options
author | Ben Pfaff <blp@ovn.org> | 2017-06-14 08:46:32 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-06-14 12:34:23 -0700 |
commit | 62a78fe5d996cf01355bc090383ba7850609c864 (patch) | |
tree | 977a5c2e6913869e35e6ed4a7d960c93a35b7eb8 /include | |
parent | 8568c7a5c128d20e48eae09d9c3631592d896909 (diff) | |
download | openvswitch-62a78fe5d996cf01355bc090383ba7850609c864.tar.gz |
unaligned: Introduce helpers for 32-bit aligned 128-bit integers.
These are analogous to the existing helpers for 32-bit aligned 64-bit
integers, and will have users in upcoming commits.
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Lance Richardson <lrichard@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/openvswitch/types.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/openvswitch/types.h b/include/openvswitch/types.h index 5ae0972da..111e30bca 100644 --- a/include/openvswitch/types.h +++ b/include/openvswitch/types.h @@ -82,6 +82,18 @@ typedef struct { #endif } ovs_32aligned_u64; +/* A 128-bit value, in host byte order, that is only aligned on a 32-bit + * boundary. */ +typedef struct { + uint32_t u32[4]; +} ovs_32aligned_u128; + +/* A 128-bit value, in network byte order, that is only aligned on a 32-bit + * boundary. */ +typedef struct { + ovs_be32 be32[4]; +} ovs_32aligned_be128; + typedef union { uint32_t u32[4]; struct { |