mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-29 15:43:59 +08:00
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>
This commit is contained in:
parent
90bc6d4b54
commit
3a89aae4b4
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user