RE: [PATCH v2 0/2] cnxk: add HALO support for CN20K mempool

Morten Brørup
2026-01-14T07:52:33Z

> **Warning: Non-portable format specifier**
>
> In `roc_npa_debug.c`, function `npa_halo_dump()`:
> ```c
> npa_dump("W9: thresh \t\t%lu\nW9: fc_msh_dst \t\t%d",
> (unsigned long)halo->thresh, halo->fc_msh_dst);
> ```
>
> The AGENTS.md specifies:
> > Forbidden: `%lld`, `%llu`, `%llx` → Preferred: `%PRId64`, `%PRIu64`,
> `%PRIx64`
>
> While `%lu` with an explicit cast is technically different, for
> consistency with the rest of the file (which uses `%"PRIx64"`
> patterns), this should use:
> ```c
> npa_dump("W9: thresh \t\t%" PRIu64 "\nW9: fc_msh_dst \t\t%d",
> (uint64_t)halo->thresh, halo->fc_msh_dst);
> ```

I'm not sure I agree with this, because the AI suggested fix casts halo->thresh to 64 bit on 32 bit architectures (which there is no need for).