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>
};
};
refcount_t refcnt;
+ u8 flags;
struct mmpin {
struct user_struct *user;
else
skb_zcopy_get(uarg);
skb_shinfo(skb)->destructor_arg = uarg;
- skb_shinfo(skb)->flags |= SKBFL_ZEROCOPY_FRAG;
+ skb_shinfo(skb)->flags |= uarg->flags;
}
}
uarg->len = 1;
uarg->bytelen = size;
uarg->zerocopy = 1;
+ uarg->flags = SKBFL_ZEROCOPY_FRAG;
refcount_set(&uarg->refcnt, 1);
sock_hold(sk);