aboutsummaryrefslogtreecommitdiff
path: root/scripts/objdiff
diff options
context:
space:
mode:
authorEric Dumazet <[email protected]>2012-07-05 04:31:01 +0000
committerDavid S. Miller <[email protected]>2012-07-07 16:26:56 -0700
commit95162d652477f6e3d04687f5d39d443fcc64d8d7 (patch)
tree8685d62afd2b8b77fe9d7d866d22733976364bab /scripts/objdiff
parentcabdc8ee3768ceb6367e88c6fe84a66dd667bdf9 (diff)
asix: avoid copies in tx path
I noticed excess calls to skb_copy_expand() or memmove() in asix driver. This driver needs to push 4 bytes in front of frame (packet_len) and maybe add 4 bytes after the end (if padlen is 4) So it should set needed_headroom & needed_tailroom to avoid copies. But its not enough, because many packets are cloned before entering asix_tx_fixup() and this driver use skb_cloned() as a lazy way to check if it can push and put additional bytes in frame. Avoid skb_copy_expand() expensive call, using following rules : - We are allowed to push 4 bytes in headroom if skb_header_cloned() is false (and if we have 4 bytes of headroom) - We are allowed to put 4 bytes at tail if skb_cloned() is false (and if we have 4 bytes of tailroom) TCP packets for example are cloned, but skb_header_release() was called in tcp stack, allowing us to use headroom for our needs. Signed-off-by: Eric Dumazet <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Allan Chou <[email protected]> Cc: Trond Wuellner <[email protected]> Cc: Grant Grundler <[email protected]> Cc: Paul Stewart <[email protected]> Cc: Ming Lei <[email protected]> Tested-by: Ming Lei <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions