diff options
author | Ioana Radulescu <ruxandra.radulescu@nxp.com> | 2018-03-23 08:44:12 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-23 16:01:57 +0100 |
commit | fa722c0039adc833983eb09dc94d355fde3d8462 (patch) | |
tree | d093460aee43f07f73b863a63c7f001d16f636f1 | |
parent | b2718e6fd33aa0ea86a450704ba8c19032709927 (diff) |
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>
-rw-r--r-- | drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c index 9994922db68a..14bd8fe72b44 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c @@ -373,7 +373,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) * (1 + num_dma_bufs); + sizeof(struct dpaa2_sg_entry) * num_dma_bufs; sgt_buf = netdev_alloc_frag(sgt_buf_size + DPAA2_ETH_TX_BUF_ALIGN); if (unlikely(!sgt_buf)) { err = -ENOMEM; |