Commit 2c5745a
xingonzhang
Pass explicit comp_mask=NUM_LAG_PORTS to query_mlx5_device
pyverbs's default comp_mask=-1 ORs only the mask bits it knows about,
and at least some versions do not include MLX5DV_CONTEXT_MASK_NUM_LAG_PORTS
in that list. The result is that num_lag_ports stays at 0 and we fall back
to the legacy single-rail behaviour even on real LAG fabrics.
Passing the bit explicitly (1 << 9, taken from rdma-core's mlx5dv.h)
restores the intended behaviour.
Verified on H800 + CX-7 2-rail LAG:
comp_mask=-1 (default) -> num_lag_ports = 0
comp_mask=1<<9 (this patch) -> num_lag_ports = 2
get_rdma_gbs('mlx5_bond_1') = 50.0 GB/s (was 25.0)1 parent c3cb61d commit 2c5745a
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
245 | 252 | | |
246 | 253 | | |
247 | 254 | | |
| |||
263 | 270 | | |
264 | 271 | | |
265 | 272 | | |
266 | | - | |
| 273 | + | |
| 274 | + | |
267 | 275 | | |
268 | 276 | | |
269 | 277 | | |
| |||
0 commit comments