Re: [net-next,v8,10/13] octeontx2-af: npc: cn20k: Allocate MCAM entry for flow installation
From: Ratheesh Kannoth <hidden>
Date: 2026-02-24 06:24:13
Also in:
lkml
From: Ratheesh Kannoth <hidden>
Date: 2026-02-24 06:24:13
Also in:
lkml
On 2026-02-05 at 07:55:27, Jakub Kicinski (kuba@kernel.org) wrote:
quoted
cn20k_wreq.hw_prio = req->hw_prio; + cn20k_wreq.req_kw_type = req->req_kw_type; update_rule:Looking at npc_install_flow(), req->req_kw_type is copied to cn20k_wreq.req_kw_type, but is req->req_kw_type ever initialized with the computed kw_type value? In rvu_mbox_handler_npc_install_flow(), the function rvu_npc_alloc_entry_for_flow_install() computes the correct kw_type based on the flow requirements and stores it in the local variable 'kw_type' at line 1746. However, this computed value is never assigned to req->req_kw_type before calling npc_install_flow() at line 1887. As a result, npc_install_flow() uses either a zero-initialized value or whatever the PF driver sent, instead of the AF-computed value. This seems inconsistent with the commit message stating "the AF driver determine the required NPC MCAM entry type." The incorrect req_kw_type is then passed to npc_cn20k_config_mcam_entry() which uses it for hardware configuration mismatch handling in npc_cn20k_config_kw_x2() at lines 956-960.
req->req_kw_type is used for different purpose. I believe, this comment is invalid.