Skip to contentSkip to conversation

examples/ipsec-secgw: fix default flow rule creation

PATCH Applied Nithin Dabilpuram 2 participants 2 messages Dec 17, 2021 – Dec 24, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 examples/ipsec-secgw: fix default flow rule creation

Fix default flow rule to create after ethdev start to align wit RTE flow spec.

Fixes 513f192b5fd4 ("examples/ipsec-secgw: add default flow for inline Rx")
---
 examples/ipsec-secgw/ipsec-secgw.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
examples/ipsec-secgw/ipsec-secgw.c +4 -3
index bf3dbf6..8e2aa46 100644
@@ -3379,13 +3379,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
Signature · 1 line
2.8.4