Re: [net-next,1/4] octeontx2-af: npa: cn20k: Add NPA Halo support
From: Simon Horman
Date: Wed Mar 18 2026 - 11:44:17 EST
This is an AI-generated review of your patch. The human sending this
email has considered the AI review valid, or at least plausible.
For local reproduction steps see https://netdev-ai.bots.linux.dev/ai-local.html
---
octeontx2-af: npa: cn20k: Add NPA Halo support
CN20K silicon implements unified aura and pool context type called Halo
for better resource usage. This patch adds support to handle Halo context
type operations.
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cn20k/npa.c b/drivers/net/ethernet/marvell/octeontx2/af/cn20k/npa.c
> index fe8f926c8b75..c963f43dc7b0 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/cn20k/npa.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/cn20k/npa.c
[ ... ]
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c
> index e2a33e46b48a..aa2b8acf6be4 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c
[ ... ]
> @@ -233,6 +259,12 @@ static int npa_lf_hwctx_disable(struct rvu *rvu, struct hwctx_disable_req *req)
> aq_req.aura_mask.bp_ena = 1;
> cnt = pfvf->aura_ctx->qsize;
> bmap = pfvf->aura_bmap;
> + } else if (req->ctype == NPA_AQ_CTYPE_HALO) {
> + aq_req.aura.ena = 0;
> + aq_req.aura_mask.ena = 1;
> + rvu_npa_halo_hwctx_disable(&aq_req);
> + cnt = pfvf->aura_ctx->qsize;
> + bmap = pfvf->halo_bmap;
> }
>
> aq_req.ctype = req->ctype;
> @@ -241,8 +273,8 @@ static int npa_lf_hwctx_disable(struct rvu *rvu, struct hwctx_disable_req *req)
> rc = rvu_npa_aq_enq_inst(rvu, &aq_req, NULL);
> if (rc) {
> err = rc;
> dev_err(rvu->dev, "Failed to disable %s:%d context\n",
> (req->ctype == NPA_AQ_CTYPE_AURA) ?
> "Aura" : "Pool", id);
> }
> }
When disabling a HALO context fails, wouldn't the error message print
"Pool" instead of "Halo"? The ternary expression only checks for AURA,
so HALO failures would be logged as Pool failures, making debugging on
cn20k hardware misleading.