diff options
| author | David S. Miller <davem@davemloft.net> | 2016-04-25 23:54:15 +0300 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2016-04-25 23:54:15 +0300 |
| commit | 5a5f0792e98bdc8d2db89d1d49cb078fd836c1fa (patch) | |
| tree | cb62fa6ec10edbc446d9f6ac37a07e9bafdd61b9 /include | |
| parent | 557fc4a098039cf296fe33f118bab99a925fd881 (diff) | |
| parent | 947d2756cddec83c72af99b02010002ddc57aeb3 (diff) | |
| download | linux-5a5f0792e98bdc8d2db89d1d49cb078fd836c1fa.tar.xz | |
Merge branch 'pskb_extract'
Sowmini Varadhan says:
====================
pskb_extract() helper function.
This patchset follows up on the discussion in
https://www.mail-archive.com/netdev@vger.kernel.org/msg105090.html
For RDS-TCP, we have to deal with the full gamut of
nonlinear sk_buffs, including all the frag_list variants.
Also, the parent skb has to remain unchanged, while the clone
is queued for Rx on the PF_RDS socket.
Patch 1 of this patchset adds a pskb_extract() function that
does all this without the redundant memcpy's in pskb_expand_head()
and __pskb_pull_tail().
v2: Marcelo Leitner review comments
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/skbuff.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index da0ace389fec..a1ce63979ad8 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -2986,6 +2986,8 @@ struct sk_buff *skb_vlan_untag(struct sk_buff *skb); int skb_ensure_writable(struct sk_buff *skb, int write_len); int skb_vlan_pop(struct sk_buff *skb); int skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci); +struct sk_buff *pskb_extract(struct sk_buff *skb, int off, int to_copy, + gfp_t gfp); static inline int memcpy_from_msg(void *data, struct msghdr *msg, int len) { |
