[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOrHB_ABoBYR5yMCOBUGkb=JvzO2oBKZNoX1mpVBUfQWrC1pgQ@mail.gmail.com>
Date: Thu, 14 Nov 2019 22:35:50 -0800
From: Pravin Shelar <pshelar@....org>
To: Tonghao Zhang <xiangxia.m.yue@...il.com>
Cc: Greg Rose <gvrose8192@...il.com>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
ovs dev <dev@...nvswitch.org>, Joe Stringer <joe@....org>,
William Tu <u9012063@...il.com>
Subject: Re: [PATCH net-next] net: openvswitch: don't call pad_packet if not necessary
On Thu, Nov 14, 2019 at 7:51 AM <xiangxia.m.yue@...il.com> wrote:
>
> From: Tonghao Zhang <xiangxia.m.yue@...il.com>
>
> 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@....org>
> Cc: William Tu <u9012063@...il.com>
> Signed-off-by: Tonghao Zhang <xiangxia.m.yue@...il.com>
> ---
Acked-by: Pravin B Shelar <pshelar@....org>
Powered by blists - more mailing lists