From 7594cafa92189fd5bad87a5caa6b7a92bbab0979 Mon Sep 17 00:00:00 2001 From: Vanshika Shukla Date: Tue, 1 Oct 2024 16:33:25 +0530 Subject: [PATCH] net/dpaa: fix reallocate mbuf handling 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@dpdk.org Signed-off-by: Vanshika Shukla Acked-by: Hemant Agrawal --- 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 1d7efdef88f..247e7b92ba5 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 */