]> git.baikalelectronics.ru Git - kernel.git/commit
net: core: introduce build_skb_around
authorJesper Dangaard Brouer <brouer@redhat.com>
Fri, 12 Apr 2019 15:07:37 +0000 (17:07 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 18 Apr 2019 02:09:24 +0000 (19:09 -0700)
commit8d1b7926bc7abd98fec38aba5d3dc8e1519f377c
tree823c2b8b7faca2fc53cbda830d77572be132b1c6
parentd4e3fd832611c99a635a726fc5714c269a0bdac5
net: core: introduce build_skb_around

The function build_skb() also have the responsibility to allocate and clear
the SKB structure. Introduce a new function build_skb_around(), that moves
the responsibility of allocation and clearing to the caller. This allows
caller to use kmem_cache (slab/slub) bulk allocation API.

Next patch use this function combined with kmem_cache_alloc_bulk.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: Song Liu <songliubraving@fb.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/linux/skbuff.h
net/core/skbuff.c