app/eventdev: fix pipeline test with meson build
[dpdk.git] / drivers / vdpa / mlx5 / mlx5_vdpa.h
index c591266..faeb54a 100644 (file)
@@ -98,6 +98,7 @@ struct mlx5_vdpa_steer {
 
 struct mlx5_vdpa_priv {
        TAILQ_ENTRY(mlx5_vdpa_priv) next;
+       uint8_t configured;
        int id; /* vDPA device id. */
        int vid; /* vhost device id. */
        struct ibv_context *ctx; /* Device context. */
@@ -250,4 +251,59 @@ int mlx5_vdpa_steer_unset(struct mlx5_vdpa_priv *priv);
  */
 int mlx5_vdpa_steer_setup(struct mlx5_vdpa_priv *priv);
 
+/**
+ * Enable\Disable live migration logging.
+ *
+ * @param[in] priv
+ *   The vdpa driver private structure.
+ * @param[in] enable
+ *   Set for enable, unset for disable.
+ *
+ * @return
+ *   0 on success, a negative value otherwise.
+ */
+int mlx5_vdpa_logging_enable(struct mlx5_vdpa_priv *priv, int enable);
+
+/**
+ * Set dirty bitmap logging to allow live migration.
+ *
+ * @param[in] priv
+ *   The vdpa driver private structure.
+ * @param[in] log_base
+ *   Vhost log base.
+ * @param[in] log_size
+ *   Vhost log size.
+ *
+ * @return
+ *   0 on success, a negative value otherwise.
+ */
+int mlx5_vdpa_dirty_bitmap_set(struct mlx5_vdpa_priv *priv, uint64_t log_base,
+                              uint64_t log_size);
+
+/**
+ * Log all virtqs information for live migration.
+ *
+ * @param[in] priv
+ *   The vdpa driver private structure.
+ * @param[in] enable
+ *   Set for enable, unset for disable.
+ *
+ * @return
+ *   0 on success, a negative value otherwise.
+ */
+int mlx5_vdpa_lm_log(struct mlx5_vdpa_priv *priv);
+
+/**
+ * Modify virtq state to be ready or suspend.
+ *
+ * @param[in] virtq
+ *   The vdpa driver private virtq structure.
+ * @param[in] state
+ *   Set for ready, otherwise suspend.
+ *
+ * @return
+ *   0 on success, a negative value otherwise.
+ */
+int mlx5_vdpa_virtq_modify(struct mlx5_vdpa_virtq *virtq, int state);
+
 #endif /* RTE_PMD_MLX5_VDPA_H_ */