mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 08:19:28 +00:00
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>
This commit is contained in:
parent
b2718e6fd3
commit
fa722c0039
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue