Commit 74c8907
vdpa/mlx5: Small improvement for change_num_qps()
change_num_qps() has a lot of multiplications by 2 to convert
the number of VQ pairs to number of VQs. This patch simplifies
the code by doing the VQP -> VQ count conversion at the beginning
in a variable.
Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Message-Id: <20240816090159.1967650-10-dtatulea@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Eugenio Pérez <eperezma@redhat.com>
Tested-by: Lei Yang <leiyang@redhat.com>1 parent 55a7cb0 commit 74c8907
1 file changed
Lines changed: 11 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2219 | 2219 | | |
2220 | 2220 | | |
2221 | 2221 | | |
2222 | | - | |
| 2222 | + | |
| 2223 | + | |
2223 | 2224 | | |
2224 | 2225 | | |
2225 | 2226 | | |
2226 | | - | |
2227 | | - | |
| 2227 | + | |
| 2228 | + | |
2228 | 2229 | | |
2229 | 2230 | | |
2230 | 2231 | | |
2231 | | - | |
| 2232 | + | |
2232 | 2233 | | |
2233 | 2234 | | |
2234 | 2235 | | |
| |||
2237 | 2238 | | |
2238 | 2239 | | |
2239 | 2240 | | |
2240 | | - | |
| 2241 | + | |
2241 | 2242 | | |
2242 | | - | |
2243 | | - | |
| 2243 | + | |
| 2244 | + | |
2244 | 2245 | | |
2245 | 2246 | | |
2246 | 2247 | | |
2247 | 2248 | | |
2248 | 2249 | | |
2249 | 2250 | | |
2250 | | - | |
| 2251 | + | |
2251 | 2252 | | |
2252 | 2253 | | |
2253 | 2254 | | |
2254 | 2255 | | |
2255 | 2256 | | |
2256 | 2257 | | |
2257 | | - | |
| 2258 | + | |
2258 | 2259 | | |
2259 | 2260 | | |
2260 | | - | |
| 2261 | + | |
2261 | 2262 | | |
2262 | 2263 | | |
2263 | 2264 | | |
| |||
0 commit comments