diff options
author | Robert Hancock <robert.hancock@calian.com> | 2022-03-09 00:10:13 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-03-10 07:19:16 +0300 |
commit | 6c7e7da2e0f2141cdc491cd5b9d0b937c08939c9 (patch) | |
tree | 183907fdc7ae750bd447702db8946c2b10cbb808 | |
parent | 65466904b015f6eeb9225b51aeb29b01a1d4b59c (diff) | |
download | linux-6c7e7da2e0f2141cdc491cd5b9d0b937c08939c9.tar.xz |
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>
-rw-r--r-- | drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index 1d8c6e910279..c7eb05e4a6bf 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c @@ -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; |