datapath: Pad OVS_PACKET_ATTR_PACKET if linear copy was performed
authorThomas Graf <tgraf@suug.ch>
Tue, 14 Jan 2014 09:27:02 +0000 (01:27 -0800)
committerJesse Gross <jesse@nicira.com>
Tue, 14 Jan 2014 09:27:02 +0000 (01:27 -0800)
commitef507cecc926a3f42bb59de1b2aff6f119838c6a
tree5c9dadc3b1175255de596344162e80407835b75e
parente491a67a00053471300dd7ef6466bb66ff68de3b
datapath: Pad OVS_PACKET_ATTR_PACKET if linear copy was performed

While the zerocopy method is correctly omitted if user space
does not support unaligned Netlink messages. The attribute is
still not padded correctly as skb_zerocopy() will not ensure
padding and the attribute size is no longer pre calculated
though nla_reserve() which ensured padding previously.

This patch applies appropriate padding if a linear data copy
was performed in skb_zerocopy().

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Acked-by: Zoltan Kiss <zoltan.kiss@citrix.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
datapath/datapath.c