diff options
author | Zhu Lingshan <lingshan.zhu@intel.com> | 2024-02-02 19:39:00 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2024-03-19 09:45:50 +0300 |
commit | 1da13e647012a8034420915bf6fcb9db37d41fc3 (patch) | |
tree | f0ccd40f5565669db7bdedc501f5bdcdd988672c | |
parent | a97f9c8fcc6ed16f956346368fde3b1198163f6c (diff) | |
download | linux-1da13e647012a8034420915bf6fcb9db37d41fc3.tar.xz |
eni_vdpa: implement vdpa_config_ops.get_vq_size
This commit implements get_vq_size which report
per vq size in vdpa_config_ops
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
Message-Id: <20240202163905.8834-6-lingshan.zhu@intel.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-rw-r--r-- | drivers/vdpa/alibaba/eni_vdpa.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/vdpa/alibaba/eni_vdpa.c b/drivers/vdpa/alibaba/eni_vdpa.c index cce3d1837104..ad7f3447fe90 100644 --- a/drivers/vdpa/alibaba/eni_vdpa.c +++ b/drivers/vdpa/alibaba/eni_vdpa.c @@ -254,6 +254,13 @@ static u16 eni_vdpa_get_vq_num_min(struct vdpa_device *vdpa) return vp_legacy_get_queue_size(ldev, 0); } +static u16 eni_vdpa_get_vq_size(struct vdpa_device *vdpa, u16 qid) +{ + struct virtio_pci_legacy_device *ldev = vdpa_to_ldev(vdpa); + + return vp_legacy_get_queue_size(ldev, qid); +} + static int eni_vdpa_get_vq_state(struct vdpa_device *vdpa, u16 qid, struct vdpa_vq_state *state) { @@ -416,6 +423,7 @@ static const struct vdpa_config_ops eni_vdpa_ops = { .reset = eni_vdpa_reset, .get_vq_num_max = eni_vdpa_get_vq_num_max, .get_vq_num_min = eni_vdpa_get_vq_num_min, + .get_vq_size = eni_vdpa_get_vq_size, .get_vq_state = eni_vdpa_get_vq_state, .set_vq_state = eni_vdpa_set_vq_state, .set_vq_cb = eni_vdpa_set_vq_cb, |