Commit e76ebc2
net/ice: fix shaper profile reference count tracking
Currently, when a TM node is added with a shaper profile assigned,
the profile's reference count is not incremented. Equally, when a node
is deleted, the count is not decremented. As a result, the guard that
blocks deletion of an in-use profile never triggers, allowing the profile
to be freed while nodes still hold a pointer to it.
Fix by maintaining the reference count correctly when nodes take or
release a shaper profile, so that deletion of an in-use profile is
properly rejected.
Fixes: 8c481c3 ("net/ice: support queue and queue group bandwidth limit")
Cc: stable@dpdk.org
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>1 parent ef9dc56 commit e76ebc2
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
456 | 456 | | |
457 | 457 | | |
458 | 458 | | |
| 459 | + | |
| 460 | + | |
459 | 461 | | |
460 | 462 | | |
461 | 463 | | |
| |||
518 | 520 | | |
519 | 521 | | |
520 | 522 | | |
| 523 | + | |
| 524 | + | |
521 | 525 | | |
522 | 526 | | |
523 | 527 | | |
| |||
568 | 572 | | |
569 | 573 | | |
570 | 574 | | |
| 575 | + | |
| 576 | + | |
571 | 577 | | |
572 | 578 | | |
573 | 579 | | |
| |||
582 | 588 | | |
583 | 589 | | |
584 | 590 | | |
| 591 | + | |
| 592 | + | |
585 | 593 | | |
586 | 594 | | |
587 | 595 | | |
| |||
0 commit comments