]> git.baikalelectronics.ru Git - kernel.git/commit
skbuff: allow to optionally use NAPI cache from __alloc_skb()
authorAlexander Lobakin <alobakin@pm.me>
Sat, 13 Feb 2021 14:12:38 +0000 (14:12 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Feb 2021 22:32:04 +0000 (14:32 -0800)
commitd13612b58e6453fc664f282514fe2bd7b848230f
tree40e77ecc6855d9d592229d4a572b818d4e5e0491
parentf450d539c05a14c103dd174718f81bb2fe65cb4b
skbuff: allow to optionally use NAPI cache from __alloc_skb()

Reuse the old and forgotten SKB_ALLOC_NAPI to add an option to get
an skbuff_head from the NAPI cache instead of inplace allocation
inside __alloc_skb().
This implies that the function is called from softirq or BH-off
context, not for allocating a clone or from a distant node.

Cc: Alexander Duyck <alexander.duyck@gmail.com> # Simplified flags check
Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c