cq->drop_thresh = min_rx_drop;
} else {
cq->drop_thresh = NIX_CQ_THRESH_LEVEL;
- cq_ctx->drop = cq->drop_thresh;
- cq_ctx->drop_ena = 1;
+ /* Drop processing or red drop cannot be enabled due to
+ * due to packets coming for second pass from CPT.
+ */
+ if (!roc_nix_inl_inb_is_enabled(roc_nix)) {
+ cq_ctx->drop = cq->drop_thresh;
+ cq_ctx->drop_ena = 1;
+ }
}
/* TX pause frames enable flow ctrl on RX side */
if (nix->tx_pause) {
/* Single BPID is allocated for all rx channels for now */
cq_ctx->bpid = nix->bpid[0];
- cq_ctx->bp = cq_ctx->drop;
+ cq_ctx->bp = cq->drop_thresh;
cq_ctx->bp_ena = 1;
}
aq->sq.sqe_stype = NIX_STYPE_STF;
aq->sq.ena = 1;
aq->sq.sso_ena = !!sq->sso_ena;
+ aq->sq.cq_ena = !!sq->cq_ena;
+ aq->sq.cq = sq->cqid;
if (aq->sq.max_sqe_size == NIX_MAXSQESZ_W8)
aq->sq.sqe_stype = NIX_STYPE_STP;
aq->sq.sqb_aura = roc_npa_aura_handle_to_aura(sq->aura_handle);
aq->sq.sqe_stype = NIX_STYPE_STF;
aq->sq.ena = 1;
aq->sq.sso_ena = !!sq->sso_ena;
+ aq->sq.cq_ena = !!sq->cq_ena;
+ aq->sq.cq = sq->cqid;
if (aq->sq.max_sqe_size == NIX_MAXSQESZ_W8)
aq->sq.sqe_stype = NIX_STYPE_STP;
aq->sq.sqb_aura = roc_npa_aura_handle_to_aura(sq->aura_handle);
rc |= NIX_ERR_NDC_SYNC;
rc |= nix_tm_sq_flush_post(sq);
+
+ /* Restore limit to max SQB count that the pool was created
+ * for aura drain to succeed.
+ */
+ roc_npa_aura_limit_modify(sq->aura_handle, NIX_MAX_SQB);
rc |= roc_npa_pool_destroy(sq->aura_handle);
plt_free(sq->fc);
plt_free(sq->sqe_mem);