]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf2098a7b9de362f44c93cd0b285cff09db784fcb
tree0061779e3597bfce49eaab1862b203489862dd84
parent42b6eb87308af392a5d81cc7a411b68e4a7ee3da
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