From: Sebastian Andrzej Siewior Date: Fri, 7 Jun 2019 19:20:38 +0000 (+0200) Subject: bnx2x: Use napi_alloc_frag() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=3a89aae4b49e2df99fff112cdd055f1a67971623;p=openwrt%2Fstaging%2Fblogic.git 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 Cc: Sudarsana Kalluru Cc: GR-everest-linux-l2@marvell.com Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index 008ad0ca89ba..c4986b519191 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c @@ -684,7 +684,7 @@ static void *bnx2x_frag_alloc(const struct bnx2x_fastpath *fp, gfp_t gfp_mask) if (unlikely(gfpflags_allow_blocking(gfp_mask))) return (void *)__get_free_page(gfp_mask); - return netdev_alloc_frag(fp->rx_frag_size); + return napi_alloc_frag(fp->rx_frag_size); } return kmalloc(fp->rx_buf_size + NET_SKB_PAD, gfp_mask);