examples/vhost_crypto: fix session private mempool

Message ID 20190115103808.76222-1-roy.fan.zhang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Maxime Coquelin
Headers
Series examples/vhost_crypto: fix session private mempool |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS

Commit Message

Fan Zhang Jan. 15, 2019, 10:38 a.m. UTC
  This patch fixes the incorrect session private mempool passing
to cryptodev.

Fixes: ac5e42daca19 ("vhost/crypto: use separate session mempools")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 examples/vhost_crypto/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

De Lara Guarch, Pablo Jan. 16, 2019, 12:02 p.m. UTC | #1
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Fan Zhang
> Sent: Tuesday, January 15, 2019 10:38 AM
> To: dev@dpdk.org
> Cc: maxime.coquelin@redhat.com
> Subject: [dpdk-dev] [PATCH] examples/vhost_crypto: fix session private
> mempool
> 
> This patch fixes the incorrect session private mempool passing to cryptodev.
> 
> Fixes: ac5e42daca19 ("vhost/crypto: use separate session mempools")
> 
> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>

Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
  
Maxime Coquelin Jan. 17, 2019, 8:32 a.m. UTC | #2
On 1/15/19 11:38 AM, Fan Zhang wrote:
> This patch fixes the incorrect session private mempool passing
> to cryptodev.
> 
> Fixes: ac5e42daca19 ("vhost/crypto: use separate session mempools")
> 
> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> ---
>   examples/vhost_crypto/main.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)



Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime
  
Maxime Coquelin Jan. 17, 2019, 11:34 a.m. UTC | #3
On 1/15/19 11:38 AM, Fan Zhang wrote:
> This patch fixes the incorrect session private mempool passing
> to cryptodev.
> 
> Fixes: ac5e42daca19 ("vhost/crypto: use separate session mempools")
> 
> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> ---
>   examples/vhost_crypto/main.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 

Applied to dpdk-next-virtio/master.

Thanks,
Maxime
  

Patch

diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c
index 8bdcb3a9c..ac7118e7e 100644
--- a/examples/vhost_crypto/main.c
+++ b/examples/vhost_crypto/main.c
@@ -541,7 +541,7 @@  main(int argc, char *argv[])
 				rte_cryptodev_sym_get_private_session_size(
 				info->cid), 64, 0, NULL, NULL, NULL, NULL,
 				rte_lcore_to_socket_id(lo->lcore_id), 0);
-		if (!info->sess_priv_pool || info->sess_pool) {
+		if (!info->sess_priv_pool || !info->sess_pool) {
 			RTE_LOG(ERR, USER1, "Failed to create mempool");
 			goto error_exit;
 		}
@@ -562,7 +562,7 @@  main(int argc, char *argv[])
 
 		qp_conf.nb_descriptors = NB_CRYPTO_DESCRIPTORS;
 		qp_conf.mp_session = info->sess_pool;
-		qp_conf.mp_session_private = info->sess_pool;
+		qp_conf.mp_session_private = info->sess_priv_pool;
 
 		for (j = 0; j < dev_info.max_nb_queue_pairs; j++) {
 			ret = rte_cryptodev_queue_pair_setup(info->cid, j,