forked from Minki/linux
net: axienet: Use napi_alloc_skb when refilling RX ring
Use napi_alloc_skb to allocate memory when refilling the RX ring in axienet_poll for more efficiency. napi_alloc_skb() can reuse softirq-local cache of freed skbs which may still be cache-warm and skipping allocator calls. Signed-off-by: Robert Hancock <robert.hancock@calian.com> Link: https://lore.kernel.org/r/20220308211013.1530955-1-robert.hancock@calian.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
65466904b0
commit
6c7e7da2e0
@ -965,7 +965,7 @@ static int axienet_poll(struct napi_struct *napi, int budget)
|
||||
packets++;
|
||||
}
|
||||
|
||||
new_skb = netdev_alloc_skb_ip_align(lp->ndev, lp->max_frm_size);
|
||||
new_skb = napi_alloc_skb(napi, lp->max_frm_size);
|
||||
if (!new_skb)
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user