On Wed, Sep 16, 2020 at 10:34 AM Greg Rose <[email protected]> wrote:
>
> From: Tonghao Zhang <[email protected]>
>
> Upstream commit:
>     commit 61ca533c0e94104c35fcb7858a23ec9a05d78143
>     Author: Tonghao Zhang <[email protected]>
>     Date:   Thu Nov 14 23:51:08 2019 +0800
>
>     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 <[email protected]>
>     Cc: William Tu <[email protected]>
>     Signed-off-by: Tonghao Zhang <[email protected]>
>     Acked-by: Pravin B Shelar <[email protected]>
>     Signed-off-by: David S. Miller <[email protected]>
>
> Cc: Tonghao Zhang <[email protected]>
> Reviewed-by: Tonghao Zhang <[email protected]>
> Signed-off-by: Greg Rose <[email protected]>
> ---
Acked-by: Yi-Hung Wei <[email protected]>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to