X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fvdpa%2Fmlx5%2Fmlx5_vdpa.h;h=faeb54af5b0a96e6c9c5e4f13ed9a83ef0a51829;hb=0d4ba7496512b57e7e0c66d4041d1b339f132629;hp=c59126636a7977d709d4b337ff9ee9a8fff70a3c;hpb=62c813706e41f8f6ca5672fcea0f6f0be6d905a4;p=dpdk.git diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.h b/drivers/vdpa/mlx5/mlx5_vdpa.h index c59126636a..faeb54af5b 100644 --- a/drivers/vdpa/mlx5/mlx5_vdpa.h +++ b/drivers/vdpa/mlx5/mlx5_vdpa.h @@ -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_ */