raw/cnxk_bphy: add doxygen comments
[dpdk.git] / drivers / vdpa / mlx5 / mlx5_vdpa.h
index cc83d7c..e7f3319 100644 (file)
@@ -92,6 +92,7 @@ struct mlx5_vdpa_virtq {
        struct rte_intr_handle *intr_handle;
        uint64_t err_time[3]; /* RDTSC time of recent errors. */
        uint32_t n_retry;
+       struct mlx5_devx_virtio_q_couners_attr stats;
        struct mlx5_devx_virtio_q_couners_attr reset;
 };
 
@@ -121,6 +122,7 @@ enum mlx5_dev_state {
 
 struct mlx5_vdpa_priv {
        TAILQ_ENTRY(mlx5_vdpa_priv) next;
+       bool connected;
        enum mlx5_dev_state state;
        pthread_mutex_t vq_config_lock;
        uint64_t no_traffic_counter;
@@ -233,6 +235,15 @@ int mlx5_vdpa_event_qp_create(struct mlx5_vdpa_priv *priv, uint16_t desc_n,
  */
 void mlx5_vdpa_event_qp_destroy(struct mlx5_vdpa_event_qp *eqp);
 
+/**
+ * Create all the event global resources.
+ *
+ * @param[in] priv
+ *   The vdpa driver private structure.
+ */
+int
+mlx5_vdpa_event_qp_global_prepare(struct mlx5_vdpa_priv *priv);
+
 /**
  * Release all the event global resources.
  *
@@ -280,13 +291,21 @@ int mlx5_vdpa_err_event_setup(struct mlx5_vdpa_priv *priv);
 void mlx5_vdpa_err_event_unset(struct mlx5_vdpa_priv *priv);
 
 /**
- * Release a virtq and all its related resources.
+ * Release virtqs and resources except that to be reused.
  *
  * @param[in] priv
  *   The vdpa driver private structure.
  */
 void mlx5_vdpa_virtqs_release(struct mlx5_vdpa_priv *priv);
 
+/**
+ * Cleanup cached resources of all virtqs.
+ *
+ * @param[in] priv
+ *   The vdpa driver private structure.
+ */
+void mlx5_vdpa_virtqs_cleanup(struct mlx5_vdpa_priv *priv);
+
 /**
  * Create all the HW virtqs resources and all their related resources.
  *
@@ -314,7 +333,7 @@ int mlx5_vdpa_virtqs_prepare(struct mlx5_vdpa_priv *priv);
 int mlx5_vdpa_virtq_enable(struct mlx5_vdpa_priv *priv, int index, int enable);
 
 /**
- * Unset steering and release all its related resources- stop traffic.
+ * Unset steering - stop traffic.
  *
  * @param[in] priv
  *   The vdpa driver private structure.