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

dpaa2-eth: Use napi_alloc_frag()

The driver is using netdev_alloc_frag() for allocation in the
->ndo_start_xmit() path. That one is always invoked in a BH disabled
region so we could also use napi_alloc_frag().

Use napi_alloc_frag() for skb allocation.

Cc: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Acked-by: Ioana Radulescu <ruxandra.radulescu@nxp.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
90bc6d4b f9dae555

+1 -1
+1 -1
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
··· 555 555 /* Prepare the HW SGT structure */ 556 556 sgt_buf_size = priv->tx_data_offset + 557 557 sizeof(struct dpaa2_sg_entry) * num_dma_bufs; 558 - sgt_buf = netdev_alloc_frag(sgt_buf_size + DPAA2_ETH_TX_BUF_ALIGN); 558 + sgt_buf = napi_alloc_frag(sgt_buf_size + DPAA2_ETH_TX_BUF_ALIGN); 559 559 if (unlikely(!sgt_buf)) { 560 560 err = -ENOMEM; 561 561 goto sgt_buf_alloc_failed;