diff options
author | Eli Cohen <[email protected]> | 2022-09-12 15:50:19 +0300 |
---|---|---|
committer | Michael S. Tsirkin <[email protected]> | 2022-09-27 18:32:45 -0400 |
commit | a43ae8057cc154fd26a3a23c0e8643bef104d995 (patch) | |
tree | 322fb3cf0275d89bdb24516dc537bf806acbe090 /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | 46f8a29272e51b6df7393d58fc5cb8967397ef2b (diff) |
vdpa/mlx5: Fix MQ to support non power of two num queues
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: 52893733f2c5 ("vdpa/mlx5: Add multiqueue support")
Signed-off-by: Eli Cohen <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions