Re: [net-next PATCH 4/4] octeontx2-pf: cn20k: Use unified Halo context
From: Simon Horman
Date: Wed Mar 18 2026 - 11:15:08 EST
On Mon, Mar 16, 2026 at 06:27:39PM +0530, Subbaraya Sundeep wrote:
> Use unified Halo context present in CN20K hardware for
> octeontx2 netdevs instead of aura and pool contexts.
>
> Signed-off-by: Subbaraya Sundeep <sbhatta@xxxxxxxxxxx>
> ---
> .../ethernet/marvell/octeontx2/nic/cn20k.c | 190 +++++++++---------
> .../ethernet/marvell/octeontx2/nic/cn20k.h | 3 +
> .../marvell/octeontx2/nic/otx2_common.h | 2 +
> .../ethernet/marvell/octeontx2/nic/otx2_pf.c | 6 +
> 4 files changed, 107 insertions(+), 94 deletions(-)
>
> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/cn20k.c b/drivers/net/ethernet/marvell/octeontx2/nic/cn20k.c
...
> - /* Enable backpressure for RQ aura */
> - if (aura_id < pfvf->hw.rqpool_cnt && !is_otx2_lbkvf(pfvf->pdev)) {
> - aq->aura.bp_ena = 0;
> - /* If NIX1 LF is attached then specify NIX1_RX.
> - *
> - * Below NPA_AURA_S[BP_ENA] is set according to the
> - * NPA_BPINTF_E enumeration given as:
> - * 0x0 + a*0x1 where 'a' is 0 for NIX0_RX and 1 for NIX1_RX so
> - * NIX0_RX is 0x0 + 0*0x1 = 0
> - * NIX1_RX is 0x0 + 1*0x1 = 1
> - * But in HRM it is given that
> - * "NPA_AURA_S[BP_ENA](w1[33:32]) - Enable aura backpressure to
> - * NIX-RX based on [BP] level. One bit per NIX-RX; index
> - * enumerated by NPA_BPINTF_E."
> - */
> - if (pfvf->nix_blkaddr == BLKADDR_NIX1)
> - aq->aura.bp_ena = 1;
> -
> - bpid_idx = cn20k_aura_bpid_idx(pfvf, aura_id);
With this change cn20k_aura_bpid_idx is now unused and probably
should be removed.
Flagged by W=1 builds.
> - aq->aura.bpid = pfvf->bpid[bpid_idx];
> -
> - /* Set backpressure level for RQ's Aura */
> - aq->aura.bp = RQ_BP_LVL_AURA;
> - }
> -
> - /* Fill AQ info */
> - aq->ctype = NPA_AQ_CTYPE_AURA;
> - aq->op = NPA_AQ_INSTOP_INIT;
> -
> - return 0;
> -}
> -
> -static int cn20k_pool_aq_init(struct otx2_nic *pfvf, u16 pool_id,
> +static int cn20k_halo_aq_init(struct otx2_nic *pfvf, u16 pool_id,
> int stack_pages, int numptrs, int buf_size,
> int type)
> {
...
--
pw-bot: changes-requested