DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] example/l2fwd-crypto: add support for cryptodev_start
@ 2016-07-21 10:54 Hemant Agrawal
  2016-07-21 10:54 ` [dpdk-dev] [PATCH 2/2] example/ipsec-secgw: " Hemant Agrawal
  0 siblings, 1 reply; 7+ messages in thread
From: Hemant Agrawal @ 2016-07-21 10:54 UTC (permalink / raw)
  To: declan.doherty, sergio.gonzalez.monroy; +Cc: dev

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>
---
 examples/l2fwd-crypto/main.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index dd39cc1..62e1c39 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -1793,6 +1793,12 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 		if (retval < 0) {
 			printf("Failed to setup queue pair %u on cryptodev %u",
 					0, cdev_id);
+		}
+		/* Start device */
+		retval = rte_cryptodev_start(cdev_id);
+		if (retval < 0) {
+			printf("rte_cryptodev_start:err=%d, cdev_id=%u\n",
+			       retval, (unsigned)cdev_id);
 			return -1;
 		}
 
-- 
1.9.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH 2/2] example/ipsec-secgw: add support for cryptodev_start
  2016-07-21 10:54 [dpdk-dev] [PATCH 1/2] example/l2fwd-crypto: add support for cryptodev_start Hemant Agrawal
@ 2016-07-21 10:54 ` Hemant Agrawal
  2016-07-22  9:44   ` [dpdk-dev] [PATCH v2 0/2] cryptodev_start fixes Thomas Monjalon
  0 siblings, 1 reply; 7+ messages in thread
From: Hemant Agrawal @ 2016-07-21 10:54 UTC (permalink / raw)
  To: declan.doherty, sergio.gonzalez.monroy; +Cc: dev

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>
---
 examples/ipsec-secgw/ipsec-secgw.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 1ca144b..302499c 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);
+		/* Start device */
+		if (rte_cryptodev_start(cdev_id))
+			rte_panic("Failed to start crypto dev for "
+						"cdev_id=%u\n", cdev_id);
 	}
 
 	printf("\n");
-- 
1.9.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH v2 0/2] cryptodev_start fixes
  2016-07-21 10:54 ` [dpdk-dev] [PATCH 2/2] example/ipsec-secgw: " Hemant Agrawal
@ 2016-07-22  9:44   ` Thomas Monjalon
  2016-07-22  9:44     ` [dpdk-dev] [PATCH v2 1/2] examples/l2fwd-crypto: call start function Thomas Monjalon
                       ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Thomas Monjalon @ 2016-07-22  9:44 UTC (permalink / raw)
  To: Akhil Goyal, Hemant Agrawal, declan.doherty, pablo.de.lara.guarch; +Cc: dev

It seems cryptodev_start() calls empty driver functions,
and is not called in the example applications.

This a v2 of patches from Hemant Agrawal and Akhil Goyal.
There are some improvements to make error messages more
consistent with existing ones and keep the existing error return.

Are they important fixes for 16.07? Please advise.

Hemant Agrawal (2):
  examples/l2fwd-crypto: call start function
  examples/ipsec-secgw: call start function

 examples/ipsec-secgw/ipsec-secgw.c | 4 ++++
 examples/l2fwd-crypto/main.c       | 7 +++++++
 2 files changed, 11 insertions(+)

-- 
2.7.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH v2 1/2] examples/l2fwd-crypto: call start function
  2016-07-22  9:44   ` [dpdk-dev] [PATCH v2 0/2] cryptodev_start fixes Thomas Monjalon
@ 2016-07-22  9:44     ` Thomas Monjalon
  2016-07-22  9:44     ` [dpdk-dev] [PATCH v2 2/2] examples/ipsec-secgw: " Thomas Monjalon
  2016-07-22 10:20     ` [dpdk-dev] [PATCH v2 0/2] cryptodev_start fixes De Lara Guarch, Pablo
  2 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2016-07-22  9:44 UTC (permalink / raw)
  To: Akhil Goyal, Hemant Agrawal, declan.doherty, pablo.de.lara.guarch; +Cc: dev

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/l2fwd-crypto/main.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index dd39cc1..66397a0 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -1796,6 +1796,13 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 			return -1;
 		}
 
+		retval = rte_cryptodev_start(cdev_id);
+		if (retval < 0) {
+			printf("Failed to start device %u: error %d\n",
+					cdev_id, retval);
+			return -1;
+		}
+
 		l2fwd_enabled_crypto_mask |= (1 << cdev_id);
 
 		enabled_cdevs[cdev_id] = 1;
