]> git.baikalelectronics.ru Git - kernel.git/commit
openvswitch: Pad OVS_PACKET_ATTR_PACKET if linear copy was performed
authorThomas Graf <tgraf@suug.ch>
Tue, 14 Jan 2014 16:27:49 +0000 (16:27 +0000)
committerJesse Gross <jesse@nicira.com>
Wed, 5 Feb 2014 06:21:11 +0000 (22:21 -0800)
commit7d808f5c8264ee44321df20a1aa67e2a4579f201
tree9c07572b7e46ca19f688e7a17dd8aded9f5a8b3d
parent457b3b252d932dfe84a765b04d57c3d3058a36a0
openvswitch: 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>
net/openvswitch/datapath.c