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

staging: fsl-dpaa2/eth: Fix SGT allocation

We mistakenly allocate space for too many entries in the
scatter-gather table of multi buffer egress frames.

While it doesn't have a negative impact from a functional
point of view, it wastes resources so fix it.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ioana Radulescu and committed by
Greg Kroah-Hartman
fa722c00 b2718e6f

+1 -1
+1 -1
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
··· 373 373 374 374 /* Prepare the HW SGT structure */ 375 375 sgt_buf_size = priv->tx_data_offset + 376 - sizeof(struct dpaa2_sg_entry) * (1 + num_dma_bufs); 376 + sizeof(struct dpaa2_sg_entry) * num_dma_bufs; 377 377 sgt_buf = netdev_alloc_frag(sgt_buf_size + DPAA2_ETH_TX_BUF_ALIGN); 378 378 if (unlikely(!sgt_buf)) { 379 379 err = -ENOMEM;