net: skb_segment() provides list head and tail
Its unfortunate we have to walk again skb list to find the tail after segmentation, even if data is probably hot in cpu caches. skb_segment() can store the tail of the list into segs->prev, and validate_xmit_skb_list() can immediately get the tail. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
45d9cc7c60
commit
bec3cfdca3
@@ -3083,6 +3083,11 @@ perform_csum_check:
|
||||
}
|
||||
} while ((offset += len) < head_skb->len);
|
||||
|
||||
/* Some callers want to get the end of the list.
|
||||
* Put it in segs->prev to avoid walking the list.
|
||||
* (see validate_xmit_skb_list() for example)
|
||||
*/
|
||||
segs->prev = tail;
|
||||
return segs;
|
||||
|
||||
err:
|
||||
|
Reference in New Issue
Block a user