]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf5f1304a69906953aa9704b72a2b7157dc41d64f
tree646f9a7150754644e0200d6dead7e7f169a99d26
parent5d48e4643f0b49b018e0c6911f990dbc19aabfc8
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