[dpdk-dev] [PATCH] common/cnxk: avoid using stype STSTP in batch alloc
Ashwin Sekhar T K
asekhar at marvell.com
Mon Aug 30 16:08:19 CEST 2021
Avoid using stype STSTP in batch alloc.
This is a workaround for errata IPBUNPA-37480.
Signed-off-by: Ashwin Sekhar T K <asekhar at marvell.com>
---
drivers/common/cnxk/roc_nix_queue.c | 5 +++++
drivers/common/cnxk/roc_nix_tm_ops.c | 8 ++++++++
drivers/common/cnxk/roc_npa.h | 2 +-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/drivers/common/cnxk/roc_nix_queue.c b/drivers/common/cnxk/roc_nix_queue.c
index 7e2f86eca7..1c1de8310d 100644
--- a/drivers/common/cnxk/roc_nix_queue.c
+++ b/drivers/common/cnxk/roc_nix_queue.c
@@ -585,6 +585,11 @@ 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())
+ /* Setting for cn10ka A0 due to Errata IPBUNPA-37480 */
+ aura.fc_stype = 0x0; /* STF */
+ else
+ aura.fc_stype = 0x3; /* STSTP */
aura.fc_addr = (uint64_t)sq->fc;
aura.fc_hyst_bits = 0; /* Store count on all updates */
rc = roc_npa_pool_create(&sq->aura_handle, blk_sz, NIX_MAX_SQB, &aura,
diff --git a/drivers/common/cnxk/roc_nix_tm_ops.c b/drivers/common/cnxk/roc_nix_tm_ops.c
index ed244d4214..abddf54dcc 100644
--- a/drivers/common/cnxk/roc_nix_tm_ops.c
+++ b/drivers/common/cnxk/roc_nix_tm_ops.c
@@ -38,6 +38,14 @@ 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()) {
+ /* Setting for cn10ka A0 due to Errata IPBUNPA-37480 */
+ req->aura.fc_stype = 0x0; /* STF */
+ req->aura_mask.fc_stype = 0x0; /* STF */
+ } else {
+ req->aura.fc_stype = 0x3; /* STSTP */
+ req->aura_mask.fc_stype = 0x3; /* STSTP */
+ }
rc = mbox_process(mbox);
if (rc)
diff --git a/drivers/common/cnxk/roc_npa.h b/drivers/common/cnxk/roc_npa.h
index 3fc6192e57..af0274ecb6 100644
--- a/drivers/common/cnxk/roc_npa.h
+++ b/drivers/common/cnxk/roc_npa.h
@@ -214,7 +214,7 @@ roc_npa_aura_batch_alloc_issue(uint64_t aura_handle, uint64_t *buf,
cmp.u = 0;
cmp.compare_s.aura = roc_npa_aura_handle_to_aura(aura_handle);
cmp.compare_s.drop = drop;
- cmp.compare_s.stype = ALLOC_STYPE_STSTP;
+ cmp.compare_s.stype = ALLOC_STYPE_STF; /* Errata IPBUNPA-37480 */
cmp.compare_s.dis_wait = dis_wait;
cmp.compare_s.count = num;
--
2.32.0
More information about the dev
mailing list