DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] lib/librte_vhost: fix bugs
@ 2018-04-09 15:34 Fan Zhang
  2018-04-09 15:34 ` [dpdk-dev] [PATCH] lib/librte_vhost: remove packet dump Fan Zhang
                   ` (4 more replies)
  0 siblings, 5 replies; 20+ messages in thread
From: Fan Zhang @ 2018-04-09 15:34 UTC (permalink / raw)
  To: dev
  Cc: jianjay.zhou, roy.fan.zhang, maxime.coquelin, jianfeng.tan,
	pawelx.wodkowski

Fixes: 256b132f41b2 ("vhost/crypto: add session message handler")
Fixes: 7b5ad7beee17 ("vhost/crypto: update makefile")
Fixes: 2ce5bd8c442d ("examples/vhost_crypto: add vhost crypto sample application")

This patch fixes the bugs introduced in the above patches.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 examples/vhost_crypto/main.c    | 5 -----
 lib/librte_vhost/Makefile       | 3 ++-
 lib/librte_vhost/vhost_crypto.c | 8 ++++----
 3 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c
index bc867240d..860200e29 100644
--- a/examples/vhost_crypto/main.c
+++ b/examples/vhost_crypto/main.c
@@ -95,11 +95,6 @@ parse_cryptodev_id(const char *q_arg)
 
 	/* parse decimal string */
 	pm = strtoul(q_arg, &end, 10);
-	if ((pm == '\0') || (end == NULL) || (*end != '\0')) {
-		RTE_LOG(ERR, USER1, "Invalid Cryptodev ID %s\n", q_arg);
-		return -1;
-	}
-
 	if (pm > rte_cryptodev_count()) {
 		RTE_LOG(ERR, USER1, "Invalid Cryptodev ID %s\n", q_arg);
 		return -1;
diff --git a/lib/librte_vhost/Makefile b/lib/librte_vhost/Makefile
index 2cc65f95e..92c267475 100644
--- a/lib/librte_vhost/Makefile
+++ b/lib/librte_vhost/Makefile
@@ -18,7 +18,8 @@ LDLIBS += -lpthread
 ifeq ($(CONFIG_RTE_LIBRTE_VHOST_NUMA),y)
 LDLIBS += -lnuma
 endif
-LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev -lrte_net
+LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev -lrte_net \
+					-lrte_cryptodev -lrte_hash
 
 # all source are stored in SRCS-y
 SRCS-$(CONFIG_RTE_LIBRTE_VHOST) := fd_man.c iotlb.c socket.c vhost.c \
diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
index d84513e7f..2acfc908c 100644
--- a/lib/librte_vhost/vhost_crypto.c
+++ b/lib/librte_vhost/vhost_crypto.c
@@ -381,7 +381,7 @@ vhost_crypto_create_sess(struct vhost_crypto *vcrypto,
 		return;
 	}
 
-	VC_LOG_DBG("Session (key %lu, session %p) created.",
+	VC_LOG_DBG("Session (key %llu, session %p) created.",
 			vcrypto->last_session_id, session);
 
 	sess_param->session_id = vcrypto->last_session_id;
@@ -399,7 +399,7 @@ vhost_crypto_close_sess(struct vhost_crypto *vcrypto, uint64_t session_id)
 			(void **)&session);
 
 	if (unlikely(ret < 0)) {
-		VC_LOG_ERR("Failed to delete session (key %lu).", session_id);
+		VC_LOG_ERR("Failed to delete session (key %llu).", session_id);
 		return -VIRTIO_CRYPTO_INVSESS;
 	}
 
@@ -418,7 +418,7 @@ vhost_crypto_close_sess(struct vhost_crypto *vcrypto, uint64_t session_id)
 		return -VIRTIO_CRYPTO_ERR;
 	}
 
