Commit be27b89
net: stmmac: replace priv->speed with the portTransmitRate from the tc-cbs parameters
The current cbs parameter depends on speed after uplinking,
which is not needed and will report a configuration error
if the port is not initially connected. The UAPI exposed by
tc-cbs requires userspace to recalculate the send slope anyway,
because the formula depends on port_transmit_rate (see man tc-cbs),
which is not an invariant from tc's perspective. Therefore, we
use offload->sendslope and offload->idleslope to derive the
original port_transmit_rate from the CBS formula.
Fixes: 1f705bc ("net: stmmac: Add support for CBS QDISC")
Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Link: https://lore.kernel.org/r/20240608143524.2065736-1-xiaolei.wang@windriver.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 1b9f756 commit be27b89
1 file changed
Lines changed: 11 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| 346 | + | |
346 | 347 | | |
347 | | - | |
348 | 348 | | |
349 | 349 | | |
| 350 | + | |
350 | 351 | | |
351 | 352 | | |
352 | 353 | | |
| |||
355 | 356 | | |
356 | 357 | | |
357 | 358 | | |
| 359 | + | |
| 360 | + | |
358 | 361 | | |
359 | | - | |
| 362 | + | |
360 | 363 | | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | 364 | | |
365 | 365 | | |
366 | | - | |
367 | 366 | | |
368 | 367 | | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | 368 | | |
373 | 369 | | |
374 | | - | |
375 | 370 | | |
376 | 371 | | |
377 | 372 | | |
378 | | - | |
379 | 373 | | |
380 | 374 | | |
381 | | - | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
382 | 379 | | |
383 | 380 | | |
384 | 381 | | |
| |||
398 | 395 | | |
399 | 396 | | |
400 | 397 | | |
401 | | - | |
| 398 | + | |
402 | 399 | | |
403 | 400 | | |
404 | | - | |
| 401 | + | |
405 | 402 | | |
406 | 403 | | |
407 | 404 | | |
| |||
0 commit comments