dpaa2-eth: Use napi_alloc_frag()
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Fri, 7 Jun 2019 19:20:37 +0000 (21:20 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Jun 2019 02:40:09 +0000 (19:40 -0700)
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>
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c

index 27ecd06..8a43833 100644 (file)
@@ -555,7 +555,7 @@ static int build_sg_fd(struct dpaa2_eth_priv *priv,
        /* Prepare the HW SGT structure */
        sgt_buf_size = priv->tx_data_offset +
                       sizeof(struct dpaa2_sg_entry) *  num_dma_bufs;
-       sgt_buf = netdev_alloc_frag(sgt_buf_size + DPAA2_ETH_TX_BUF_ALIGN);
+       sgt_buf = napi_alloc_frag(sgt_buf_size + DPAA2_ETH_TX_BUF_ALIGN);
        if (unlikely(!sgt_buf)) {
                err = -ENOMEM;
                goto sgt_buf_alloc_failed;