aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/vdpa/ifcvf/ifcvf_base.c
diff options
context:
space:
mode:
authorZhu Lingshan <lingshan.zhu@intel.com>2024-02-03 00:39:04 +0800
committerMichael S. Tsirkin <mst@redhat.com>2024-03-19 02:45:50 -0400
commitcd2147067409f0945ad7668cf74c347d3b426057 (patch)
tree54d7d262eb9cbfca91a38c6015429bd3cc1f8460 /drivers/vdpa/ifcvf/ifcvf_base.c
parentvirtio_vdpa: create vqs with the actual size (diff)
downloadwireguard-linux-cd2147067409f0945ad7668cf74c347d3b426057.tar.xz
wireguard-linux-cd2147067409f0945ad7668cf74c347d3b426057.zip
vDPA/ifcvf: get_max_vq_size to return max size
Since we already implemented vdpa_config_ops.get_vq_size, so get_max_vq_size can return the acutal max size of the virtqueues other than the max allowed safe size. Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com> Message-Id: <20240202163905.8834-10-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to '')
-rw-r--r--drivers/vdpa/ifcvf/ifcvf_base.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/vdpa/ifcvf/ifcvf_base.c b/drivers/vdpa/ifcvf/ifcvf_base.c
index d78621fdd621..472daa588a9d 100644
--- a/drivers/vdpa/ifcvf/ifcvf_base.c
+++ b/drivers/vdpa/ifcvf/ifcvf_base.c
@@ -82,10 +82,6 @@ u16 ifcvf_get_vq_size(struct ifcvf_hw *hw, u16 qid)
return queue_size;
}
-/* This function returns the max allowed safe size for
- * all virtqueues. It is the minimal size that can be
- * suppprted by all virtqueues.
- */
u16 ifcvf_get_max_vq_size(struct ifcvf_hw *hw)
{
u16 queue_size, max_size, qid;
@@ -97,7 +93,7 @@ u16 ifcvf_get_max_vq_size(struct ifcvf_hw *hw)
if (!queue_size)
continue;
- max_size = min(queue_size, max_size);
+ max_size = max(queue_size, max_size);
}
return max_size;