diff options
author | Zoltan Kiss <zoltan.kiss@citrix.com> | 2014-03-26 22:37:45 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-27 15:29:38 -0400 |
commit | 36d5fe6a000790f56039afe26834265db0a3ad4c (patch) | |
tree | 391de83f18ede9ca651ed347112ce4400e4645d5 /include/linux/skbuff.h | |
parent | fc0d48b8fb449ca007b2057328abf736cb516168 (diff) | |
download | linux-stable-36d5fe6a000790f56039afe26834265db0a3ad4c.tar.gz linux-stable-36d5fe6a000790f56039afe26834265db0a3ad4c.tar.bz2 linux-stable-36d5fe6a000790f56039afe26834265db0a3ad4c.zip |
core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors
skb_zerocopy can copy elements of the frags array between skbs, but it doesn't
orphan them. Also, it doesn't handle errors, so this patch takes care of that
as well, and modify the callers accordingly. skb_tx_error() is also added to
the callers so they will signal the failed delivery towards the creator of the
skb.
Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r-- | include/linux/skbuff.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 5e1e6f2d98c2..15ede6a823a6 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -2451,8 +2451,8 @@ int skb_splice_bits(struct sk_buff *skb, unsigned int offset, unsigned int flags); void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to); unsigned int skb_zerocopy_headlen(const struct sk_buff *from); -void skb_zerocopy(struct sk_buff *to, const struct sk_buff *from, - int len, int hlen); +int skb_zerocopy(struct sk_buff *to, struct sk_buff *from, + int len, int hlen); void skb_split(struct sk_buff *skb, struct sk_buff *skb1, const u32 len); int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, int shiftlen); void skb_scrub_packet(struct sk_buff *skb, bool xnet); |