From: Rahul Bhansali <rbhansali@marvell.com>
To: <dev@dpdk.org>, Nithin Dabilpuram <ndabilpuram@marvell.com>,
Kiran Kumar K <kirankumark@marvell.com>,
Sunil Kumar Kori <skori@marvell.com>,
Satha Rao <skoteshwar@marvell.com>
Cc: <jerinj@marvell.com>, Rahul Bhansali <rbhansali@marvell.com>
Subject: [PATCH 1/2] common/cnxk: add ROC errata list
Date: Wed, 30 Mar 2022 14:13:55 +0530 [thread overview]
Message-ID: <20220330084356.3614662-1-rbhansali@marvell.com> (raw)
Created roc_errata.h to list the errata handled in userspace drivers.
Added no_drop_re, cq_min_size_4k, no_fc_stype_ststp, no_drop_aging,
no_vwqe_flush_op etc erratas.
Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
---
drivers/common/cnxk/roc_api.h | 3 +
drivers/common/cnxk/roc_errata.h | 80 +++++++++++++++++++++++++++
drivers/common/cnxk/roc_nix_inl_dev.c | 3 +-
drivers/common/cnxk/roc_nix_queue.c | 4 +-
drivers/common/cnxk/roc_nix_tm_ops.c | 2 +-
5 files changed, 87 insertions(+), 5 deletions(-)
create mode 100644 drivers/common/cnxk/roc_errata.h
diff --git a/drivers/common/cnxk/roc_api.h b/drivers/common/cnxk/roc_api.h
index de7452bf55..072f16d77d 100644
--- a/drivers/common/cnxk/roc_api.h
+++ b/drivers/common/cnxk/roc_api.h
@@ -47,6 +47,9 @@
/* Model */
#include "roc_model.h"
+/* HW Errata */
+#include "roc_errata.h"
+
/* Mbox */
#include "roc_mbox.h"
diff --git a/drivers/common/cnxk/roc_errata.h b/drivers/common/cnxk/roc_errata.h
new file mode 100644
index 0000000000..31162d5232
--- /dev/null
+++ b/drivers/common/cnxk/roc_errata.h
@@ -0,0 +1,80 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(C) 2022 Marvell.
+ */
+#ifndef _ROC_ERRATA_H_
+#define _ROC_ERRATA_H_
+
+/* Errata IPBUNIXRX-40129 */
+static inline bool
+roc_errata_nix_has_no_drop_re(void)
+{
+ return (roc_model_is_cn10ka_a0() || roc_model_is_cnf10ka_a0() ||
+ roc_model_is_cnf10kb_a0());
+}
+
+/* Errata NIX-34873 */
+static inline bool
+roc_errata_nix_has_cq_min_size_4k(void)
+{
+ return (roc_model_is_cn96_a0() || roc_model_is_cn95_a0());
+}
+
+/* Errata IPBUNPA-37480 */
+static inline bool
+roc_errata_npa_has_no_fc_stype_ststp(void)
+{
+ return roc_model_is_cn10ka_a0() ? true : false;
+}
+
+/* Errata IPBUNIXTX-39337 */
+static inline bool
+roc_errata_nix_has_no_drop_aging(void)
+{
+ return (roc_model_is_cn10ka_a0() || roc_model_is_cnf10ka_a0() ||
+ roc_model_is_cnf10kb_a0());
+}
+
+/* Errata IPBUNIXRX-40130 */
+static inline bool
+roc_errata_nix_has_no_vwqe_flush_op(void)
+{
+ return (roc_model_is_cn10ka_a0() || roc_model_is_cnf10ka_a0() ||
+ roc_model_is_cnf10kb_a0());
+}
+
+/* Errata IPBURVUM-38481 */
+static inline bool
+roc_errata_ruvm_has_no_interrupt_with_msixen(void)
+{
+ return true;
+}
+
+/* Errata IPBUNIXTX-39300 */
+static inline bool
+roc_errata_nix_has_assign_incorrect_qintidx(void)
+{
+ return true;
+}
+
+/* Errata IPBUCPT-38551 */
+static inline bool
+roc_errata_cpt_has_use_incorrect_ldwb(void)
+{
+ return true;
+}
+
+/* Errata IPBUNIXTX-39322 */
+static inline bool
+roc_errata_nix_has_overwrite_incorrect_sq_intr(void)
+{
+ return true;
+}
+
+/* Errata IPBUNIXTX-39248 */
+static inline bool
+roc_errata_nix_has_perf_issue_on_stats_update(void)
+{
+ return true;
+}
+
+#endif /* _ROC_ERRATA_H_ */
diff --git a/drivers/common/cnxk/roc_nix_inl_dev.c b/drivers/common/cnxk/roc_nix_inl_dev.c
index 5a032aab52..51f1f6807b 100644
--- a/drivers/common/cnxk/roc_nix_inl_dev.c
+++ b/drivers/common/cnxk/roc_nix_inl_dev.c
@@ -358,8 +358,7 @@ nix_inl_nix_setup(struct nix_inl_dev *inl_dev)
req->rx_cfg = NIX_INL_LF_RX_CFG;
req->flags = NIX_LF_RSS_TAG_LSB_AS_ADDER;
- if (roc_model_is_cn10ka_a0() || roc_model_is_cnf10ka_a0() ||
- roc_model_is_cnf10kb_a0())
+ if (roc_errata_nix_has_no_drop_re())
req->rx_cfg &= ~ROC_NIX_LF_RX_CFG_DROP_RE;
rc = mbox_process_msg(mbox, (void *)&rsp);
diff --git a/drivers/common/cnxk/roc_nix_queue.c b/drivers/common/cnxk/roc_nix_queue.c
index 7d271854f4..07dab4b74f 100644
--- a/drivers/common/cnxk/roc_nix_queue.c
+++ b/drivers/common/cnxk/roc_nix_queue.c
@@ -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 */
diff --git a/drivers/common/cnxk/roc_nix_tm_ops.c b/drivers/common/cnxk/roc_nix_tm_ops.c
index 1d9a02bc06..5884ce5114 100644
--- a/drivers/common/cnxk/roc_nix_tm_ops.c
+++ b/drivers/common/cnxk/roc_nix_tm_ops.c
@@ -38,7 +38,7 @@ roc_nix_tm_sq_aura_fc(struct roc_nix_sq *sq, bool enable)
req->aura.fc_ena = enable;
req->aura_mask.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()) {
req->aura.fc_stype = 0x0; /* STF */
req->aura_mask.fc_stype = 0x0; /* STF */
} else {
--
2.25.1
next reply other threads:[~2022-03-30 8:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-30 8:43 Rahul Bhansali [this message]
2022-03-30 8:43 ` [PATCH 2/2] net/cnxk: use ROC errata API Rahul Bhansali
2022-05-02 18:33 ` Jerin Jacob
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220330084356.3614662-1-rbhansali@marvell.com \
--to=rbhansali@marvell.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=kirankumark@marvell.com \
--cc=ndabilpuram@marvell.com \
--cc=skori@marvell.com \
--cc=skoteshwar@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).