-- 
2.7.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH v2 2/2] examples/ipsec-secgw: call start function
  2016-07-22  9:44   ` [dpdk-dev] [PATCH v2 0/2] cryptodev_start fixes Thomas Monjalon
  2016-07-22  9:44     ` [dpdk-dev] [PATCH v2 1/2] examples/l2fwd-crypto: call start function Thomas Monjalon
@ 2016-07-22  9:44     ` Thomas Monjalon
  2016-07-22 10:20     ` [dpdk-dev] [PATCH v2 0/2] cryptodev_start fixes De Lara Guarch, Pablo
  2 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2016-07-22  9:44 UTC (permalink / raw)
  To: Akhil Goyal, Hemant Agrawal, declan.doherty, pablo.de.lara.guarch; +Cc: dev

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(+)

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");
-- 
2.7.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH v2 0/2] cryptodev_start fixes
  2016-07-22  9:44   ` [dpdk-dev] [PATCH v2 0/2] cryptodev_start fixes Thomas Monjalon
  2016-07-22  9:44     ` [dpdk-dev] [PATCH v2 1/2] examples/l2fwd-crypto: call start function Thomas Monjalon
  2016-07-22  9:44     ` [dpdk-dev] [PATCH v2 2/2] examples/ipsec-secgw: " Thomas Monjalon
@ 2016-07-22 10:20     ` De Lara Guarch, Pablo
  2016-07-22 10:41       ` Thomas Monjalon
  2 siblings, 1 reply; 7+ messages in thread
From: De Lara Guarch, Pablo @ 2016-07-22 10:20 UTC (permalink / raw)
  To: Thomas Monjalon, Akhil Goyal, Hemant Agrawal, Doherty, Declan; +Cc: dev



> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Friday, July 22, 2016 10:44 AM
> To: Akhil Goyal; Hemant Agrawal; Doherty, Declan; De Lara Guarch, Pablo
> Cc: dev@dpdk.org
> Subject: [PATCH v2 0/2] cryptodev_start fixes
> 
> It seems cryptodev_start() calls empty driver functions,
> and is not called in the example applications.
> 
> This a v2 of patches from Hemant Agrawal and Akhil Goyal.
> There are some improvements to make error messages more
> consistent with existing ones and keep the existing error return.
> 
> Are they important fixes for 16.07? Please advise.
> 
> Hemant Agrawal (2):
>   examples/l2fwd-crypto: call start function
>   examples/ipsec-secgw: call start function
> 
>  examples/ipsec-secgw/ipsec-secgw.c | 4 ++++
>  examples/l2fwd-crypto/main.c       | 7 +++++++
>  2 files changed, 11 insertions(+)
> 
> --
> 2.7.0

Series-acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH v2 0/2] cryptodev_start fixes
  2016-07-22 10:20     ` [dpdk-dev] [PATCH v2 0/2] cryptodev_start fixes De Lara Guarch, Pablo
@ 2016-07-22 10:41       ` Thomas Monjalon
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2016-07-22 10:41 UTC (permalink / raw)
  To: Akhil Goyal, Hemant Agrawal; +Cc: dev, De Lara Guarch, Pablo, Doherty, Declan

2016-07-22 10:20, De Lara Guarch, Pablo:
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> > It seems cryptodev_start() calls empty driver functions,
> > and is not called in the example applications.
> > 
> > This a v2 of patches from Hemant Agrawal and Akhil Goyal.
> > There are some improvements to make error messages more
> > consistent with existing ones and keep the existing error return.
> > 
> > Are they important fixes for 16.07? Please advise.
> > 
> > Hemant Agrawal (2):
> >   examples/l2fwd-crypto: call start function
> >   examples/ipsec-secgw: call start function
> 
> Series-acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-07-22 10:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-21 10:54 [dpdk-dev] [PATCH 1/2] example/l2fwd-crypto: add support for cryptodev_start Hemant Agrawal
2016-07-21 10:54 ` [dpdk-dev] [PATCH 2/2] example/ipsec-secgw: " Hemant Agrawal
2016-07-22  9:44   ` [dpdk-dev] [PATCH v2 0/2] cryptodev_start fixes Thomas Monjalon
2016-07-22  9:44     ` [dpdk-dev] [PATCH v2 1/2] examples/l2fwd-crypto: call start function Thomas Monjalon
2016-07-22  9:44     ` [dpdk-dev] [PATCH v2 2/2] examples/ipsec-secgw: " Thomas Monjalon
2016-07-22 10:20     ` [dpdk-dev] [PATCH v2 0/2] cryptodev_start fixes De Lara Guarch, Pablo
2016-07-22 10:41       ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).