summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTonghao Zhang <xiangxia.m.yue@gmail.com>2019-11-14 16:51:08 +0100
committerDavid S. Miller <davem@davemloft.net>2019-11-15 21:43:27 +0100
commit61ca533c0e94104c35fcb7858a23ec9a05d78143 (patch)
treea7598e6fe8882e6d04b987e6b1ca43ce75739b31 /lib
parentMerge branch 'DSA-driver-for-Vitesse-Felix-switch' (diff)
downloadlinux-61ca533c0e94104c35fcb7858a23ec9a05d78143.tar.xz
linux-61ca533c0e94104c35fcb7858a23ec9a05d78143.zip
net: openvswitch: don't call pad_packet if not necessary
The nla_put_u16/nla_put_u32 makes sure that *attrlen is align. The call tree is that: nla_put_u16/nla_put_u32 -> nla_put attrlen = sizeof(u16) or sizeof(u32) -> __nla_put attrlen -> __nla_reserve attrlen -> skb_put(skb, nla_total_size(attrlen)) nla_total_size returns the total length of attribute including padding. Cc: Joe Stringer <joe@ovn.org> Cc: William Tu <u9012063@gmail.com> Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com> Acked-by: Pravin B Shelar <pshelar@ovn.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions