crypto/cnxk: move IPsec SA creation to common
[dpdk.git] / drivers / common / cnxk / roc_nix_queue.c
index 7d27185..76c049c 100644 (file)
@@ -527,7 +527,7 @@ roc_nix_cq_init(struct roc_nix *roc_nix, struct roc_nix_cq *cq)
        /* Map CQ0 [RQ0] to CINT0 and so on till max 64 irqs */
        cq_ctx->cint_idx = cq->qid;
 
-       if (roc_model_is_cn96_a0() || roc_model_is_cn95_a0()) {
+       if (roc_errata_nix_has_cq_min_size_4k()) {
                const float rx_cq_skid = NIX_CQ_FULL_ERRATA_SKID;
                uint16_t min_rx_drop;
 
@@ -658,7 +658,7 @@ sqb_pool_populate(struct roc_nix *roc_nix, struct roc_nix_sq *sq)
 
        memset(&aura, 0, sizeof(aura));
        aura.fc_ena = 1;
-       if (roc_model_is_cn9k() || roc_model_is_cn10ka_a0())
+       if (roc_model_is_cn9k() || roc_errata_npa_has_no_fc_stype_ststp())
                aura.fc_stype = 0x0; /* STF */
        else
                aura.fc_stype = 0x3; /* STSTP */
@@ -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;