summaryrefslogtreecommitdiff
path: root/drivers/vdpa/mlx5/core/mlx5_vdpa.h
diff options
context:
space:
mode:
authorEli Cohen <elic@nvidia.com>2022-07-14 14:39:27 +0300
committerMichael S. Tsirkin <mst@redhat.com>2022-08-11 11:26:08 +0300
commit8fcd20c307042b0bb4fd3aee7fc23c94080306ad (patch)
tree920b8cec2ac47321c6680e55bf5be2c1ce575e9d /drivers/vdpa/mlx5/core/mlx5_vdpa.h
parentcae15c2ed8e6e058bd5e32de292ab7982640161e (diff)
downloadlinux-8fcd20c307042b0bb4fd3aee7fc23c94080306ad.tar.xz
vdpa/mlx5: Support different address spaces for control and data
Partition virtqueues to two different address spaces: one for control virtqueue which is implemented in software, and one for data virtqueues. Based-on: <20220526124338.36247-1-eperezma@redhat.com> Signed-off-by: Eli Cohen <elic@nvidia.com> Message-Id: <20220714113927.85729-3-elic@nvidia.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vdpa/mlx5/core/mlx5_vdpa.h')
-rw-r--r--drivers/vdpa/mlx5/core/mlx5_vdpa.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/vdpa/mlx5/core/mlx5_vdpa.h b/drivers/vdpa/mlx5/core/mlx5_vdpa.h
index 44104093163b..6af9fdbb86b7 100644
--- a/drivers/vdpa/mlx5/core/mlx5_vdpa.h
+++ b/drivers/vdpa/mlx5/core/mlx5_vdpa.h
@@ -70,6 +70,16 @@ struct mlx5_vdpa_wq_ent {
struct mlx5_vdpa_dev *mvdev;
};
+enum {
+ MLX5_VDPA_DATAVQ_GROUP,
+ MLX5_VDPA_CVQ_GROUP,
+ MLX5_VDPA_NUMVQ_GROUPS
+};
+
+enum {
+ MLX5_VDPA_NUM_AS = MLX5_VDPA_NUMVQ_GROUPS
+};
+
struct mlx5_vdpa_dev {
struct vdpa_device vdev;
struct mlx5_core_dev *mdev;
@@ -85,6 +95,7 @@ struct mlx5_vdpa_dev {
struct mlx5_vdpa_mr mr;
struct mlx5_control_vq cvq;
struct workqueue_struct *wq;
+ unsigned int group2asid[MLX5_VDPA_NUMVQ_GROUPS];
};
int mlx5_vdpa_alloc_pd(struct mlx5_vdpa_dev *dev, u32 *pdn, u16 uid);