odp-util: Fix IPFIX breakage with old kernel modules.
authorBen Pfaff <blp@nicira.com>
Mon, 7 Oct 2013 21:26:28 +0000 (14:26 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 11 Nov 2013 21:38:02 +0000 (13:38 -0800)
commitd8037805eff02a6d29cdd052d119bc465a05661a
treefad69b23ea1d4db14d8da8f85ef8c6e64b9ec817
parent637abcbee958ae92d12231703b5357786e4ec9f1
odp-util: Fix IPFIX breakage with old kernel modules.

Before commit e995e3df57ea (Allow OVS_USERSPACE_ATTR_USERDATA to be
variable length.) userdata attributes in userspace actions were expected
to be exactly 64 bits long.  The kernel only actually enforced that they
were at least 64 bits long (the previously referenced commit's log message
contains misinformation on this account).

Initially this was no problem, because all of the userdata that userspace
actually used was exactly 8 bytes long.  Commit 29089a540c (Implement IPFIX
export), however, exposed a problem by reducing the length of userdata for
IPFIX support to just 4 bytes.  This meant that IPFIX no longer worked on
older datapaths, because the userdata was no longer at least 8 bytes long.

This commit fixes the problem by padding out userdata attributes less than
8 bytes long to 8 bytes.

CC: Romain Lenglet <rlenglet@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Romain Lenglet <rlenglet at vmware.com>
lib/odp-util.c