mirror of
https://github.com/torvalds/linux.git
synced 2026-05-13 00:28:54 +02:00
When cn20k default L2 rules are not installed,
npc_cn20k_dft_rules_idx_get() leaves broadcast, multicast, promiscuous, and
unicast slots at USHRT_MAX. npc_get_nixlf_mcam_index() previously returned
that sentinel as a valid MCAM index, so callers could program hardware with
an invalid index.
Return -EINVAL from the cn20k branches of npc_get_nixlf_mcam_index() when
the requested slot is still USHRT_MAX. Harden cn20k NPC MCAM entry helpers
to reject out-of-range indices before touching hardware.
Drop the early bounds check in npc_enable_mcam_entry() for cn20k so invalid
indices are validated inside npc_cn20k_enable_mcam_entry() instead of being
silently ignored.
In rvu_npc_update_flowkey_alg_idx(), treat negative MCAM indices like
out-of-range values, and only update RSS actions for promiscuous and
all-multi paths when the resolved index is non-negative.
Cc: Suman Ghosh <sumang@marvell.com>
Fixes:
|
||
|---|---|---|
| .. | ||
| mvpp2 | ||
| octeon_ep | ||
| octeon_ep_vf | ||
| octeontx2 | ||
| prestera | ||
| Kconfig | ||
| Makefile | ||
| mv643xx_eth.c | ||
| mvmdio.c | ||
| mvneta_bm.c | ||
| mvneta_bm.h | ||
| mvneta.c | ||
| pxa168_eth.c | ||
| skge.c | ||
| skge.h | ||
| sky2.c | ||
| sky2.h | ||