[1/1] app/test: resolve mbuf_test application failure

Message ID 20230426092303.2423712-1-rkudurumalla@marvell.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series [1/1] app/test: resolve mbuf_test application failure |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS

Commit Message

Rakesh Kudurumalla April 26, 2023, 9:23 a.m. UTC
  when RTE_ENABLE_ASSERT is defined test_mbuf application is
failing because we are trying to attach extbuf to a cloned
buffer to which external mbuf is already attached.This patch
fixes the same.

Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Change-Id: Ia5a0f8a81036e12a1cfec82e61bfd6f1d0c6f89e
---
 app/test/test_mbuf.c | 1 +
 1 file changed, 1 insertion(+)
  

Patch

diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index 8d8d3b9386..e2b81db308 100644
--- a/app/test/test_mbuf.c
+++ b/app/test/test_mbuf.c
@@ -2375,6 +2375,7 @@  test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)
 		GOTO_FAIL("%s: Bad packet length\n", __func__);
 
 	/* attach the same external buffer to the cloned mbuf */
+	clone->ol_flags = 0;
 	rte_pktmbuf_attach_extbuf(clone, ext_buf_addr, buf_iova, buf_len,
 			ret_shinfo);
 	if (clone->ol_flags != RTE_MBUF_F_EXTERNAL)