diff options
| author | Evgenii Burenchev <evg28bur@yandex.ru> | 2026-05-07 17:55:17 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-05-12 04:11:06 +0300 |
| commit | be48e5fe51a5864566307998286a699d6b986934 (patch) | |
| tree | a824723c4d3b775eb4ba3188db6b298220cd51fe /scripts/stackdelta | |
| parent | f8e64e956a635b054227f56e9586a1997add0646 (diff) | |
| download | linux-be48e5fe51a5864566307998286a699d6b986934.tar.xz | |
qed: fix division by zero in qed_init_wfq_param when all vports are configured
In qed_init_wfq_param(), variable non_requested_count can become zero
when the number of vports with the configured flag set (including the
current vport being configured) equals total num_vports. This happens
when configuring the last unconfigured vport or when re-configuring
an already configured vport.
The function then calculates left_rate_per_vp = total_left_rate /
non_requested_count, which causes division by zero.
Fix this by skipping the division when non_requested_count is zero.
In that case, there is no remaining bandwidth to distribute, so just
record the configuration for the current vport and return success.
Fixes: bcd197c81f63 ("qed: Add vport WFQ configuration APIs")
Signed-off-by: Evgenii Burenchev <evg28bur@yandex.ru>
Link: https://patch.msgid.link/20260507145520.23106-1-evg28bur@yandex.ru
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/stackdelta')
0 files changed, 0 insertions, 0 deletions
