[2/4] examples/vhost_crypto: use vhost async-copy flag

Message ID 20200915133558.210639-3-maxime.coquelin@redhat.com (mailing list archive)
State Superseded, archived
Delegated to: Maxime Coquelin
Headers
Series pick |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Maxime Coquelin Sept. 15, 2020, 1:35 p.m. UTC
  The crypto backend uses RTE_VHOST_USER_DEQUEUE_ZERO_COPY only
for the shared areas to be populated at mmap time. It does
not use the other mechanisms the feature provides.

Now that RTE_VHOST_USER_DEQUEUE_ZERO_COPY is being removed,
let's use RTE_VHOST_USER_ASYNC_COPY instead which does the
same thing.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 examples/vhost_crypto/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Chenbo Xia Sept. 23, 2020, 5:43 a.m. UTC | #1
> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> Sent: Tuesday, September 15, 2020 9:36 PM
> To: dev@dpdk.org; Xia, Chenbo <chenbo.xia@intel.com>; Stokes, Ian
> <ian.stokes@intel.com>
> Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
> Subject: [PATCH 2/4] examples/vhost_crypto: use vhost async-copy flag
> 
> The crypto backend uses RTE_VHOST_USER_DEQUEUE_ZERO_COPY only
> for the shared areas to be populated at mmap time. It does
> not use the other mechanisms the feature provides.
> 
> Now that RTE_VHOST_USER_DEQUEUE_ZERO_COPY is being removed,
> let's use RTE_VHOST_USER_ASYNC_COPY instead which does the
> same thing.
> 
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
>  examples/vhost_crypto/main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c
> index 1d7ba94196..4bdd12f695 100644
> --- a/examples/vhost_crypto/main.c
> +++ b/examples/vhost_crypto/main.c
> @@ -588,7 +588,7 @@ main(int argc, char *argv[])
> 
>  		for (j = 0; j < lo->nb_sockets; j++) {
>  			ret = rte_vhost_driver_register(lo->socket_files[j],
> -				RTE_VHOST_USER_DEQUEUE_ZERO_COPY);
> +				RTE_VHOST_USER_ASYNC_COPY);
>  			if (ret < 0) {
>  				RTE_LOG(ERR, USER1, "socket %s already exists\n",
>  					lo->socket_files[j]);
> --
> 2.26.2

Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
  

Patch

diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c
index 1d7ba94196..4bdd12f695 100644
--- a/examples/vhost_crypto/main.c
+++ b/examples/vhost_crypto/main.c
@@ -588,7 +588,7 @@  main(int argc, char *argv[])
 
 		for (j = 0; j < lo->nb_sockets; j++) {
 			ret = rte_vhost_driver_register(lo->socket_files[j],
-				RTE_VHOST_USER_DEQUEUE_ZERO_COPY);
+				RTE_VHOST_USER_ASYNC_COPY);
 			if (ret < 0) {
 				RTE_LOG(ERR, USER1, "socket %s already exists\n",
 					lo->socket_files[j]);