common/cnxk: avoid CPT backpressure due to errata
authorNithin Dabilpuram <ndabilpuram@marvell.com>
Thu, 16 Jun 2022 09:24:10 +0000 (14:54 +0530)
committerJerin Jacob <jerinj@marvell.com>
Mon, 20 Jun 2022 17:15:16 +0000 (19:15 +0200)
Avoid enabling CPT backpressure due to errata where
backpressure would block requests from even other
CPT LF's. Also allow CQ size >=16K.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
drivers/common/cnxk/roc_errata.h
drivers/common/cnxk/roc_nix.h
drivers/common/cnxk/roc_nix_fc.c

index 31162d5..f048297 100644 (file)
@@ -77,4 +77,11 @@ roc_errata_nix_has_perf_issue_on_stats_update(void)
        return true;
 }
 
+/* Errata IPBUCPT-38726, IPBUCPT-38727 */
+static inline bool
+roc_errata_cpt_hang_on_x2p_bp(void)
+{
+       return roc_model_is_cn10ka_a0();
+}
+
 #endif /* _ROC_ERRATA_H_ */
index aedde1c..944e4c6 100644 (file)
@@ -309,7 +309,7 @@ struct roc_nix_rq {
 struct roc_nix_cq {
        /* Input parameters */
        uint16_t qid;
-       uint16_t nb_desc;
+       uint32_t nb_desc;
        /* End of Input parameters */
        uint16_t drop_thresh;
        struct roc_nix *roc_nix;
index a0505bd..cef5d07 100644 (file)
@@ -77,7 +77,8 @@ nix_fc_rxchan_bpid_set(struct roc_nix *roc_nix, bool enable)
                goto exit;
 
        /* Enable backpressure on CPT if inline inb is enabled */
-       if (enable && roc_nix_inl_inb_is_enabled(roc_nix)) {
+       if (enable && roc_nix_inl_inb_is_enabled(roc_nix) &&
+           !roc_errata_cpt_hang_on_x2p_bp()) {
                req = mbox_alloc_msg_nix_cpt_bp_enable(mbox);
                if (req == NULL)
                        return rc;