On Thu, 17 Sep 2026 12:40:15 +0530 Rahul Bhansali <[email protected]> wrote:
> From: Nithin Dabilpuram <[email protected]> > > Update nix_rx_action2_s for legacy msns mode support for cn20k > > Signed-off-by: Rakesh Kudurumalla <[email protected]> > Signed-off-by: Nithin Dabilpuram <[email protected]> > --- Patch 13/14 common/cnxk: support for cn20k legacy msns mode ----------------------------------------------------------- Error: roc_nix_inl_ctx_write() no longer rejects oversized inbound SAs. - The check "sa_len > ROC_NIX_INL_INB_CUSTOM_SA_SZ" now only logs at debug level. - It then goes on to memcpy(sa_cptr, sa_dptr, sa_len) or roc_cpt_ctx_write(). - With custom_inb_sa, nix_inl_inb_sa_tbl_setup() sizes each slot as ROC_NIX_INL_INB_CUSTOM_SA_SZ (512). - sa_len comes from the application through rte_pmd_cnxk_hw_sa_write(). - A 1KB MSNS SA written there overwrites the next slot. Check against the slot size of the owning table (inb_sa_sz[profile]) instead of dropping the check. Warning: roc_nix_cqe_dump() now reads past the descriptor. for (i = 0; i < ((rx->desc_sizem1 + 1) << 1) + 2; i++) The datapath (nix_cqe_xtract_mseg) ends the SG list at (rx + 1) + ((rx->desc_sizem1 + 1) << 1) so the dump reads two words beyond it. No rationale is given. Warning: the log says "Update nix_rx_action2_s", but hw/nix.h struct nix_rx_action2_s is unchanged. - npc_action2 is built from raw shifts (<< 7, << 17, << 32, << 48). - Those land in fields the struct still marks reserved. Update the struct and use it. Warning: unrelated changes are bundled into one patch. - roc_cpt_cq_dump(), which has no caller in the series. - The cqe dump loop bound. - Removal of the ctx_write length check. - roc_model_is_cn20k() -> roc_feature_nix_has_inl_profile(). Split them, each with its own rationale. Info: roc_cpt_cq_dump() prints "uc_info \t0%" PRIu64, which is decimal with a literal leading 0 and reads as octal. Use 0x%" PRIx64.

