Commit a43ae80
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: 5289373 ("vdpa/mlx5: Add multiqueue support")
Signed-off-by: Eli Cohen <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>1 parent 46f8a29 commit a43ae80
1 file changed
+10
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1320 | 1320 | | |
1321 | 1321 | | |
1322 | 1322 | | |
| 1323 | + | |
| 1324 | + | |
1323 | 1325 | | |
1324 | 1326 | | |
1325 | 1327 | | |
1326 | 1328 | | |
1327 | 1329 | | |
1328 | 1330 | | |
1329 | 1331 | | |
1330 | | - | |
| 1332 | + | |
1331 | 1333 | | |
1332 | 1334 | | |
1333 | 1335 | | |
| |||
1336 | 1338 | | |
1337 | 1339 | | |
1338 | 1340 | | |
1339 | | - | |
| 1341 | + | |
1340 | 1342 | | |
1341 | | - | |
| 1343 | + | |
1342 | 1344 | | |
1343 | 1345 | | |
1344 | | - | |
| 1346 | + | |
1345 | 1347 | | |
1346 | 1348 | | |
1347 | 1349 | | |
| |||
1354 | 1356 | | |
1355 | 1357 | | |
1356 | 1358 | | |
| 1359 | + | |
1357 | 1360 | | |
1358 | 1361 | | |
1359 | 1362 | | |
1360 | 1363 | | |
1361 | 1364 | | |
1362 | 1365 | | |
1363 | 1366 | | |
1364 | | - | |
| 1367 | + | |
1365 | 1368 | | |
1366 | 1369 | | |
1367 | 1370 | | |
| |||
1372 | 1375 | | |
1373 | 1376 | | |
1374 | 1377 | | |
1375 | | - | |
| 1378 | + | |
1376 | 1379 | | |
1377 | 1380 | | |
1378 | | - | |
| 1381 | + | |
1379 | 1382 | | |
1380 | 1383 | | |
1381 | 1384 | | |
| |||
0 commit comments