linux-stable/drivers/vdpa
Eli Cohen 3e8d61faea vdpa/mlx5: Fix MQ to support non power of two num queues
[ Upstream commit a43ae8057c ]

RQT objects require that a power of two value be configured for both
rqt_max_size and rqt_actual size.

For create_rqt, make sure to round up to the power of two the value of
given by the user who created the vdpa device and given by
ndev->rqt_size. The actual size is also rounded up to the power of two
using the current number of VQs given by ndev->cur_num_vqs.

Same goes with modify_rqt where we need to make sure act size is power
of two based on the new number of QPs.

Without this patch, attempt to create a device with non power of two QPs
would result in error from firmware.

Fixes: 52893733f2 ("vdpa/mlx5: Add multiqueue support")
Signed-off-by: Eli Cohen <elic@nvidia.com>
Message-Id: <20220912125019.833708-1-elic@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-10-05 10:40:53 +02:00
..
alibaba vdpa: multiple address spaces support 2022-05-31 12:44:27 -04:00
ifcvf vdpa/ifcvf: fix the calculation of queuepair 2022-10-05 10:40:53 +02:00
mlx5 vdpa/mlx5: Fix MQ to support non power of two num queues 2022-10-05 10:40:53 +02:00
vdpa_sim vdpa_sim_blk: set number of address spaces and virtqueue groups 2022-08-25 11:45:24 +02:00
vdpa_user vduse: prevent uninitialized memory accesses 2022-10-05 10:40:45 +02:00
virtio_pci vdpa/vp_vdpa : add vdpa tool support in vp_vdpa 2022-05-31 12:45:09 -04:00
Kconfig eni_vdpa: add vDPA driver for Alibaba ENI 2021-11-01 05:23:41 -04:00
Makefile eni_vdpa: add vDPA driver for Alibaba ENI 2021-11-01 05:23:41 -04:00
vdpa.c Driver core changes for 5.19-rc1 2022-06-03 11:48:47 -07:00