[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <50c0ae0c-2382-42ea-998b-f5c641e5db4a@cogentembedded.com>
Date: Mon, 9 May 2016 16:53:50 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Jesper Dangaard Brouer <brouer@...hat.com>, netdev@...r.kernel.org,
"David S. Miller" <davem@...emloft.net>
Cc: saeedm@...lanox.com, gerlitz.or@...il.com, eugenia@...lanox.com,
Alexander Duyck <alexander.duyck@...il.com>
Subject: Re: [net-next PATCH V1 3/3] net: warn on napi_alloc_skb being called
in wrong context
Hello.
On 5/9/2016 4:44 PM, Jesper Dangaard Brouer wrote:
> It have always been required to call napi_alloc_skb from NAPI/softirq
It has.
> context, which implies running with local_bh_disable'ed. Thus, this
Not local_bh_disable'd?
> code path should already be well tested. But recent SKB bulk changes
> introduced will make this more volatile and bugs more subtle, if this
> is violated.
>
> To catch any driver violating this add a loud WARN_ON.
>
> Performance wise, I do worry about adding this runtime check code into
> the hotpath, of this highly optimized function call. I've
Hot path? My spellchecker trips here.
> micro-benchmarked it with both IP-forwarding and local UDP delivery,
> and didn't see any regressions. It does adds extra code size (icache).
>
> add/remove: 0/0 grow/shrink: 1/0 up/down: 43/0 (43)
> function old new delta
> __napi_alloc_skb 461 504 +43
>
> Signed-off-by: Jesper Dangaard Brouer <brouer@...hat.com>
[...]
MBR, Sergei
Powered by blists - more mailing lists