vdpa/mlx5: add logs
authorMatan Azrad <matan@mellanox.com>
Tue, 24 Mar 2020 14:24:37 +0000 (14:24 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Apr 2020 11:57:08 +0000 (13:57 +0200)
Add log prints to improve driver status following.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
drivers/vdpa/mlx5/mlx5_vdpa.c
drivers/vdpa/mlx5/mlx5_vdpa_steer.c

index b9279ac..f1bfe7a 100644 (file)
@@ -214,6 +214,7 @@ mlx5_vdpa_dev_close(int vid)
        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 @@ mlx5_vdpa_dev_config(int vid)
                return -1;
        }
        priv->configured = 1;
+       DRV_LOG(INFO, "vDPA device %d was configured.", vid);
        return 0;
 }
 
index 9f8af4c..9c11452 100644 (file)
@@ -123,6 +123,8 @@ mlx5_vdpa_virtq_enable(struct mlx5_vdpa_virtq *virtq, int enable)
        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;