History

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.

Jesper Dangaard Brouer committed 7 years ago

Commit ba0509b1 parent 77361822 files · +54 −19Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/skbuff.h+2−0
@@ -1042,6 +1042,8 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t priority, int flags, · 1041 unmodified lines
1042 int node);1042 int node);
1043struct sk_buff *__build_skb(void *data, unsigned int frag_size);1043struct sk_buff *__build_skb(void *data, unsigned int frag_size);
1044struct sk_buff *build_skb(void *data, unsigned int frag_size);1044struct sk_buff *build_skb(void *data, unsigned int frag_size);
1045struct sk_buff *build_skb_around(struct sk_buff *skb,
1046 void *data, unsigned int frag_size);
1045 1047
1046/**1048/**
1047 * alloc_skb - allocate a network buffer1049 * alloc_skb - allocate a network buffer

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t