]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
octeontx2-pf: Use new bandwidth profiles in receive queue
authorSubbaraya Sundeep <sbhatta@marvell.com>
Sat, 25 Oct 2025 10:32:47 +0000 (16:02 +0530)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 30 Oct 2025 09:44:09 +0000 (10:44 +0100)
Receive queue points to a bandwidth profile for rate limiting.
Since cn20k has additional bandwidth profiles use them
too while mapping receive queue to bandwidth profile.

Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Link: https://patch.msgid.link/1761388367-16579-12-git-send-email-sbhatta@marvell.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c

index cab157aac2517ae8b879329ce463becf56df7ea9..3e1bf22cba69c82fffada1ce49d5a3e524c61b93 100644 (file)
@@ -341,6 +341,12 @@ int cn10k_map_unmap_rq_policer(struct otx2_nic *pfvf, int rq_idx,
        aq->rq.band_prof_id = policer;
        aq->rq_mask.band_prof_id = GENMASK(9, 0);
 
+       /* If policer id is greater than 1023 then it implies hardware supports
+        * more leaf profiles. In that case use band_prof_id_h for 4 MSBs.
+        */
+       aq->rq.band_prof_id_h = policer >> 10;
+       aq->rq_mask.band_prof_id_h = GENMASK(3, 0);
+
        /* Fill AQ info */
        aq->qidx = rq_idx;
        aq->ctype = NIX_AQ_CTYPE_RQ;