[PATCH v4 18/18] net/dpaa: fix reallocate_mbuf handling
Hemant Agrawal
hemant.agrawal at nxp.com
Mon Sep 30 14:15:25 CEST 2024
From: Vanshika Shukla <vanshika.shukla at nxp.com>
This patch fixes the bug in the reallocate_mbuf code
handling. The source location is corrected when copying
the data in the new mbuf.
Fixes: f8c7a17a48c9 ("net/dpaa: support Tx scatter gather for non-DPAA buffer")
Cc: stable at dpdk.org
Signed-off-by: Vanshika Shukla <vanshika.shukla at nxp.com>
---
drivers/net/dpaa/dpaa_rxtx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index 1d7efdef88..247e7b92ba 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -1223,7 +1223,7 @@ reallocate_mbuf(struct qman_fq *txq, struct rte_mbuf *mbuf)
/* Copy the data */
data = rte_pktmbuf_append(new_mbufs[0], bytes_to_copy);
- rte_memcpy((uint8_t *)data, rte_pktmbuf_mtod_offset(mbuf,
+ rte_memcpy((uint8_t *)data, rte_pktmbuf_mtod_offset(temp_mbuf,
void *, offset1), bytes_to_copy);
/* Set new offsets and the temp buffers */
--
2.25.1
More information about the dev
mailing list