diff options
| author | Michael Chan <michael.chan@broadcom.com> | 2026-02-07 15:51:17 -0800 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-02-10 20:17:36 -0800 |
| commit | 5a2f3aa2896f8162cf8349d525e97ce09cd712f5 (patch) | |
| tree | 2dc27c3edab0245b3a8cbecb760c833e4764acf5 /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git | |
| parent | e5e2e4300228a501b63cd4da13173371a40fea4b (diff) | |
bnxt_en: Refactor bnxt_need_reserve_rings()
bnxt_need_reserve_rings() checks 6 ring resources against the reserved
values to determine if a new reservation is needed. Factor out the code
to collect the total resources into a new helper function
bnxt_get_total_resources() to make the code cleaner and easier to read.
Instead of individual scalar variables, use the struct bnxt_hw_rings to
hold all the ring resources. Using the struct, hwr.cp replaces the nq
variable and the chip specific hwr.cp_p5 replaces cp on newer chips.
There is no change in behavior. This will make it easier to check the
RSS context resource in the next patch.
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Reviewed-by: Joe Damato <joe@dama.to>
Link: https://patch.msgid.link/20260207235118.1987301-2-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
