[v2,2/9] vhost: improve vDPA registration failure log

Message ID 20220125112457.166434-3-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

Commit Message

Maxime Coquelin Jan. 25, 2022, 11:24 a.m. UTC
  This patchs adds name of the device failing vDPA registration.

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

Comments

Chenbo Xia Jan. 26, 2022, 3:26 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 2/9] vhost: improve vDPA registration failure log
> 
> This patchs adds name of the device failing vDPA registration.

patchs -> patch

With above fixed:

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

> 
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
>  lib/vhost/vdpa.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/vhost/vdpa.c b/lib/vhost/vdpa.c
> index 09ad5d866e..6df2230a67 100644
> --- a/lib/vhost/vdpa.c
> +++ b/lib/vhost/vdpa.c
> @@ -82,8 +82,8 @@ rte_vdpa_register_device(struct rte_device *rte_dev,
>  			!ops->get_protocol_features || !ops->dev_conf ||
>  			!ops->dev_close || !ops->set_vring_state ||
>  			!ops->set_features) {
> -		VHOST_LOG_CONFIG(ERR,
> -				"Some mandatory vDPA ops aren't implemented\n");
> +		VHOST_LOG_CONFIG(ERR, "(%s) Some mandatory vDPA ops aren't
> implemented\n",
> +				rte_dev->name);
>  		return NULL;
>  	}
> 
> --
> 2.34.1
  

Patch

diff --git a/lib/vhost/vdpa.c b/lib/vhost/vdpa.c
index 09ad5d866e..6df2230a67 100644
--- a/lib/vhost/vdpa.c
+++ b/lib/vhost/vdpa.c
@@ -82,8 +82,8 @@  rte_vdpa_register_device(struct rte_device *rte_dev,
 			!ops->get_protocol_features || !ops->dev_conf ||
 			!ops->dev_close || !ops->set_vring_state ||
 			!ops->set_features) {
-		VHOST_LOG_CONFIG(ERR,
-				"Some mandatory vDPA ops aren't implemented\n");
+		VHOST_LOG_CONFIG(ERR, "(%s) Some mandatory vDPA ops aren't implemented\n",
+				rte_dev->name);
 		return NULL;
 	}