On Thu, 17 Sep 2026 12:40:10 +0530 Rahul Bhansali <[email protected]> wrote:
> From: Rakesh Kudurumalla <[email protected]> > > When handling NIX inline CPT CQ events (type < NIX_INL_SSO), derive the > mbuf from the completion queue word layout using fmt bits: WQE_PTR_CPTR > uses w1.esn; CPTR_WQE_PTR uses w3.comp_ptr shifted left by 3 for the byte > address. Pass the mbuf into cn20k_eth_sec_post_event instead of NULL. > Drop RTE_SET_USED(args) since args is consumed by post_event. > > Signed-off-by: Rakesh Kudurumalla <[email protected]> > Signed-off-by: Rahul Bhansali <[email protected]> > --- Patch 8/14 net/cnxk: resolve mbuf from CPT CQ format in SSO work cb ------------------------------------------------------------------ Error: wrong mbuf address for inbound events. mbuf = (struct rte_mbuf *)(uintptr_t)gw[1]; - gw[1] is the raw WQE pointer; patch 7 only masks the low 3 bits. - Outbound is correct: the Tx path stores (uintptr_t)m | 1 in CPT word 3. - For inbound, the same function's RTE_EVENT_TYPE_ETHDEV case uses gw[1] - sizeof(struct rte_mbuf) - So cn20k_eth_sec_post_event() reads *rte_security_dynfield(mbuf) from the wrong address. Subtract sizeof(struct rte_mbuf) for NIX_INL_INB_CPT_CQ. Warning: WQE_PTR_ANTI_REPLAY events are dropped. - eth_dev stays NULL. - post_event() builds desc and skips rte_eth_dev_callback_process() because of "if (eth_dev)". - It returns false, so nothing is freed either. Resolve the port for this format, or do not dispatch it. Warning: the commit log does not match the code. It says WQE_PTR_CPTR takes the mbuf from w1.esn and CPTR_WQE_PTR from w3.comp_ptr "shifted left by 3". The code (patch 7) is the other way round, and masks instead of shifting: WQE_PTR_CPTR: wqe = w3.comp_ptr & ~7 CPTR_WQE_PTR: wqe = w1.esn & ~7 That derivation lives in patch 7, not here. Info: post_event() log messages still say "Outbound error" for inbound events.

