Thread (25 messages) 25 messages, 2 authors, 15d ago

Re: [PATCH 13/14] common/cnxk: support for cn20k legacy msns mode

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2026-09-17 16:19:04

On Thu, 17 Sep 2026 12:40:15 +0530
Rahul Bhansali [off-list ref] wrote:
From: Nithin Dabilpuram <redacted>

Update nix_rx_action2_s for legacy msns mode support for cn20k

Signed-off-by: Rakesh Kudurumalla <redacted>
Signed-off-by: Nithin Dabilpuram <redacted>
---
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help