]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: copy only the relevant part of the TX descriptor for frags
authorJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 28 Nov 2018 06:24:48 +0000 (22:24 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 30 Nov 2018 21:30:44 +0000 (13:30 -0800)
commitb387fa3fc3e080efe78f9fed709c76ae85217c3e
treee1332f741a552545059a1d8865f135ce61f243d9
parentdfa98127c4ecac6786cd6c6d02963940729a19d7
nfp: copy only the relevant part of the TX descriptor for frags

Chained descriptors for fragments need to duplicate all the descriptor
fields of the skb head, so we copy the descriptor and then modify the
relevant fields.  This is wasteful, because the top half of the descriptor
will get overwritten entirely while the bottom half is not modified at all.
Copy only the bottom half.  This saves us 0.3% of CPU in a GSO test.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net.h
drivers/net/ethernet/netronome/nfp/nfp_net_common.c