diff options
author | Zhu Lingshan <lingshan.zhu@intel.com> | 2024-02-03 00:38:58 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2024-03-19 02:45:50 -0400 |
commit | 36503e5e06a986ae9dbf042589d0ef6e4cbfe15a (patch) | |
tree | 9c3cdd85cd06d050665f4429d0fd8ccaf4d7cb02 /drivers/vdpa/ifcvf/ifcvf_main.c | |
parent | vDPA: introduce get_vq_size to vdpa_config_ops (diff) | |
download | wireguard-linux-36503e5e06a986ae9dbf042589d0ef6e4cbfe15a.tar.xz wireguard-linux-36503e5e06a986ae9dbf042589d0ef6e4cbfe15a.zip |
vDPA/ifcvf: implement vdpa_config_ops.get_vq_size
This commit implements vdpa_ops.get_vq_size to report
the size of a specific virtqueue.
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
Message-Id: <20240202163905.8834-4-lingshan.zhu@intel.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/vdpa/ifcvf/ifcvf_main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c index e98fa8100f3c..cd4e9cb020c4 100644 --- a/drivers/vdpa/ifcvf/ifcvf_main.c +++ b/drivers/vdpa/ifcvf/ifcvf_main.c @@ -597,6 +597,14 @@ static int ifcvf_vdpa_get_vq_irq(struct vdpa_device *vdpa_dev, return -EINVAL; } +static u16 ifcvf_vdpa_get_vq_size(struct vdpa_device *vdpa_dev, + u16 qid) +{ + struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); + + return ifcvf_get_vq_size(vf, qid); +} + static struct vdpa_notification_area ifcvf_get_vq_notification(struct vdpa_device *vdpa_dev, u16 idx) { @@ -632,6 +640,7 @@ static const struct vdpa_config_ops ifc_vdpa_ops = { .set_vq_num = ifcvf_vdpa_set_vq_num, .set_vq_address = ifcvf_vdpa_set_vq_address, .get_vq_irq = ifcvf_vdpa_get_vq_irq, + .get_vq_size = ifcvf_vdpa_get_vq_size, .kick_vq = ifcvf_vdpa_kick_vq, .get_generation = ifcvf_vdpa_get_generation, .get_device_id = ifcvf_vdpa_get_device_id, |