Re: [PATCH net-next 1/2] skbuff: Add pskb_extract() helper function

2016-04-22 Thread marcelo . leitner
On Wed, Apr 20, 2016 at 03:17:41AM -0700, Sowmini Varadhan wrote: ... > +/* Extract to_copy bytes starting at off from skb, and return this in > + * a new skb > + */ > +struct sk_buff *pskb_extract(struct sk_buff *skb, int off, > + int to_copy, gfp_t gfp) > +{ > + struc

[PATCH net-next 1/2] skbuff: Add pskb_extract() helper function

2016-04-20 Thread Sowmini Varadhan
A pattern of skb usage seen in modules such as RDS-TCP is to extract `to_copy' bytes from the received TCP segment, starting at some offset `off' into a new skb `clone'. This is done in the ->data_ready callback, where the clone skb is queued up for rx on the PF_RDS socket, while the parent TCP seg