bcm63xx_enet: switch to napi_build_skb() to reuse skbuff_heads
authorSieng Piaw Liew <liew.s.piaw@gmail.com>
Wed, 15 Jun 2022 06:09:22 +0000 (14:09 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Jun 2022 11:58:54 +0000 (12:58 +0100)
commitc63c615e22ebb4cd29f4e7352c82ca1a7e76e00a
tree0061779e3597bfce49eaab1862b203489862dd84
parent49ae83fc4fd027a4b4cf56bd2c94c7814ec4baff
bcm63xx_enet: 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.

Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bcm63xx_enet.c