]> asedeno.scripts.mit.edu Git - linux.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)
commitba0509b6881efd0c8b26c36490cba87d8fb324c0
tree823c2b8b7faca2fc53cbda830d77572be132b1c6
parent77361825bb01ecadf3ac8622e2e4dbc28806e858
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