bnxt programs the value of enc_key_id and never reads its mask. Flower is
about to accept partial masks. bnxt would offload them as an exact match
on the masked key. Reject them like the other exact fields.
Found by an AI code review agent while auditing the users of enc_key_id.
Build tested only.
Signed-off-by: Alexandre Cassen <redacted>
---
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
index c6b4a14c0e6e..e493c85ecf28 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
@@ -1081,6 +1081,13 @@ static bool bnxt_tc_can_offload(struct bnxt *bp, struct bnxt_tc_flow *flow)
return false;
}
+ /* Currently tunnel id cannot be partial wildcard */
+ if ((flow->flags & BNXT_TC_FLOW_FLAGS_TUNL_ID) &&
+ flow->tun_mask.tun_id != key32_to_tunnel_id(cpu_to_be32(U32_MAX))) {
+ netdev_info(bp->dev, "Wildcard match unsupported for tunnel id\n");
+ return false;
+ }
+
/* Currently Ethertype must be set */
if (!is_exactmatch(&flow->l2_mask.ether_type,
sizeof(flow->l2_mask.ether_type))) {--
2.43.0