]> git.baikalelectronics.ru Git - kernel.git/commit
octeontx2-pf: Fix pfc_alloc_status array overflow
authorSuman Ghosh <sumang@marvell.com>
Wed, 23 Nov 2022 10:59:38 +0000 (16:29 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 Nov 2022 09:34:34 +0000 (09:34 +0000)
commitd3f4618ce1aef375072d8a857b9c53fab860b084
treee5f143606a49fa06929b2a83b5e683f235a48475
parentfc669e406a7c57cf023d521c2e450fc451495b7d
octeontx2-pf: Fix pfc_alloc_status array overflow

This patch addresses pfc_alloc_status array overflow occurring for
send queue index value greater than PFC priority. Queue index can be
greater than supported PFC priority for multiple scenarios (e.g. QoS,
during non zero SMQ allocation for a PF/VF).
In those scenarios the API should return default tx scheduler '0'.
This is causing mbox errors as otx2_get_smq_idx returing invalid smq value.

Fixes: d9de52ba06d3 ("octeontx2-pf: Add egress PFC support")
Signed-off-by: Suman Ghosh <sumang@marvell.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h