[v2,9/9] vhost: use proper logging type for data path

Message ID 20220125112457.166434-10-maxime.coquelin@redhat.com (mailing list archive)
State Superseded, archived
Delegated to: Maxime Coquelin
Headers
Series vhost: improve logging |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-abi-testing warning Testing issues

Commit Message

Maxime Coquelin Jan. 25, 2022, 11:24 a.m. UTC
  This patch changes type from config to data for functions
called in the datapath.

Suggested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/vhost/vhost.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Chenbo Xia Jan. 26, 2022, 3:27 a.m. UTC | #1
> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> Sent: Tuesday, January 25, 2022 7:25 PM
> To: dev@dpdk.org; Xia, Chenbo <chenbo.xia@intel.com>;
> david.marchand@redhat.com
> Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
> Subject: [PATCH v2 9/9] vhost: use proper logging type for data path
> 
> This patch changes type from config to data for functions
> called in the datapath.
> 
> Suggested-by: David Marchand <david.marchand@redhat.com>
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
>  lib/vhost/vhost.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c
> index cd62dc238b..f59ca6c157 100644
> --- a/lib/vhost/vhost.c
> +++ b/lib/vhost/vhost.c
> @@ -58,7 +58,7 @@ __vhost_iova_to_vva(struct virtio_net *dev, struct
> vhost_virtqueue *vq,
> 
>  		vhost_user_iotlb_pending_insert(dev, vq, iova, perm);
>  		if (vhost_user_iotlb_miss(dev, iova, perm)) {
> -			VHOST_LOG_CONFIG(ERR, "(%s) IOTLB miss req failed for IOVA
> 0x%" PRIx64 "\n",
> +			VHOST_LOG_DATA(ERR, "(%s) IOTLB miss req failed for IOVA
> 0x%" PRIx64 "\n",
>  				dev->ifname, iova);
>  			vhost_user_iotlb_pending_remove(vq, iova, 1, perm);
>  		}
> @@ -420,7 +420,7 @@ translate_log_addr(struct virtio_net *dev, struct
> vhost_virtqueue *vq,
> 
>  		gpa = hva_to_gpa(dev, hva, exp_size);
>  		if (!gpa) {
> -			VHOST_LOG_CONFIG(ERR,
> +			VHOST_LOG_DATA(ERR,
>  				"(%s) failed to find GPA for log_addr: 0x%"
>  				PRIx64 " hva: 0x%" PRIx64 "\n",
>  				dev->ifname, log_addr, hva);
> --
> 2.34.1

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

Patch

diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c
index cd62dc238b..f59ca6c157 100644
--- a/lib/vhost/vhost.c
+++ b/lib/vhost/vhost.c
@@ -58,7 +58,7 @@  __vhost_iova_to_vva(struct virtio_net *dev, struct vhost_virtqueue *vq,
 
 		vhost_user_iotlb_pending_insert(dev, vq, iova, perm);
 		if (vhost_user_iotlb_miss(dev, iova, perm)) {
-			VHOST_LOG_CONFIG(ERR, "(%s) IOTLB miss req failed for IOVA 0x%" PRIx64 "\n",
+			VHOST_LOG_DATA(ERR, "(%s) IOTLB miss req failed for IOVA 0x%" PRIx64 "\n",
 				dev->ifname, iova);
 			vhost_user_iotlb_pending_remove(vq, iova, 1, perm);
 		}
@@ -420,7 +420,7 @@  translate_log_addr(struct virtio_net *dev, struct vhost_virtqueue *vq,
 
 		gpa = hva_to_gpa(dev, hva, exp_size);
 		if (!gpa) {
-			VHOST_LOG_CONFIG(ERR,
+			VHOST_LOG_DATA(ERR,
 				"(%s) failed to find GPA for log_addr: 0x%"
 				PRIx64 " hva: 0x%" PRIx64 "\n",
 				dev->ifname, log_addr, hva);