From: Ganapati Kundapura <ganapati.kundapura@intel.com>
To: dev@dpdk.org, jerinj@marvell.com, jay.jayatheerthan@intel.com
Cc: s.v.naga.harish.k@intel.com, abhinandan.gujjar@intel.com
Subject: [PATCH v1] app/test: fix segfault in Tx adapter autotest
Date: Mon, 26 Feb 2024 02:30:03 -0600 [thread overview]
Message-ID: <20240226083003.317553-1-ganapati.kundapura@intel.com> (raw)
Uninitialized mbufs are enqueued to eventdev which causes segfault
on freeing the mbuf in tx adapter.
Fixed by initializing mbufs before enqueuing to eventdev.
Fixes: 46cf97e4bbfa ("eventdev: add test for eth Tx adapter")
Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
diff --git a/app/test/test_event_eth_tx_adapter.c b/app/test/test_event_eth_tx_adapter.c
index dbd22f6..482b8e6 100644
--- a/app/test/test_event_eth_tx_adapter.c
+++ b/app/test/test_event_eth_tx_adapter.c
@@ -484,6 +484,10 @@ tx_adapter_service(void)
int internal_port;
uint32_t cap;
+ /* Initialize mbufs */
+ for (i = 0; i < RING_SIZE; i++)
+ rte_pktmbuf_reset(&bufs[i]);
+
memset(&dev_conf, 0, sizeof(dev_conf));
err = rte_event_eth_tx_adapter_caps_get(TEST_DEV_ID, TEST_ETHDEV_ID,
&cap);
--
2.6.4
next reply other threads:[~2024-02-26 8:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-26 8:30 Ganapati Kundapura [this message]
2024-02-26 13:00 ` [EXT] " Pavan Nikhilesh Bhagavatula
2024-02-28 9:55 ` Jerin Jacob
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240226083003.317553-1-ganapati.kundapura@intel.com \
--to=ganapati.kundapura@intel.com \
--cc=abhinandan.gujjar@intel.com \
--cc=dev@dpdk.org \
--cc=jay.jayatheerthan@intel.com \
--cc=jerinj@marvell.com \
--cc=s.v.naga.harish.k@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).