[18/31] common/cnxk: enable CQ stashing
Checks
Commit Message
From: Kommula Shiva Shankar <kshankar@marvell.com>
This patch enables CQ stashing for better CQE
processing performance
Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com>
---
drivers/common/cnxk/roc_features.h | 6 ++++++
drivers/common/cnxk/roc_nix.h | 1 +
drivers/common/cnxk/roc_nix_queue.c | 7 +++++++
3 files changed, 14 insertions(+)
@@ -46,6 +46,12 @@ roc_feature_nix_has_reass(void)
return roc_model_is_cn10ka();
}
+static inline bool
+roc_feature_nix_has_cqe_stash(void)
+{
+ return roc_model_is_cn10ka_b0();
+}
+
static inline bool
roc_feature_nix_has_rxchan_multi_bpid(void)
{
@@ -368,6 +368,7 @@ struct roc_nix_cq {
/* Input parameters */
uint16_t qid;
uint32_t nb_desc;
+ uint8_t stash_thresh;
/* End of Input parameters */
uint16_t drop_thresh;
struct roc_nix *roc_nix;
@@ -908,6 +908,13 @@ roc_nix_cq_init(struct roc_nix *roc_nix, struct roc_nix_cq *cq)
}
cq_ctx->bp = cq->drop_thresh;
+ if (roc_feature_nix_has_cqe_stash()) {
+ if (cq_ctx->caching) {
+ cq_ctx->stashing = 1;
+ cq_ctx->stash_thresh = cq->stash_thresh;
+ }
+ }
+
rc = mbox_process(mbox);
mbox_put(mbox);
if (rc)