net: ag71xx: switch to napi_build_skb() to reuse skbuff_heads
authorSieng-Piaw Liew <liew.s.piaw@gmail.com>
Thu, 7 Jul 2022 14:10:56 +0000 (22:10 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Jul 2022 13:23:25 +0000 (14:23 +0100)
commit67d7ebdeb2d5a058dd5079107505fffe7332b27a
tree646f9a7150754644e0200d6dead7e7f169a99d26
parentc2dd4059dc31ee6f5b83c8d2064bb1f1f465bcec
net: ag71xx: switch to napi_build_skb() to reuse skbuff_heads

napi_build_skb() reuses NAPI skbuff_head cache in order to save some
cycles on freeing/allocating skbuff_heads on every new Rx or completed
Tx.
Use napi_consume_skb() to feed the cache with skbuff_heads of completed
Tx, so it's never empty. The budget parameter is added to indicate NAPI
context, as a value of zero can be passed in the case of netpoll.

Signed-off-by: Sieng-Piaw Liew <liew.s.piaw@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/atheros/ag71xx.c