diff options
author | Jonathan Lemon <jonathan.lemon@gmail.com> | 2021-01-06 14:18:39 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-01-07 16:08:37 -0800 |
commit | 04c2d33eabdc76df730e1e356f6b2c656381d7d5 (patch) | |
tree | 0a29a55ae9f9f253effef345b128b71258786ff4 /net/core/skbuff.c | |
parent | 06b4feb37e64e543714c971a4162a75e2e4024d4 (diff) |
skbuff: add flags to ubuf_info for ubuf setup
Currently, when an ubuf is attached to a new skb, the shared
flags word is initialized to a fixed value. Instead of doing
this, set the default flags in the ubuf, and have new skbs
inherit from this default.
This is needed when setting up different zerocopy types.
Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/skbuff.c')
-rw-r--r-- | net/core/skbuff.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 5b9e52cbd087..a7bcbbff99e3 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -1119,6 +1119,7 @@ struct ubuf_info *msg_zerocopy_alloc(struct sock *sk, size_t size) uarg->len = 1; uarg->bytelen = size; uarg->zerocopy = 1; + uarg->flags = SKBFL_ZEROCOPY_FRAG; refcount_set(&uarg->refcnt, 1); sock_hold(sk); |