]> git.droids-corp.org - dpdk.git/commitdiff
common/cnxk: support multi channel for SDP send queues
authorSubrahmanyam Nilla <snilla@marvell.com>
Sun, 8 May 2022 07:48:12 +0000 (13:18 +0530)
committerJerin Jacob <jerinj@marvell.com>
Tue, 10 May 2022 14:26:45 +0000 (16:26 +0200)
Currently only base channel number is configured as default
channel for all the SDP send queues. Due to this, packets
sent on different SQ's are landing on the same output queue
on the host. Channel number in the send queue should be
configured according to the number of queues assigned to the
SDP PF or VF device.

Signed-off-by: Subrahmanyam Nilla <snilla@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
drivers/common/cnxk/roc_nix_queue.c

index 07dab4b74f807488d55c33eebf949361e0d21f26..76c049c94bdcf94d1172d71183358cfd4096ad00 100644 (file)
@@ -706,6 +706,7 @@ static int
 sq_cn9k_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t rr_quantum,
             uint16_t smq)
 {
+       struct roc_nix *roc_nix = nix_priv_to_roc_nix(nix);
        struct mbox *mbox = (&nix->dev)->mbox;
        struct nix_aq_enq_req *aq;
 
@@ -721,7 +722,11 @@ sq_cn9k_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t rr_quantum,
        aq->sq.max_sqe_size = sq->max_sqe_sz;
        aq->sq.smq = smq;
        aq->sq.smq_rr_quantum = rr_quantum;
-       aq->sq.default_chan = nix->tx_chan_base;
+       if (roc_nix_is_sdp(roc_nix))
+               aq->sq.default_chan =
+                       nix->tx_chan_base + (sq->qid % nix->tx_chan_cnt);
+       else
+               aq->sq.default_chan = nix->tx_chan_base;
        aq->sq.sqe_stype = NIX_STYPE_STF;
        aq->sq.ena = 1;
        aq->sq.sso_ena = !!sq->sso_ena;