patches for DPDK stable branches
 help / color / Atom feed
* [dpdk-stable] [PATCH 1/2] examples/ip_pipeline: fix crypto queue config
@ 2019-12-11  5:25 Hemant Agrawal
  2019-12-11  5:25 ` [dpdk-stable] [PATCH 2/2] examples/ip_pipeline: fix to use sock id instead of cpuid Hemant Agrawal
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Hemant Agrawal @ 2019-12-11  5:25 UTC (permalink / raw)
  To: dev; +Cc: cristian.dumitrescu, stable, Jun Yang, Hemant Agrawal

queue_conf need to have mempool details before pair setup.

Fixes: 261bbff75e34 ("examples: use separate crypto session mempools")
Cc: stable@dpdk.org

Signed-off-by: Jun Yang <jun.yang@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 examples/ip_pipeline/cryptodev.c | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/examples/ip_pipeline/cryptodev.c b/examples/ip_pipeline/cryptodev.c
index b0d9f3d217..ae65a90859 100644
--- a/examples/ip_pipeline/cryptodev.c
+++ b/examples/ip_pipeline/cryptodev.c
@@ -99,17 +99,6 @@ cryptodev_create(const char *name, struct cryptodev_params *params)
 	if (status < 0)
 		return NULL;
 
-	queue_conf.nb_descriptors = params->queue_size;
-	for (i = 0; i < params->n_queues; i++) {
-		status = rte_cryptodev_queue_pair_setup(dev_id, i,
-				&queue_conf, socket_id);
-		if (status < 0)
-			return NULL;
-	}
-
-	if (rte_cryptodev_start(dev_id) < 0)
-		return NULL;
-
 	cryptodev = calloc(1, sizeof(struct cryptodev));
 	if (cryptodev == NULL) {
 		rte_cryptodev_stop(dev_id);
@@ -149,6 +138,19 @@ cryptodev_create(const char *name, struct cryptodev_params *params)
 
 	TAILQ_INSERT_TAIL(&cryptodev_list, cryptodev, node);
 
+	queue_conf.nb_descriptors = params->queue_size;
+	queue_conf.mp_session = cryptodev->mp_create;
+	queue_conf.mp_session_private = cryptodev->mp_init;
+	for (i = 0; i < params->n_queues; i++) {
+		status = rte_cryptodev_queue_pair_setup(dev_id, i,
+				&queue_conf, socket_id);
+		if (status < 0)
+			goto error_exit;
+	}
+
+	if (rte_cryptodev_start(dev_id) < 0)
+		goto error_exit;
+
 	return cryptodev;
 
 error_exit:
-- 
2.17.1


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

end of thread, back to index

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-11  5:25 [dpdk-stable] [PATCH 1/2] examples/ip_pipeline: fix crypto queue config Hemant Agrawal
2019-12-11  5:25 ` [dpdk-stable] [PATCH 2/2] examples/ip_pipeline: fix to use sock id instead of cpuid Hemant Agrawal
2020-02-14 11:27   ` [dpdk-stable] [dpdk-dev] " Dumitrescu, Cristian
2020-02-14 15:18     ` [dpdk-stable] [EXT] " Jun Yang
2020-02-18 10:47       ` Dumitrescu, Cristian
2020-02-19 14:17         ` Jun Yang
2020-02-14 10:52 ` [dpdk-stable] [dpdk-dev] [PATCH 1/2] examples/ip_pipeline: fix crypto queue config Zhang, Roy Fan
2020-02-14 11:22 ` Dumitrescu, Cristian

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/ public-inbox