Commit b03fc43
vdpa/mlx5: Fix tracking of current number of VQs
Modify the code such that ndev->cur_num_vqs better reflects the actual
number of data virtqueues. The value can be accurately realized after
features have been negotiated.
This is to prevent possible failures when modifying the RQT object if
the cur_num_vqs bears invalid value.
No issue was actually encountered but this also makes the code more
readable.
Fixes: c5a5cd3 ("vdpa/mlx5: Support configuring max data virtqueue")
Signed-off-by: Eli Cohen <elic@nvidia.com>
Link: https://lore.kernel.org/r/20220111183400.38418-5-elic@nvidia.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Si-Wei Liu<si-wei.liu@oracle.com>
Acked-by: Jason Wang <jasowang@redhat.com>1 parent f8ae3a4 commit b03fc43
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1246 | 1246 | | |
1247 | 1247 | | |
1248 | 1248 | | |
1249 | | - | |
1250 | | - | |
| 1249 | + | |
1251 | 1250 | | |
1252 | 1251 | | |
1253 | 1252 | | |
| |||
1983 | 1982 | | |
1984 | 1983 | | |
1985 | 1984 | | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
1986 | 1990 | | |
1987 | 1991 | | |
1988 | 1992 | | |
| |||
2233 | 2237 | | |
2234 | 2238 | | |
2235 | 2239 | | |
| 2240 | + | |
2236 | 2241 | | |
2237 | 2242 | | |
2238 | 2243 | | |
| |||
2641 | 2646 | | |
2642 | 2647 | | |
2643 | 2648 | | |
2644 | | - | |
2645 | 2649 | | |
2646 | | - | |
| 2650 | + | |
2647 | 2651 | | |
2648 | 2652 | | |
2649 | 2653 | | |
| |||
0 commit comments