Skip to content

Commit

Permalink
test/event: fix crash in Tx adapter freeing
Browse files Browse the repository at this point in the history
[ upstream commit 1f85467fcaf03c6b0d879614ee18f9a98fe9e9e6 ]

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: 46cf97e ("eventdev: add test for eth Tx adapter")

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
  • Loading branch information
gkundap authored and kevintraynor committed Mar 8, 2024
1 parent c87e76f commit 3434212
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/test/test_event_eth_tx_adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,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);
Expand Down

0 comments on commit 3434212

Please sign in to comment.