Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bnx2x: Use napi_alloc_frag()

SKB allocation via bnx2x_frag_alloc() is always performed in NAPI
context. Preemptible context passes GFP_KERNEL and bnx2x_frag_alloc()
uses then __get_free_page() for the allocation.

Use napi_alloc_frag() for memory allocation.

Cc: Ariel Elior <aelior@marvell.com>
Cc: Sudarsana Kalluru <skalluru@marvell.com>
Cc: GR-everest-linux-l2@marvell.com
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Sebastian Andrzej Siewior and committed by
David S. Miller
3a89aae4 90bc6d4b

+1 -1
+1 -1
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
··· 684 684 if (unlikely(gfpflags_allow_blocking(gfp_mask))) 685 685 return (void *)__get_free_page(gfp_mask); 686 686 687 - return netdev_alloc_frag(fp->rx_frag_size); 687 + return napi_alloc_frag(fp->rx_frag_size); 688 688 } 689 689 690 690 return kmalloc(fp->rx_buf_size + NET_SKB_PAD, gfp_mask);