Skip to content

Commit

Permalink
examples/ipsec-secgw: fix default flow rule creation
Browse files Browse the repository at this point in the history
[ upstream commit b0c6a0f ]

Fix default flow rule to create after ethdev start to align
with rte_flow spec.

Fixes: 513f192 ("examples/ipsec-secgw: add default flow for inline Rx")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
  • Loading branch information
nithind1988 authored and bluca committed Feb 14, 2022
1 parent dff4380 commit 33a5d15
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/ipsec-secgw/ipsec-secgw.c
Expand Up @@ -2931,13 +2931,14 @@ main(int32_t argc, char **argv)
if ((enabled_port_mask & (1 << portid)) == 0)
continue;

/* Create flow before starting the device */
create_default_ipsec_flow(portid, req_rx_offloads[portid]);

ret = rte_eth_dev_start(portid);
if (ret < 0)
rte_exit(EXIT_FAILURE, "rte_eth_dev_start: "
"err=%d, port=%d\n", ret, portid);

/* Create flow after starting the device */
create_default_ipsec_flow(portid, req_rx_offloads[portid]);

/*
* If enabled, put device in promiscuous mode.
* This allows IO forwarding mode to forward packets
Expand Down

0 comments on commit 33a5d15

Please sign in to comment.