tg3: provide frags as skb head
authorEric Dumazet <[email protected]>
Fri, 27 Apr 2012 00:34:49 +0000 (00:34 +0000)
committerDavid S. Miller <[email protected]>
Tue, 1 May 2012 01:35:42 +0000 (21:35 -0400)
commit8d4057a938481351dc690fbe23e8c72af08d5890
tree87736275c117327f55e381c88dba1ec1e067e4c0
parentd3836f21b0af5513ef55701dd3f50b8c42e44c7a
tg3: provide frags as skb head

This patch converts tg3 driver, one of our reference drivers, to use new
build_skb() api in frag mode.

Instead of using kmalloc() to allocate the memory block that will be
used by build_skb() as skb->head, we use a page fragment.

This is a followup of patch "net: allow skb->head to be a page fragment"

This allows GRO, TCP coalescing, and splice() to be more efficient.

Incidentally, this also removes SLUB slow path contention in kfree()

Signed-off-by: Eric Dumazet <[email protected]>
Cc: Ilpo Järvinen <[email protected]>
Cc: Herbert Xu <[email protected]>
Cc: Maciej Żenczykowski <[email protected]>
Cc: Neal Cardwell <[email protected]>
Cc: Tom Herbert <[email protected]>
Cc: Jeff Kirsher <[email protected]>
Cc: Ben Hutchings <[email protected]>
Cc: Matt Carlson <[email protected]>
Cc: Michael Chan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/ethernet/broadcom/tg3.c
drivers/net/ethernet/broadcom/tg3.h