Skip to content

Commit

Permalink
examples/ipsec-secgw: fix eventdev start sequence
Browse files Browse the repository at this point in the history
[ upstream commit 986c2c9 ]

Start eventdev after complete initialization of event dev,
rx adapter and tx adapter.

Fixes: e0b0e55 ("examples/ipsec-secgw: add framework for event helper")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
  • Loading branch information
nithind1988 authored and kevintraynor committed Feb 21, 2022
1 parent 5831db3 commit 8c4f0e9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions examples/ipsec-secgw/event_helper.c
Expand Up @@ -716,6 +716,16 @@ eh_initialize_eventdev(struct eventmode_conf *em_conf)
}
}

return 0;
}

static int
eh_start_eventdev(struct eventmode_conf *em_conf)
{
struct eventdev_params *eventdev_config;
int nb_eventdev = em_conf->nb_eventdev;
int i, ret;

/* Start event devices */
for (i = 0; i < nb_eventdev; i++) {

Expand Down Expand Up @@ -1688,6 +1698,13 @@ eh_devs_init(struct eh_conf *conf)
return ret;
}

/* Start eventdev */
ret = eh_start_eventdev(em_conf);
if (ret < 0) {
EH_LOG_ERR("Failed to start event dev %d", ret);
return ret;
}

/* Start eth devices after setting up adapter */
RTE_ETH_FOREACH_DEV(port_id) {

Expand Down

0 comments on commit 8c4f0e9

Please sign in to comment.