* [PATCH v1] app/test: fix segfault in Tx adapter autotest
@ 2024-02-26 8:30 Ganapati Kundapura
2024-02-26 13:00 ` [EXT] " Pavan Nikhilesh Bhagavatula
0 siblings, 1 reply; 3+ messages in thread
From: Ganapati Kundapura @ 2024-02-26 8:30 UTC (permalink / raw)
To: dev, jerinj, jay.jayatheerthan; +Cc: s.v.naga.harish.k, abhinandan.gujjar
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [EXT] [PATCH v1] app/test: fix segfault in Tx adapter autotest
2024-02-26 8:30 [PATCH v1] app/test: fix segfault in Tx adapter autotest Ganapati Kundapura
@ 2024-02-26 13:00 ` Pavan Nikhilesh Bhagavatula
2024-02-28 9:55 ` Jerin Jacob
0 siblings, 1 reply; 3+ messages in thread
From: Pavan Nikhilesh Bhagavatula @ 2024-02-26 13:00 UTC (permalink / raw)
To: Ganapati Kundapura, dev, Jerin Jacob, jay.jayatheerthan
Cc: s.v.naga.harish.k, abhinandan.gujjar
> 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>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [EXT] [PATCH v1] app/test: fix segfault in Tx adapter autotest
2024-02-26 13:00 ` [EXT] " Pavan Nikhilesh Bhagavatula
@ 2024-02-28 9:55 ` Jerin Jacob
0 siblings, 0 replies; 3+ messages in thread
From: Jerin Jacob @ 2024-02-28 9:55 UTC (permalink / raw)
To: Pavan Nikhilesh Bhagavatula
Cc: Ganapati Kundapura, dev, Jerin Jacob, jay.jayatheerthan,
s.v.naga.harish.k, abhinandan.gujjar
On Mon, Feb 26, 2024 at 6:30 PM Pavan Nikhilesh Bhagavatula
<pbhagavatula@marvell.com> wrote:
>
> > 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>
>
> Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Applied to dpdk-next-eventdev/for-main. Thanks
>
> >
> > 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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-28 9:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-26 8:30 [PATCH v1] app/test: fix segfault in Tx adapter autotest Ganapati Kundapura
2024-02-26 13:00 ` [EXT] " Pavan Nikhilesh Bhagavatula
2024-02-28 9:55 ` Jerin Jacob
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).