-	VC_LOG_DBG("Session (key %lu, session %p) deleted.", sess_id,
+	VC_LOG_DBG("Session (key %llu, session %p) deleted.", sess_id,
 			session);
 
 	return 0;
@@ -932,7 +932,7 @@ vhost_crypto_process_one_req(struct vhost_crypto *vcrypto,
 					&session_id, (void **)&session);
 			if (unlikely(err < 0)) {
 				err = VIRTIO_CRYPTO_ERR;
-				VC_LOG_ERR("Failed to retrieve session id %lu",
+				VC_LOG_ERR("Failed to retrieve session id %llu",
 						session_id);
 				goto error_exit;
 			}
-- 
2.13.6

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

* [dpdk-dev] [PATCH] lib/librte_vhost: remove packet dump
  2018-04-09 15:34 [dpdk-dev] [PATCH] lib/librte_vhost: fix bugs Fan Zhang
@ 2018-04-09 15:34 ` Fan Zhang
  2018-04-11  8:47   ` Maxime Coquelin
  2018-04-09 15:45 ` [dpdk-dev] [PATCH] lib/librte_vhost: fix bugs Maxime Coquelin
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 20+ messages in thread
From: Fan Zhang @ 2018-04-09 15:34 UTC (permalink / raw)
  To: dev
  Cc: jianjay.zhou, roy.fan.zhang, maxime.coquelin, jianfeng.tan,
	pawelx.wodkowski

This patch removes unnecessary packet dump for debugging.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 lib/librte_vhost/vhost_crypto.c | 36 ------------------------------------
 1 file changed, 36 deletions(-)

diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
index d84513e7f..d86af0532 100644
--- a/lib/librte_vhost/vhost_crypto.c
+++ b/lib/librte_vhost/vhost_crypto.c
@@ -578,21 +578,12 @@ write_back_data(struct rte_crypto_op *op, struct vhost_crypto_data_req *vc_req)
 	left -= to_write;
 	src_data += to_write;
 
-#ifdef RTE_LIBRTE_VHOST_DEBUG
-	printf("desc addr %llu len %u:", desc->addr, desc->len);
-	rte_hexdump(stdout, "", dst, to_write);
-#endif
-
 	while ((desc->flags & VRING_DESC_F_NEXT) && left > 0) {
 		desc = &head[desc->next];
 		rte_prefetch0(&head[desc->next]);
 		to_write = RTE_MIN(desc->len, (uint32_t)left);
 		dst = GPA_TO_VVA(uint8_t *, mem, desc->addr);
 		rte_memcpy(dst, src_data, to_write);
-#ifdef RTE_LIBRTE_VHOST_DEBUG
-		printf("desc addr %llu len %u:", desc->addr, desc->len);
-		rte_hexdump(stdout, "DST:", dst, to_write);
-#endif
 		left -= to_write;
 		src_data += to_write;
 	}
@@ -626,10 +617,6 @@ prepare_sym_cipher_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
 		goto error_exit;
 	}
 
-#ifdef RTE_LIBRTE_VHOST_DEBUG
-	rte_hexdump(stdout, "IV:", iv_data, cipher->para.iv_len);
-#endif
-
 	m_src->data_len = cipher->para.src_data_len;
 
 	switch (vcrypto->option) {
@@ -664,11 +651,6 @@ prepare_sym_cipher_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
 		goto error_exit;
 	}
 
-#ifdef RTE_LIBRTE_VHOST_DEBUG
-	rte_hexdump(stdout, "SRC:", rte_pktmbuf_mtod(m_src, void *),
-			cipher->para.src_data_len);
-#endif
-
 	/* dst */
 	desc = find_write_desc(head, desc);
 	if (unlikely(!desc)) {
@@ -746,9 +728,6 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
 		goto error_exit;
 	}
 
-#ifdef RTE_LIBRTE_VHOST_DEBUG
-	rte_hexdump(stdout, "IV:", iv_data, chain->para.iv_len);
-#endif
 	m_src->data_len = chain->para.src_data_len;
 	m_dst->data_len = chain->para.dst_data_len;
 
@@ -782,11 +761,6 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
 		goto error_exit;
 	}
 
-#ifdef RTE_LIBRTE_VHOST_DEBUG
-	rte_hexdump(stdout, "SRC:", rte_pktmbuf_mtod(m_src, void *),
-			chain->para.src_data_len);
-#endif
-
 	/* dst */
 	desc = find_write_desc(head, desc);
 	if (unlikely(!desc)) {
@@ -846,11 +820,6 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
 		goto error_exit;
 	}
 
-#ifdef RTE_LIBRTE_VHOST_DEBUG
-	rte_hexdump(stdout, "Digest:", op->sym->auth.digest.data,
-			chain->para.hash_result_len);
-#endif
-
 	/* record inhdr */
 	vc_req->inhdr = get_data_ptr(head, mem, &desc, INHDR_LEN);
 	if (unlikely(vc_req->inhdr == NULL)) {
@@ -1016,11 +985,6 @@ vhost_crypto_finalize_one_request(struct rte_crypto_op *op,
 		}
 	}
 
-#ifdef RTE_LIBRTE_VHOST_DEBUG
-	rte_hexdump(stdout, "DST:", rte_pktmbuf_mtod(op->sym->m_dst, uint8_t *),
-			m_dst->data_len);
-#endif
-
 	vc_req->vq->used->ring[desc_idx].id = desc_idx;
 	vc_req->vq->used->ring[desc_idx].len = vc_req->len;
 
-- 
2.13.6

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

* Re: [dpdk-dev] [PATCH] lib/librte_vhost: fix bugs
  2018-04-09 15:34 [dpdk-dev] [PATCH] lib/librte_vhost: fix bugs Fan Zhang
  2018-04-09 15:34 ` [dpdk-dev] [PATCH] lib/librte_vhost: remove packet dump Fan Zhang
@ 2018-04-09 15:45 ` Maxime Coquelin
  2018-04-09 15:53 ` Maxime Coquelin
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 20+ messages in thread
From: Maxime Coquelin @ 2018-04-09 15:45 UTC (permalink / raw)
  To: Fan Zhang, dev; +Cc: jianjay.zhou, jianfeng.tan, pawelx.wodkowski

Hi Fan,

On 04/09/2018 05:34 PM, Fan Zhang wrote:
> Fixes: 256b132f41b2 ("vhost/crypto: add session message handler")
> Fixes: 7b5ad7beee17 ("vhost/crypto: update makefile")
> Fixes: 2ce5bd8c442d ("examples/vhost_crypto: add vhost crypto sample application")
> 
> This patch fixes the bugs introduced in the above patches.
> 
> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> ---
>   examples/vhost_crypto/main.c    | 5 -----
>   lib/librte_vhost/Makefile       | 3 ++-
>   lib/librte_vhost/vhost_crypto.c | 8 ++++----
>   3 files changed, 6 insertions(+), 10 deletions(-)


Can you please split the patch in 3 parts, one for each patches it
fixes?

As my branch hasn't been picked yest y Ferruh, I can squash them
directly.

Thanks,
Maxime
> diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c
> index bc867240d..860200e29 100644
> --- a/examples/vhost_crypto/main.c
> +++ b/examples/vhost_crypto/main.c
> @@ -95,11 +95,6 @@ parse_cryptodev_id(const char *q_arg)
>   
>   	/* parse decimal string */
>   	pm = strtoul(q_arg, &end, 10);
> -	if ((pm == '\0') || (end == NULL) || (*end != '\0')) {
> -		RTE_LOG(ERR, USER1, "Invalid Cryptodev ID %s\n", q_arg);
> -		return -1;
> -	}
> -
>   	if (pm > rte_cryptodev_count()) {
>   		RTE_LOG(ERR, USER1, "Invalid Cryptodev ID %s\n", q_arg);
>   		return -1;
> diff --git a/lib/librte_vhost/Makefile b/lib/librte_vhost/Makefile
> index 2cc65f95e..92c267475 100644
> --- a/lib/librte_vhost/Makefile
> +++ b/lib/librte_vhost/Makefile
> @@ -18,7 +18,8 @@ LDLIBS += -lpthread
>   ifeq ($(CONFIG_RTE_LIBRTE_VHOST_NUMA),y)
>   LDLIBS += -lnuma
>   endif
> -LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev -lrte_net
> +LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev -lrte_net \
> +					-lrte_cryptodev -lrte_hash
>   
>   # all source are stored in SRCS-y
>   SRCS-$(CONFIG_RTE_LIBRTE_VHOST) := fd_man.c iotlb.c socket.c vhost.c \
> diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
> index d84513e7f..2acfc908c 100644
> --- a/lib/librte_vhost/vhost_crypto.c
> +++ b/lib/librte_vhost/vhost_crypto.c
> @@ -381,7 +381,7 @@ vhost_crypto_create_sess(struct vhost_crypto *vcrypto,
>   		return;
>   	}
>   
> -	VC_LOG_DBG("Session (key %lu, session %p) created.",
> +	VC_LOG_DBG("Session (key %llu, session %p) created.",
>   			vcrypto->last_session_id, session);
>   
>   	sess_param->session_id = vcrypto->last_session_id;
> @@ -399,7 +399,7 @@ vhost_crypto_close_sess(struct vhost_crypto *vcrypto, uint64_t session_id)
>   			(void **)&session);
>   
>   	if (unlikely(ret < 0)) {
> -		VC_LOG_ERR("Failed to delete session (key %lu).", session_id);
> +		VC_LOG_ERR("Failed to delete session (key %llu).", session_id);
>   		return -VIRTIO_CRYPTO_INVSESS;
>   	}
>   
> @@ -418,7 +418,7 @@ vhost_crypto_close_sess(struct vhost_crypto *vcrypto, uint64_t session_id)
>   		return -VIRTIO_CRYPTO_ERR;
>   	}
>   
> -	VC_LOG_DBG("Session (key %lu, session %p) deleted.", sess_id,
> +	VC_LOG_DBG("Session (key %llu, session %p) deleted.", sess_id,
>   			session);
>   
>   	return 0;
> @@ -932,7 +932,7 @@ vhost_crypto_process_one_req(struct vhost_crypto *vcrypto,
>   					&session_id, (void **)&session);
>   			if (unlikely(err < 0)) {
>   				err = VIRTIO_CRYPTO_ERR;
> -				VC_LOG_ERR("Failed to retrieve session id %lu",
> +				VC_LOG_ERR("Failed to retrieve session id %llu",
>   						session_id);
>   				goto error_exit;
>   			}
> 

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

* Re: [dpdk-dev] [PATCH] lib/librte_vhost: fix bugs
  2018-04-09 15:34 [dpdk-dev] [PATCH] lib/librte_vhost: fix bugs Fan Zhang
  2018-04-09 15:34 ` [dpdk-dev] [PATCH] lib/librte_vhost: remove packet dump Fan Zhang
  2018-04-09 15:45 ` [dpdk-dev] [PATCH] lib/librte_vhost: fix bugs Maxime Coquelin
@ 2018-04-09 15:53 ` Maxime Coquelin
  2018-04-09 16:38 ` [dpdk-dev] [PATCH v2] vhost/crypto: " Fan Zhang
  2018-04-10  7:32 ` [dpdk-dev] [PATCH] lib/librte_vhost: fix bugs Wodkowski, PawelX
  4 siblings, 0 replies; 20+ messages in thread
From: Maxime Coquelin @ 2018-04-09 15:53 UTC (permalink / raw)
  To: Fan Zhang, dev; +Cc: jianjay.zhou, jianfeng.tan, pawelx.wodkowski

Overall, please rename the commit title prefix to vhost/crypto.

Thanks,
Maxime

On 04/09/2018 05:34 PM, Fan Zhang wrote:
> Fixes: 256b132f41b2 ("vhost/crypto: add session message handler")
> Fixes: 7b5ad7beee17 ("vhost/crypto: update makefile")
> Fixes: 2ce5bd8c442d ("examples/vhost_crypto: add vhost crypto sample application")
> 
> This patch fixes the bugs introduced in the above patches.
> 
> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> ---
>   examples/vhost_crypto/main.c    | 5 -----
>   lib/librte_vhost/Makefile       | 3 ++-
>   lib/librte_vhost/vhost_crypto.c | 8 ++++----
>   3 files changed, 6 insertions(+), 10 deletions(-)
> 
> diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c
> index bc867240d..860200e29 100644
> --- a/examples/vhost_crypto/main.c
> +++ b/examples/vhost_crypto/main.c
> @@ -95,11 +95,6 @@ parse_cryptodev_id(const char *q_arg)
>   
>   	/* parse decimal string */
>   	pm = strtoul(q_arg, &end, 10);
> -	if ((pm == '\0') || (end == NULL) || (*end != '\0')) {
> -		RTE_LOG(ERR, USER1, "Invalid Cryptodev ID %s\n", q_arg);
> -		return -1;
> -	}
> -
>   	if (pm > rte_cryptodev_count()) {
>   		RTE_LOG(ERR, USER1, "Invalid Cryptodev ID %s\n", q_arg);
>   		return -1;
> diff --git a/lib/librte_vhost/Makefile b/lib/librte_vhost/Makefile
> index 2cc65f95e..92c267475 100644
> --- a/lib/librte_vhost/Makefile
> +++ b/lib/librte_vhost/Makefile
> @@ -18,7 +18,8 @@ LDLIBS += -lpthread
>   ifeq ($(CONFIG_RTE_LIBRTE_VHOST_NUMA),y)
>   LDLIBS += -lnuma
>   endif
> -LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev -lrte_net
> +LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev -lrte_net \
> +					-lrte_cryptodev -lrte_hash
>   
>   # all source are stored in SRCS-y
>   SRCS-$(CONFIG_RTE_LIBRTE_VHOST) := fd_man.c iotlb.c socket.c vhost.c \
> diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
> index d84513e7f..2acfc908c 100644
> --- a/lib/librte_vhost/vhost_crypto.c
> +++ b/lib/librte_vhost/vhost_crypto.c
> @@ -381,7 +381,7 @@ vhost_crypto_create_sess(struct vhost_crypto *vcrypto,
>   		return;
>   	}
>   
> -	VC_LOG_DBG("Session (key %lu, session %p) created.",
> +	VC_LOG_DBG("Session (key %llu, session %p) created.",
>   			vcrypto->last_session_id, session);
>   
>   	sess_param->session_id = vcrypto->last_session_id;
> @@ -399,7 +399,7 @@ vhost_crypto_close_sess(struct vhost_crypto *vcrypto, uint64_t session_id)
>   			(void **)&session);
>   
>   	if (unlikely(ret < 0)) {
> -		VC_LOG_ERR("Failed to delete session (key %lu).", session_id);
> +		VC_LOG_ERR("Failed to delete session (key %llu).", session_id);
>   		return -VIRTIO_CRYPTO_INVSESS;
>   	}
>   
> @@ -418,7 +418,7 @@ vhost_crypto_close_sess(struct vhost_crypto *vcrypto, uint64_t session_id)
>   		return -VIRTIO_CRYPTO_ERR;
>   	}
>   
> -	VC_LOG_DBG("Session (key %lu, session %p) deleted.", sess_id,
> +	VC_LOG_DBG("Session (key %llu, session %p) deleted.", sess_id,
>   			session);
>   
>   	return 0;
> @@ -932,7 +932,7 @@ vhost_crypto_process_one_req(struct vhost_crypto *vcrypto,
>   					&session_id, (void **)&session);
>   			if (unlikely(err < 0)) {
>   				err = VIRTIO_CRYPTO_ERR;
> -				VC_LOG_ERR("Failed to retrieve session id %lu",
> +				VC_LOG_ERR("Failed to retrieve session id %llu",
>   						session_id);
>   				goto error_exit;
>   			}
> 

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

* [dpdk-dev] [PATCH v2] vhost/crypto: fix bugs
  2018-04-09 15:34 [dpdk-dev] [PATCH] lib/librte_vhost: fix bugs Fan Zhang
                   ` (2 preceding siblings ...)
  2018-04-09 15:53 ` Maxime Coquelin
@ 2018-04-09 16:38 ` Fan Zhang
  2018-04-09 17:57   ` [dpdk-dev] [PATCH] examples/vhost_crypto: fix parsing Fan Zhang
                     ` (3 more replies)
  2018-04-10  7:32 ` [dpdk-dev] [PATCH] lib/librte_vhost: fix bugs Wodkowski, PawelX
  4 siblings, 4 replies; 20+ messages in thread
From: Fan Zhang @ 2018-04-09 16:38 UTC (permalink / raw)
  To: dev; +Cc: roy.fan.zhang, maxime.coquelin, ferruh.yigit

Fixes: 256b132f41b2 ("vhost/crypto: add session message handler")
Fixes: 7b5ad7beee17 ("vhost/crypto: update makefile")
Fixes: 2ce5bd8c442d ("examples/vhost_crypto: add vhost crypto sample application")

This patch fixes the bugs introduced in the above patches.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---
v2:
- change from "%llu" to "%"PRIu64

 examples/vhost_crypto/main.c    |  5 -----
 lib/librte_vhost/Makefile       |  3 ++-
 lib/librte_vhost/vhost_crypto.c | 17 +++++++++--------
 3 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c
index bc867240d..860200e29 100644
--- a/examples/vhost_crypto/main.c
+++ b/examples/vhost_crypto/main.c
@@ -95,11 +95,6 @@ parse_cryptodev_id(const char *q_arg)
 
 	/* parse decimal string */
 	pm = strtoul(q_arg, &end, 10);
-	if ((pm == '\0') || (end == NULL) || (*end != '\0')) {
-		RTE_LOG(ERR, USER1, "Invalid Cryptodev ID %s\n", q_arg);
-		return -1;
-	}
-
 	if (pm > rte_cryptodev_count()) {
 		RTE_LOG(ERR, USER1, "Invalid Cryptodev ID %s\n", q_arg);
 		return -1;
diff --git a/lib/librte_vhost/Makefile b/lib/librte_vhost/Makefile
index 2cc65f95e..92c267475 100644
--- a/lib/librte_vhost/Makefile
+++ b/lib/librte_vhost/Makefile
@@ -18,7 +18,8 @@ LDLIBS += -lpthread
 ifeq ($(CONFIG_RTE_LIBRTE_VHOST_NUMA),y)
 LDLIBS += -lnuma
 endif
-LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev -lrte_net
+LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev -lrte_net \
+					-lrte_cryptodev -lrte_hash
 
 # all source are stored in SRCS-y
 SRCS-$(CONFIG_RTE_LIBRTE_VHOST) := fd_man.c iotlb.c socket.c vhost.c \
diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
index d84513e7f..b67b63cc1 100644
--- a/lib/librte_vhost/vhost_crypto.c
+++ b/lib/librte_vhost/vhost_crypto.c
@@ -381,8 +381,8 @@ vhost_crypto_create_sess(struct vhost_crypto *vcrypto,
 		return;
 	}
 
-	VC_LOG_DBG("Session (key %lu, session %p) created.",
-			vcrypto->last_session_id, session);
+	VC_LOG_DBG("Session %"PRIu64" created for vid %i.",
+			vcrypto->last_session_id, vcrypto->dev->vid);
 
 	sess_param->session_id = vcrypto->last_session_id;
 	vcrypto->last_session_id++;
@@ -399,17 +399,18 @@ vhost_crypto_close_sess(struct vhost_crypto *vcrypto, uint64_t session_id)
 			(void **)&session);
 
 	if (unlikely(ret < 0)) {
-		VC_LOG_ERR("Failed to delete session (key %lu).", session_id);
+		VC_LOG_ERR("Failed to delete session %"PRIu64".",
+				session_id);
 		return -VIRTIO_CRYPTO_INVSESS;
 	}
 
 	if (rte_cryptodev_sym_session_clear(vcrypto->cid, session) < 0) {
-		VC_LOG_DBG("Failed to delete session");
+		VC_LOG_DBG("Failed to clear session");
 		return -VIRTIO_CRYPTO_ERR;
 	}
 
 	if (rte_cryptodev_sym_session_free(session) < 0) {
-		VC_LOG_DBG("Failed to delete session");
+		VC_LOG_DBG("Failed to free session");
 		return -VIRTIO_CRYPTO_ERR;
 	}
 
@@ -418,8 +419,8 @@ vhost_crypto_close_sess(struct vhost_crypto *vcrypto, uint64_t session_id)
 		return -VIRTIO_CRYPTO_ERR;
 	}
 
-	VC_LOG_DBG("Session (key %lu, session %p) deleted.", sess_id,
-			session);
+	VC_LOG_DBG("Session %"PRIu64" deleted for vid %i.", sess_id,
+			vcrypto->dev->vid);
 
 	return 0;
 }
@@ -932,7 +933,7 @@ vhost_crypto_process_one_req(struct vhost_crypto *vcrypto,
 					&session_id, (void **)&session);
 			if (unlikely(err < 0)) {
 				err = VIRTIO_CRYPTO_ERR;
-				VC_LOG_ERR("Failed to retrieve session id %lu",
+				VC_LOG_ERR("Failed to obtain session %"PRIu64,
 						session_id);
 				goto error_exit;
 			}
-- 
2.13.6

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

* [dpdk-dev] [PATCH] examples/vhost_crypto: fix parsing
  2018-04-09 16:38 ` [dpdk-dev] [PATCH v2] vhost/crypto: " Fan Zhang
@ 2018-04-09 17:57   ` Fan Zhang
  2018-04-10  9:40     ` Maxime Coquelin
  2018-04-09 18:01   ` [dpdk-dev] [PATCH] vhost/crypto: fix makefile Fan Zhang
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 20+ messages in thread
From: Fan Zhang @ 2018-04-09 17:57 UTC (permalink / raw)
  To: dev; +Cc: roy.fan.zhang, maxime.coquelin, ferruh.yigit

Fixes: 2ce5bd8c442d ("examples/vhost_crypto: add vhost crypto sample application")

This patch fixes the parsing of cryptodev id in the cmdline.

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

diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c
index bc867240d..860200e29 100644
--- a/examples/vhost_crypto/main.c
+++ b/examples/vhost_crypto/main.c
@@ -95,11 +95,6 @@ parse_cryptodev_id(const char *q_arg)
 
 	/* parse decimal string */
 	pm = strtoul(q_arg, &end, 10);
-	if ((pm == '\0') || (end == NULL) || (*end != '\0')) {
-		RTE_LOG(ERR, USER1, "Invalid Cryptodev ID %s\n", q_arg);
-		return -1;
-	}
-
 	if (pm > rte_cryptodev_count()) {
 		RTE_LOG(ERR, USER1, "Invalid Cryptodev ID %s\n", q_arg);
 		return -1;
-- 
2.13.6

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

* [dpdk-dev] [PATCH] vhost/crypto: fix makefile
  2018-04-09 16:38 ` [dpdk-dev] [PATCH v2] vhost/crypto: " Fan Zhang
  2018-04-09 17:57   ` [dpdk-dev] [PATCH] examples/vhost_crypto: fix parsing Fan Zhang
@ 2018-04-09 18:01   ` Fan Zhang
  2018-04-10  9:41     ` Maxime Coquelin
  2018-04-09 18:21   ` [dpdk-dev] [PATCH] vhost/crypto: fix session id printf Fan Zhang
  2018-04-11  9:22   ` [dpdk-dev] [PATCH] vhost/crypto: fix incorrect formatting Fan Zhang
  3 siblings, 1 reply; 20+ messages in thread
From: Fan Zhang @ 2018-04-09 18:01 UTC (permalink / raw)
  To: dev; +Cc: roy.fan.zhang, maxime.coquelin, ferruh.yigit

Fixes: 7b5ad7beee17 ("vhost/crypto: update makefile")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 lib/librte_vhost/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/librte_vhost/Makefile b/lib/librte_vhost/Makefile
index 2cc65f95e..92c267475 100644
--- a/lib/librte_vhost/Makefile
+++ b/lib/librte_vhost/Makefile
@@ -18,7 +18,8 @@ LDLIBS += -lpthread
 ifeq ($(CONFIG_RTE_LIBRTE_VHOST_NUMA),y)
 LDLIBS += -lnuma
 endif
-LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev -lrte_net
+LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev -lrte_net \
+					-lrte_cryptodev -lrte_hash
 
 # all source are stored in SRCS-y
 SRCS-$(CONFIG_RTE_LIBRTE_VHOST) := fd_man.c iotlb.c socket.c vhost.c \
-- 
2.13.6

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

* [dpdk-dev] [PATCH] vhost/crypto: fix session id printf
  2018-04-09 16:38 ` [dpdk-dev] [PATCH v2] vhost/crypto: " Fan Zhang
  2018-04-09 17:57   ` [dpdk-dev] [PATCH] examples/vhost_crypto: fix parsing Fan Zhang
  2018-04-09 18:01   ` [dpdk-dev] [PATCH] vhost/crypto: fix makefile Fan Zhang
@ 2018-04-09 18:21   ` Fan Zhang
  2018-04-10  9:41     ` Maxime Coquelin
  2018-04-11  9:22   ` [dpdk-dev] [PATCH] vhost/crypto: fix incorrect formatting Fan Zhang
  3 siblings, 1 reply; 20+ messages in thread
From: Fan Zhang @ 2018-04-09 18:21 UTC (permalink / raw)
  To: dev; +Cc: roy.fan.zhang, maxime.coquelin, ferruh.yigit

Fixes: 85a2d5cab96f ("vhost/crypto: add virtio-crypto user message structure")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 lib/librte_vhost/vhost_crypto.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
index d84513e7f..06c0d3398 100644
--- a/lib/librte_vhost/vhost_crypto.c
+++ b/lib/librte_vhost/vhost_crypto.c
@@ -381,8 +381,8 @@ vhost_crypto_create_sess(struct vhost_crypto *vcrypto,
 		return;
 	}
 
-	VC_LOG_DBG("Session (key %lu, session %p) created.",
-			vcrypto->last_session_id, session);
+	VC_LOG_INFO("Session %"PRIu64" created for vdev %i.",
+			vcrypto->last_session_id, vcrypto->dev->vid);
 
 	sess_param->session_id = vcrypto->last_session_id;
 	vcrypto->last_session_id++;
@@ -399,17 +399,17 @@ vhost_crypto_close_sess(struct vhost_crypto *vcrypto, uint64_t session_id)
 			(void **)&session);
 
 	if (unlikely(ret < 0)) {
-		VC_LOG_ERR("Failed to delete session (key %lu).", session_id);
+		VC_LOG_ERR("Failed to delete session %"PRIu64".", session_id);
 		return -VIRTIO_CRYPTO_INVSESS;
 	}
 
 	if (rte_cryptodev_sym_session_clear(vcrypto->cid, session) < 0) {
-		VC_LOG_DBG("Failed to delete session");
+		VC_LOG_DBG("Failed to clear session");
 		return -VIRTIO_CRYPTO_ERR;
 	}
 
 	if (rte_cryptodev_sym_session_free(session) < 0) {
-		VC_LOG_DBG("Failed to delete session");
+		VC_LOG_DBG("Failed to free session");
 		return -VIRTIO_CRYPTO_ERR;
 	}
 
@@ -418,8 +418,8 @@ vhost_crypto_close_sess(struct vhost_crypto *vcrypto, uint64_t session_id)
 		return -VIRTIO_CRYPTO_ERR;
 	}
 
-	VC_LOG_DBG("Session (key %lu, session %p) deleted.", sess_id,
-			session);
+	VC_LOG_INFO("Session %"PRIu64" deleted for vdev %i.", sess_id,
+			vcrypto->dev->vid);
 
 	return 0;
 }
-- 
2.13.6

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

* Re: [dpdk-dev] [PATCH] lib/librte_vhost: fix bugs
  2018-04-09 15:34 [dpdk-dev] [PATCH] lib/librte_vhost: fix bugs Fan Zhang
                   ` (3 preceding siblings ...)
  2018-04-09 16:38 ` [dpdk-dev] [PATCH v2] vhost/crypto: " Fan Zhang
@ 2018-04-10  7:32 ` Wodkowski, PawelX
  2018-04-10  7:43   ` Maxime Coquelin
  4 siblings, 1 reply; 20+ messages in thread
From: Wodkowski, PawelX @ 2018-04-10  7:32 UTC (permalink / raw)
  To: Zhang, Roy Fan, dev; +Cc: jianjay.zhou, maxime.coquelin, Tan, Jianfeng

>  # all source are stored in SRCS-y
>  SRCS-$(CONFIG_RTE_LIBRTE_VHOST) := fd_man.c iotlb.c socket.c vhost.c \
> diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
> index d84513e7f..2acfc908c 100644
> --- a/lib/librte_vhost/vhost_crypto.c
> +++ b/lib/librte_vhost/vhost_crypto.c
> @@ -381,7 +381,7 @@ vhost_crypto_create_sess(struct vhost_crypto
> *vcrypto,
>  		return;
>  	}
> 
> -	VC_LOG_DBG("Session (key %lu, session %p) created.",
> +	VC_LOG_DBG("Session (key %llu, session %p) created.",

Why 'llu' instead of PRIu64 (here and there)?

Pawel

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

* Re: [dpdk-dev] [PATCH] lib/librte_vhost: fix bugs
  2018-04-10  7:32 ` [dpdk-dev] [PATCH] lib/librte_vhost: fix bugs Wodkowski, PawelX
@ 2018-04-10  7:43   ` Maxime Coquelin
  2018-04-10  7:47     ` Wodkowski, PawelX
  0 siblings, 1 reply; 20+ messages in thread
From: Maxime Coquelin @ 2018-04-10  7:43 UTC (permalink / raw)
  To: Wodkowski, PawelX, Zhang, Roy Fan, dev; +Cc: jianjay.zhou, Tan, Jianfeng

Hi Pawel,

On 04/10/2018 09:32 AM, Wodkowski, PawelX wrote:
>>   # all source are stored in SRCS-y
>>   SRCS-$(CONFIG_RTE_LIBRTE_VHOST) := fd_man.c iotlb.c socket.c vhost.c \
>> diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
>> index d84513e7f..2acfc908c 100644
>> --- a/lib/librte_vhost/vhost_crypto.c
>> +++ b/lib/librte_vhost/vhost_crypto.c
>> @@ -381,7 +381,7 @@ vhost_crypto_create_sess(struct vhost_crypto
>> *vcrypto,
>>   		return;
>>   	}
>>
>> -	VC_LOG_DBG("Session (key %lu, session %p) created.",
>> +	VC_LOG_DBG("Session (key %llu, session %p) created.",
> 
> Why 'llu' instead of PRIu64 (here and there)?

You are right, but Fan actually fixed it in updated version (the initial
patch has been split in 3):
[PATCH] vhost/crypto: fix session id printf

Cheers,
Maxime
> Pawel
> 

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

* Re: [dpdk-dev] [PATCH] lib/librte_vhost: fix bugs
  2018-04-10  7:43   ` Maxime Coquelin
@ 2018-04-10  7:47     ` Wodkowski, PawelX
  2018-04-10  7:55       ` Maxime Coquelin
  0 siblings, 1 reply; 20+ messages in thread
From: Wodkowski, PawelX @ 2018-04-10  7:47 UTC (permalink / raw)
  To: Maxime Coquelin, Zhang, Roy Fan, dev; +Cc: jianjay.zhou, Tan, Jianfeng

> -----Original Message-----
> From: Maxime Coquelin [mailto:maxime.coquelin@redhat.com]
> Sent: Tuesday, April 10, 2018 9:44 AM
> To: Wodkowski, PawelX <pawelx.wodkowski@intel.com>; Zhang, Roy Fan
> <roy.fan.zhang@intel.com>; dev@dpdk.org
> Cc: jianjay.zhou@huawei.com; Tan, Jianfeng <jianfeng.tan@intel.com>
> Subject: Re: [PATCH] lib/librte_vhost: fix bugs
> 
> Hi Pawel,
> 
> On 04/10/2018 09:32 AM, Wodkowski, PawelX wrote:
> >>   # all source are stored in SRCS-y
> >>   SRCS-$(CONFIG_RTE_LIBRTE_VHOST) := fd_man.c iotlb.c socket.c vhost.c
> \
> >> diff --git a/lib/librte_vhost/vhost_crypto.c
> b/lib/librte_vhost/vhost_crypto.c
> >> index d84513e7f..2acfc908c 100644
> >> --- a/lib/librte_vhost/vhost_crypto.c
> >> +++ b/lib/librte_vhost/vhost_crypto.c
> >> @@ -381,7 +381,7 @@ vhost_crypto_create_sess(struct vhost_crypto
> >> *vcrypto,
> >>   		return;
> >>   	}
> >>
> >> -	VC_LOG_DBG("Session (key %lu, session %p) created.",
> >> +	VC_LOG_DBG("Session (key %llu, session %p) created.",
> >
> > Why 'llu' instead of PRIu64 (here and there)?
> 
> You are right, but Fan actually fixed it in updated version (the initial
> patch has been split in 3):
> [PATCH] vhost/crypto: fix session id printf
> 

Ohh, sorry. I need more coffee before starting review :)


> Cheers,
> Maxime
> > Pawel
> >

Pawel

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

* Re: [dpdk-dev] [PATCH] lib/librte_vhost: fix bugs
  2018-04-10  7:47     ` Wodkowski, PawelX
@ 2018-04-10  7:55       ` Maxime Coquelin
  0 siblings, 0 replies; 20+ messages in thread
From: Maxime Coquelin @ 2018-04-10  7:55 UTC (permalink / raw)
  To: Wodkowski, PawelX, Zhang, Roy Fan, dev; +Cc: jianjay.zhou, Tan, Jianfeng



On 04/10/2018 09:47 AM, Wodkowski, PawelX wrote:
>> -----Original Message-----
>> From: Maxime Coquelin [mailto:maxime.coquelin@redhat.com]
>> Sent: Tuesday, April 10, 2018 9:44 AM
>> To: Wodkowski, PawelX <pawelx.wodkowski@intel.com>; Zhang, Roy Fan
>> <roy.fan.zhang@intel.com>; dev@dpdk.org
>> Cc: jianjay.zhou@huawei.com; Tan, Jianfeng <jianfeng.tan@intel.com>
>> Subject: Re: [PATCH] lib/librte_vhost: fix bugs
>>
>> Hi Pawel,
>>
>> On 04/10/2018 09:32 AM, Wodkowski, PawelX wrote:
>>>>    # all source are stored in SRCS-y
>>>>    SRCS-$(CONFIG_RTE_LIBRTE_VHOST) := fd_man.c iotlb.c socket.c vhost.c
>> \
>>>> diff --git a/lib/librte_vhost/vhost_crypto.c
>> b/lib/librte_vhost/vhost_crypto.c
>>>> index d84513e7f..2acfc908c 100644
>>>> --- a/lib/librte_vhost/vhost_crypto.c
>>>> +++ b/lib/librte_vhost/vhost_crypto.c
>>>> @@ -381,7 +381,7 @@ vhost_crypto_create_sess(struct vhost_crypto
>>>> *vcrypto,
>>>>    		return;
>>>>    	}
>>>>
>>>> -	VC_LOG_DBG("Session (key %lu, session %p) created.",
>>>> +	VC_LOG_DBG("Session (key %llu, session %p) created.",
>>>
>>> Why 'llu' instead of PRIu64 (here and there)?
>>
>> You are right, but Fan actually fixed it in updated version (the initial
>> patch has been split in 3):
>> [PATCH] vhost/crypto: fix session id printf
>>
> 
> Ohh, sorry. I need more coffee before starting review :)

No problem, that wans't obvious that these 3 patches superseded this
one.

Your reviews are welcome!
Maxime
> 
>> Cheers,
>> Maxime
>>> Pawel
>>>
> 
> Pawel
> 

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

* Re: [dpdk-dev] [PATCH] examples/vhost_crypto: fix parsing
  2018-04-09 17:57   ` [dpdk-dev] [PATCH] examples/vhost_crypto: fix parsing Fan Zhang
@ 2018-04-10  9:40     ` Maxime Coquelin
  0 siblings, 0 replies; 20+ messages in thread
From: Maxime Coquelin @ 2018-04-10  9:40 UTC (permalink / raw)
  To: Fan Zhang, dev; +Cc: ferruh.yigit



On 04/09/2018 07:57 PM, Fan Zhang wrote:
> Fixes: 2ce5bd8c442d ("examples/vhost_crypto: add vhost crypto sample application")
> 
> This patch fixes the parsing of cryptodev id in the cmdline.
> 
> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> ---
>   examples/vhost_crypto/main.c | 5 -----
>   1 file changed, 5 deletions(-)
> 
> diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c
> index bc867240d..860200e29 100644
> --- a/examples/vhost_crypto/main.c
> +++ b/examples/vhost_crypto/main.c
> @@ -95,11 +95,6 @@ parse_cryptodev_id(const char *q_arg)
>   
>   	/* parse decimal string */
>   	pm = strtoul(q_arg, &end, 10);
> -	if ((pm == '\0') || (end == NULL) || (*end != '\0')) {
> -		RTE_LOG(ERR, USER1, "Invalid Cryptodev ID %s\n", q_arg);
> -		return -1;
> -	}
> -
>   	if (pm > rte_cryptodev_count()) {
>   		RTE_LOG(ERR, USER1, "Invalid Cryptodev ID %s\n", q_arg);
>   		return -1;
> 

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

I'll squash it with faulty commit if not yet merged by Ferruh.

Thanks,
Maxime

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

* Re: [dpdk-dev] [PATCH] vhost/crypto: fix makefile
  2018-04-09 18:01   ` [dpdk-dev] [PATCH] vhost/crypto: fix makefile Fan Zhang
@ 2018-04-10  9:41     ` Maxime Coquelin
  0 siblings, 0 replies; 20+ messages in thread
From: Maxime Coquelin @ 2018-04-10  9:41 UTC (permalink / raw)
  To: Fan Zhang, dev; +Cc: ferruh.yigit



On 04/09/2018 08:01 PM, Fan Zhang wrote:
> Fixes: 7b5ad7beee17 ("vhost/crypto: update makefile")
> 
> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> ---
>   lib/librte_vhost/Makefile | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/librte_vhost/Makefile b/lib/librte_vhost/Makefile
> index 2cc65f95e..92c267475 100644
> --- a/lib/librte_vhost/Makefile
> +++ b/lib/librte_vhost/Makefile
> @@ -18,7 +18,8 @@ LDLIBS += -lpthread
>   ifeq ($(CONFIG_RTE_LIBRTE_VHOST_NUMA),y)
>   LDLIBS += -lnuma
>   endif
> -LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev -lrte_net
> +LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev -lrte_net \
> +					-lrte_cryptodev -lrte_hash
>   
>   # all source are stored in SRCS-y
>   SRCS-$(CONFIG_RTE_LIBRTE_VHOST) := fd_man.c iotlb.c socket.c vhost.c \
> 

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

I'll squash it with faulty commit if not yet merged by Ferruh.

Thanks,
Maxime

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

* Re: [dpdk-dev] [PATCH] vhost/crypto: fix session id printf
  2018-04-09 18:21   ` [dpdk-dev] [PATCH] vhost/crypto: fix session id printf Fan Zhang
@ 2018-04-10  9:41     ` Maxime Coquelin
  0 siblings, 0 replies; 20+ messages in thread
From: Maxime Coquelin @ 2018-04-10  9:41 UTC (permalink / raw)
  To: Fan Zhang, dev; +Cc: ferruh.yigit



On 04/09/2018 08:21 PM, Fan Zhang wrote:
> Fixes: 85a2d5cab96f ("vhost/crypto: add virtio-crypto user message structure")
> 
> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> ---
>   lib/librte_vhost/vhost_crypto.c | 14 +++++++-------
>   1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
> index d84513e7f..06c0d3398 100644
> --- a/lib/librte_vhost/vhost_crypto.c
> +++ b/lib/librte_vhost/vhost_crypto.c
> @@ -381,8 +381,8 @@ vhost_crypto_create_sess(struct vhost_crypto *vcrypto,
>   		return;
>   	}
>   
> -	VC_LOG_DBG("Session (key %lu, session %p) created.",
> -			vcrypto->last_session_id, session);
> +	VC_LOG_INFO("Session %"PRIu64" created for vdev %i.",
> +			vcrypto->last_session_id, vcrypto->dev->vid);
>   
>   	sess_param->session_id = vcrypto->last_session_id;
>   	vcrypto->last_session_id++;
> @@ -399,17 +399,17 @@ vhost_crypto_close_sess(struct vhost_crypto *vcrypto, uint64_t session_id)
>   			(void **)&session);
>   
>   	if (unlikely(ret < 0)) {
> -		VC_LOG_ERR("Failed to delete session (key %lu).", session_id);
> +		VC_LOG_ERR("Failed to delete session %"PRIu64".", session_id);
>   		return -VIRTIO_CRYPTO_INVSESS;
>   	}
>   
>   	if (rte_cryptodev_sym_session_clear(vcrypto->cid, session) < 0) {
> -		VC_LOG_DBG("Failed to delete session");
> +		VC_LOG_DBG("Failed to clear session");
>   		return -VIRTIO_CRYPTO_ERR;
>   	}
>   
>   	if (rte_cryptodev_sym_session_free(session) < 0) {
> -		VC_LOG_DBG("Failed to delete session");
> +		VC_LOG_DBG("Failed to free session");
>   		return -VIRTIO_CRYPTO_ERR;
>   	}
>   
> @@ -418,8 +418,8 @@ vhost_crypto_close_sess(struct vhost_crypto *vcrypto, uint64_t session_id)
>   		return -VIRTIO_CRYPTO_ERR;
>   	}
>   
> -	VC_LOG_DBG("Session (key %lu, session %p) deleted.", sess_id,
> -			session);
> +	VC_LOG_INFO("Session %"PRIu64" deleted for vdev %i.", sess_id,
> +			vcrypto->dev->vid);
>   
>   	return 0;
>   }
> 

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

I'll squash it with faulty commit if not yet merged by Ferruh.

Thanks,
Maxime

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

* Re: [dpdk-dev] [PATCH] lib/librte_vhost: remove packet dump
  2018-04-09 15:34 ` [dpdk-dev] [PATCH] lib/librte_vhost: remove packet dump Fan Zhang
@ 2018-04-11  8:47   ` Maxime Coquelin
  2018-04-11  8:59     ` Maxime Coquelin
  0 siblings, 1 reply; 20+ messages in thread
From: Maxime Coquelin @ 2018-04-11  8:47 UTC (permalink / raw)
  To: Fan Zhang, dev; +Cc: jianjay.zhou, jianfeng.tan, pawelx.wodkowski



On 04/09/2018 05:34 PM, Fan Zhang wrote:
> This patch removes unnecessary packet dump for debugging.
> 
> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> ---
>   lib/librte_vhost/vhost_crypto.c | 36 ------------------------------------
>   1 file changed, 36 deletions(-)
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime

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

* Re: [dpdk-dev] [PATCH] lib/librte_vhost: remove packet dump
  2018-04-11  8:47   ` Maxime Coquelin
@ 2018-04-11  8:59     ` Maxime Coquelin
  2018-04-11 14:36       ` Maxime Coquelin
  0 siblings, 1 reply; 20+ messages in thread
From: Maxime Coquelin @ 2018-04-11  8:59 UTC (permalink / raw)
  To: Fan Zhang, dev; +Cc: jianjay.zhou, jianfeng.tan, pawelx.wodkowski



On 04/11/2018 10:47 AM, Maxime Coquelin wrote:
> 
> 
> On 04/09/2018 05:34 PM, Fan Zhang wrote:
>> This patch removes unnecessary packet dump for debugging.
>>
>> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
>> ---
>>   lib/librte_vhost/vhost_crypto.c | 36 
>> ------------------------------------
>>   1 file changed, 36 deletions(-)
> Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> 
> Thanks,
> Maxime

Applied to dpdk-next-virtio/master

Thanks,
Maxime

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

* [dpdk-dev] [PATCH] vhost/crypto: fix incorrect formatting
  2018-04-09 16:38 ` [dpdk-dev] [PATCH v2] vhost/crypto: " Fan Zhang
                     ` (2 preceding siblings ...)
  2018-04-09 18:21   ` [dpdk-dev] [PATCH] vhost/crypto: fix session id printf Fan Zhang
@ 2018-04-11  9:22   ` Fan Zhang
  2018-04-11  9:56     ` Maxime Coquelin
  3 siblings, 1 reply; 20+ messages in thread
From: Fan Zhang @ 2018-04-11  9:22 UTC (permalink / raw)
  To: dev; +Cc: roy.fan.zhang, maxime.coquelin, ferruh.yigit

Fixes: cd39f8e4fd2a ("vhost/crypto: add request handler")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 lib/librte_vhost/vhost_crypto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
index 06c0d3398..ab75db0b1 100644
--- a/lib/librte_vhost/vhost_crypto.c
+++ b/lib/librte_vhost/vhost_crypto.c
@@ -932,7 +932,7 @@ vhost_crypto_process_one_req(struct vhost_crypto *vcrypto,
 					&session_id, (void **)&session);
 			if (unlikely(err < 0)) {
 				err = VIRTIO_CRYPTO_ERR;
-				VC_LOG_ERR("Failed to retrieve session id %lu",
+				VC_LOG_ERR("Failed to find session %"PRIu64,
 						session_id);
 				goto error_exit;
 			}
-- 
2.13.6

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

* Re: [dpdk-dev] [PATCH] vhost/crypto: fix incorrect formatting
  2018-04-11  9:22   ` [dpdk-dev] [PATCH] vhost/crypto: fix incorrect formatting Fan Zhang
@ 2018-04-11  9:56     ` Maxime Coquelin
  0 siblings, 0 replies; 20+ messages in thread
From: Maxime Coquelin @ 2018-04-11  9:56 UTC (permalink / raw)
  To: Fan Zhang, dev; +Cc: ferruh.yigit



On 04/11/2018 11:22 AM, Fan Zhang wrote:
> Fixes: cd39f8e4fd2a ("vhost/crypto: add request handler")
> 
> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> ---
>   lib/librte_vhost/vhost_crypto.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
> index 06c0d3398..ab75db0b1 100644
> --- a/lib/librte_vhost/vhost_crypto.c
> +++ b/lib/librte_vhost/vhost_crypto.c
> @@ -932,7 +932,7 @@ vhost_crypto_process_one_req(struct vhost_crypto *vcrypto,
>   					&session_id, (void **)&session);
>   			if (unlikely(err < 0)) {
>   				err = VIRTIO_CRYPTO_ERR;
> -				VC_LOG_ERR("Failed to retrieve session id %lu",
> +				VC_LOG_ERR("Failed to find session %"PRIu64,
>   						session_id);
>   				goto error_exit;
>   			}
> 

Squashed into offending commit.

Thanks!
Maxime

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

* Re: [dpdk-dev] [PATCH] lib/librte_vhost: remove packet dump
  2018-04-11  8:59     ` Maxime Coquelin
@ 2018-04-11 14:36       ` Maxime Coquelin
  0 siblings, 0 replies; 20+ messages in thread
From: Maxime Coquelin @ 2018-04-11 14:36 UTC (permalink / raw)
  To: Fan Zhang, dev; +Cc: jianjay.zhou, jianfeng.tan, pawelx.wodkowski



On 04/11/2018 10:59 AM, Maxime Coquelin wrote:
> 
> 
> On 04/11/2018 10:47 AM, Maxime Coquelin wrote:
>>
>>
>> On 04/09/2018 05:34 PM, Fan Zhang wrote:
>>> This patch removes unnecessary packet dump for debugging.
>>>
>>> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
>>> ---
>>>   lib/librte_vhost/vhost_crypto.c | 36 
>>> ------------------------------------
>>>   1 file changed, 36 deletions(-)
>> Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
>>
>> Thanks,
>> Maxime
> 
> Applied to dpdk-next-virtio/master

Not to break bisection, I squashed the fix in offending commit.

Thanks,
Maxime

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

end of thread, other threads:[~2018-04-11 14:36 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-09 15:34 [dpdk-dev] [PATCH] lib/librte_vhost: fix bugs Fan Zhang
2018-04-09 15:34 ` [dpdk-dev] [PATCH] lib/librte_vhost: remove packet dump Fan Zhang
2018-04-11  8:47   ` Maxime Coquelin
2018-04-11  8:59     ` Maxime Coquelin
2018-04-11 14:36       ` Maxime Coquelin
2018-04-09 15:45 ` [dpdk-dev] [PATCH] lib/librte_vhost: fix bugs Maxime Coquelin
2018-04-09 15:53 ` Maxime Coquelin
2018-04-09 16:38 ` [dpdk-dev] [PATCH v2] vhost/crypto: " Fan Zhang
2018-04-09 17:57   ` [dpdk-dev] [PATCH] examples/vhost_crypto: fix parsing Fan Zhang
2018-04-10  9:40     ` Maxime Coquelin
2018-04-09 18:01   ` [dpdk-dev] [PATCH] vhost/crypto: fix makefile Fan Zhang
2018-04-10  9:41     ` Maxime Coquelin
2018-04-09 18:21   ` [dpdk-dev] [PATCH] vhost/crypto: fix session id printf Fan Zhang
2018-04-10  9:41     ` Maxime Coquelin
2018-04-11  9:22   ` [dpdk-dev] [PATCH] vhost/crypto: fix incorrect formatting Fan Zhang
2018-04-11  9:56     ` Maxime Coquelin
2018-04-10  7:32 ` [dpdk-dev] [PATCH] lib/librte_vhost: fix bugs Wodkowski, PawelX
2018-04-10  7:43   ` Maxime Coquelin
2018-04-10  7:47     ` Wodkowski, PawelX
2018-04-10  7:55       ` Maxime Coquelin

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).