diff options
author | Paolo Abeni <pabeni@redhat.com> | 2020-01-09 07:59:24 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-01-09 18:41:42 -0800 |
commit | 8b69a803814bb8b14155ea60df83f6d57527e69e (patch) | |
tree | 92e71bf4a33294a1d0dc22f9f9529a105f6a381a /include/linux/skbuff.h | |
parent | e66b2f31a068dd67172008459678821a79e4ea24 (diff) | |
download | lwn-8b69a803814bb8b14155ea60df83f6d57527e69e.tar.gz lwn-8b69a803814bb8b14155ea60df83f6d57527e69e.zip |
skb: add helpers to allocate ext independently from sk_buff
Currently we can allocate the extension only after the skb,
this change allows the user to do the opposite, will simplify
allocation failure handling from MPTCP.
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r-- | include/linux/skbuff.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index f5c27600b410..016b3c4ab99a 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -4120,6 +4120,9 @@ struct skb_ext { char data[0] __aligned(8); }; +struct skb_ext *__skb_ext_alloc(void); +void *__skb_ext_set(struct sk_buff *skb, enum skb_ext_id id, + struct skb_ext *ext); void *skb_ext_add(struct sk_buff *skb, enum skb_ext_id id); void __skb_ext_del(struct sk_buff *skb, enum skb_ext_id id); void __skb_ext_put(struct skb_ext *ext); |