[dpdk-dev,v2,2/2] examples/ipsec-secgw: call start function

Message ID 1469180663-24259-3-git-send-email-thomas.monjalon@6wind.com (mailing list archive)
State Accepted, archived
Headers

Commit Message

Thomas Monjalon July 22, 2016, 9:44 a.m. UTC
  From: Hemant Agrawal <hemant.agrawal@nxp.com>

The usual device sequence is configure, queue setup and start.
Crypto device should be started before use.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 4 ++++
 1 file changed, 4 insertions(+)
  

Patch

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 1ca144b..5d04eb3 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1273,6 +1273,10 @@  cryptodevs_init(void)
 						&qp_conf, dev_conf.socket_id))
 				rte_panic("Failed to setup queue %u for "
 						"cdev_id %u\n",	0, cdev_id);
+
+		if (rte_cryptodev_start(cdev_id))
+			rte_panic("Failed to start cryptodev %u\n",
+					cdev_id);
 	}
 
 	printf("\n");