Sowmini Varadhan
6fa01ccd88
skbuff: Add pskb_extract() helper function
...
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 segment is returned unchanged
back to the TCP engine.
The existing code uses the sequence
clone = skb_clone(..);
pskb_pull(clone, off, ..);
pskb_trim(clone, to_copy, ..);
with the intention of discarding the first `off' bytes. However,
skb_clone() + pskb_pull() implies pksb_expand_head(), which ends
up doing a redundant memcpy of bytes that will then get discarded
in __pskb_pull_tail().
To avoid this inefficiency, this commit adds pskb_extract() that
creates the clone, and memcpy's only the relevant header/frag/frag_list
to the start of `clone'. pskb_trim() is then invoked to trim clone
down to the requested to_copy bytes.
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2016-04-25 16:54:14 -04:00
..
2016-04-04 10:41:08 -07:00
2016-03-23 06:06:45 -07:00
2016-03-21 14:35:52 -07:00
2016-04-21 15:02:40 -04:00
2016-04-21 15:09:05 -04:00
2016-04-24 00:12:08 -04:00
2016-03-24 19:57:15 -07:00
2016-03-17 12:50:55 -07:00
2016-04-25 15:59:16 -04:00
2016-03-17 15:09:34 -07:00
2016-03-23 06:09:15 -07:00
2016-03-17 21:51:52 -07:00
2016-04-04 10:41:08 -07:00
2016-03-17 15:09:34 -07:00
2016-03-29 11:52:11 +02:00
2016-03-15 16:55:16 -07:00
2016-03-15 16:55:16 -07:00
2016-04-04 10:41:08 -07:00
2016-04-04 10:41:08 -07:00
2016-03-20 09:34:02 -06:00
2016-04-04 10:41:08 -07:00
2016-04-19 20:26:11 -04:00
2016-03-25 11:37:57 -04:00
2016-04-04 10:41:08 -07:00
2016-03-22 15:36:02 -07:00
2016-03-16 13:31:46 -07:00
2016-03-17 15:09:34 -07:00
2016-03-22 15:36:02 -07:00
2016-04-05 14:19:08 +02:00
2016-03-15 09:01:06 +01:00
2016-03-25 19:10:03 +01:00
2016-03-22 15:36:02 -07:00
2016-03-22 15:36:02 -07:00
2016-03-26 16:14:37 -04:00
2016-03-23 06:06:45 -07:00
2016-04-18 13:43:02 -07:00
2016-03-19 11:03:49 +01:00
2016-03-20 13:28:18 -07:00
2016-03-20 18:58:18 -07:00
2016-04-18 14:45:08 -04:00
2016-04-04 10:41:08 -07:00
2016-03-15 16:55:16 -07:00
2016-03-25 08:48:31 -07:00
2016-04-07 16:44:14 -04:00
2016-03-17 15:09:34 -07:00
2016-04-07 17:22:20 -07:00
2016-04-12 10:25:30 -07:00
2016-03-19 18:52:29 -07:00
2016-03-25 16:37:42 -07:00
2016-03-17 15:09:34 -07:00
2016-03-17 15:09:34 -07:00
2016-04-01 17:03:37 -05:00
2016-04-06 13:18:19 +02:00
2016-03-25 16:37:42 -07:00
2016-03-22 15:36:02 -07:00
2016-04-05 13:25:12 +02:00
2016-03-16 17:45:56 -07:00
2016-04-19 20:13:19 -04:00
2016-03-15 12:48:48 -07:00
2016-03-17 22:13:41 -07:00
2016-03-14 10:30:57 -04:00
2016-03-25 16:37:42 -07:00
2016-03-22 15:36:02 -07:00
2016-03-24 10:52:25 -07:00
2016-03-22 15:36:02 -07:00
2016-03-18 18:10:38 -07:00
2016-03-17 15:09:34 -07:00
2016-03-17 09:45:10 +01:00
2016-03-14 12:19:46 -04:00
2016-04-11 21:15:48 -04:00
2016-03-17 15:09:34 -07:00
2016-03-15 16:55:16 -07:00
2016-03-17 13:47:50 -07:00
2016-03-15 16:55:16 -07:00
2016-03-20 16:47:13 -04:00
2016-04-04 10:41:08 -07:00
2016-04-14 19:31:34 -07:00
2016-03-15 16:55:16 -07:00
2016-03-17 15:09:34 -07:00
2016-03-28 13:57:51 -04:00
2016-04-21 14:14:58 -04:00
2016-04-21 15:35:44 -04:00
2016-03-17 14:57:16 -04:00
2016-04-04 10:41:08 -07:00
2016-04-04 10:41:08 -07:00
2016-04-25 15:09:11 -04:00
2016-03-23 12:34:17 +01:00
2016-03-21 19:30:06 -04:00
2016-03-19 15:15:07 -07:00
2016-03-25 16:37:42 -07:00
2016-03-15 16:55:16 -07:00
2016-03-15 16:55:16 -07:00
2016-03-17 15:09:34 -07:00
2016-03-17 15:09:34 -07:00
2016-03-17 15:09:34 -07:00
2016-04-04 10:41:08 -07:00
2016-03-15 08:52:28 -05:00
2016-04-15 13:00:11 -05:00
2016-04-07 21:04:26 -04:00
2016-03-14 15:43:11 -04:00
2016-04-18 14:45:08 -04:00
2016-03-17 02:32:04 +01:00
2016-04-14 09:01:47 -06:00
2016-03-15 16:55:16 -07:00
2016-03-17 15:09:34 -07:00
2016-03-17 15:09:34 -07:00
2016-03-17 15:09:34 -07:00
2016-04-14 21:14:03 -04:00
2016-04-23 18:51:33 -04:00
2016-03-15 13:50:29 -07:00
2016-04-05 10:56:32 +02:00
2016-03-22 15:36:02 -07:00
2016-03-22 15:36:02 -07:00
2016-03-22 15:36:02 -07:00
2016-03-22 15:36:02 -07:00
2016-03-17 15:09:34 -07:00
2016-03-14 17:08:15 +01:00
2016-03-29 11:52:11 +02:00
2016-04-15 17:29:35 -04:00
2016-04-14 12:56:09 -07:00
2016-04-25 16:54:14 -04:00
2016-03-25 16:37:42 -07:00
2016-03-25 16:37:42 -07:00
2016-03-25 16:37:42 -07:00
2016-03-25 16:37:42 -07:00
2016-04-02 20:23:09 -04:00
2016-03-17 15:09:34 -07:00
2016-04-04 10:41:08 -07:00
2016-03-14 14:55:26 -04:00
2016-03-18 14:10:57 +08:00
2016-03-17 15:09:34 -07:00
2016-04-21 13:48:20 -04:00
2016-03-15 16:55:16 -07:00
2016-04-07 16:53:29 -04:00
2016-04-13 12:02:28 -07:00
2016-03-17 15:09:34 -07:00
2016-03-16 21:11:19 +01:00