[4/4] vdpa/mlx5: add log prints
diff mbox series

Message ID 1585059877-2369-5-git-send-email-asafp@mellanox.com
State New
Delegated to: Maxime Coquelin
Headers show
Series
  • vdpa/mlx5: support direct notification
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/travis-robot success Travis build: passed
ci/checkpatch success coding style OK

Commit Message

Asaf Penso March 24, 2020, 2:24 p.m. UTC
From: Matan Azrad <matan@mellanox.com>

Add log prints to improve driver status following.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa.c       | 2 ++
 drivers/vdpa/mlx5/mlx5_vdpa_steer.c | 2 ++
 2 files changed, 4 insertions(+)

Patch
diff mbox series

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c
index 4eb6abf..f10647b 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa.c
@@ -214,6 +214,7 @@ 
 	mlx5_vdpa_mem_dereg(priv);
 	priv->configured = 0;
 	priv->vid = 0;
+	DRV_LOG(INFO, "vDPA device %d was closed.", vid);
 	return ret;
 }
 
@@ -239,6 +240,7 @@ 
 		return -1;
 	}
 	priv->configured = 1;
+	DRV_LOG(INFO, "vDPA device %d was configured.", vid);
 	return 0;
 }
 
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_steer.c b/drivers/vdpa/mlx5/mlx5_vdpa_steer.c
index 36017f1..8e1cf0a 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_steer.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_steer.c
@@ -123,6 +123,8 @@ 
 	struct mlx5_vdpa_priv *priv = virtq->priv;
 	int ret = 0;
 
+	DRV_LOG(INFO, "Update virtq %d status %sable -> %sable.", virtq->index,
+		virtq->enable ? "en" : "dis", enable ? "en" : "dis");
 	if (virtq->enable == !!enable)
 		return 0;
 	virtq->enable = !!enable;