examples/vhost_crypto: fix bracket

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

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 Dec. 11, 2018, 3:09 p.m. UTC
  This patch fixes a missed bracket bug in the code.

Fixes: e1d90eaa83ff ("examples/vhost_crypto: fix zero copy")
Cc: stable@dpdk.org

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

Comments

Maxime Coquelin Dec. 11, 2018, 6:14 p.m. UTC | #1
On 12/11/18 4:09 PM, Fan Zhang wrote:
> This patch fixes a missed bracket bug in the code.
> 
> Fixes: e1d90eaa83ff ("examples/vhost_crypto: fix zero copy")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> ---
>   examples/vhost_crypto/main.c | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c
> index f08babd97..3deb5263f 100644
> --- a/examples/vhost_crypto/main.c
> +++ b/examples/vhost_crypto/main.c
> @@ -503,11 +503,12 @@ main(int argc, char *argv[])
>   			if (strstr(dev_info.driver_name,
>   				RTE_STR(VHOST_CRYPTO_CDEV_NAME_AESNI_MB_PMD)) ||
>   				strstr(dev_info.driver_name,
> -				RTE_STR(VHOST_CRYPTO_CDEV_NAME_AESNI_GCM_PMD)))
> -			RTE_LOG(ERR, USER1, "Cannot enable zero-copy in %s\n",
> +				RTE_STR(VHOST_CRYPTO_CDEV_NAME_AESNI_GCM_PMD))) {
> +				RTE_LOG(ERR, USER1, "Cannot enable zero-copy in %s\n",
>   					dev_info.driver_name);
> -			ret = -EPERM;
> -			goto error_exit;
> +				ret = -EPERM;
> +				goto error_exit;
> +			}
>   		}
>   
>   		if (dev_info.max_nb_queue_pairs < info->qid + 1) {
> 


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

Thanks,
Maxime
  
Maxime Coquelin Dec. 11, 2018, 6:34 p.m. UTC | #2
On 12/11/18 4:09 PM, Fan Zhang wrote:
> This patch fixes a missed bracket bug in the code.
> 
> Fixes: e1d90eaa83ff ("examples/vhost_crypto: fix zero copy")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> ---
>   examples/vhost_crypto/main.c | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
> 
>
Applied to dpdk-next-virtio.

Thanks,
Maxime
  

Patch

diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c
index f08babd97..3deb5263f 100644
--- a/examples/vhost_crypto/main.c
+++ b/examples/vhost_crypto/main.c
@@ -503,11 +503,12 @@  main(int argc, char *argv[])
 			if (strstr(dev_info.driver_name,
 				RTE_STR(VHOST_CRYPTO_CDEV_NAME_AESNI_MB_PMD)) ||
 				strstr(dev_info.driver_name,
-				RTE_STR(VHOST_CRYPTO_CDEV_NAME_AESNI_GCM_PMD)))
-			RTE_LOG(ERR, USER1, "Cannot enable zero-copy in %s\n",
+				RTE_STR(VHOST_CRYPTO_CDEV_NAME_AESNI_GCM_PMD))) {
+				RTE_LOG(ERR, USER1, "Cannot enable zero-copy in %s\n",
 					dev_info.driver_name);
-			ret = -EPERM;
-			goto error_exit;
+				ret = -EPERM;
+				goto error_exit;
+			}
 		}
 
 		if (dev_info.max_nb_queue_pairs < info->qid + 1) {