From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 28D0BA0547; Mon, 30 Aug 2021 18:30:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1594F41103; Mon, 30 Aug 2021 18:30:41 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 9999C41103 for ; Mon, 30 Aug 2021 18:30:39 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 17UA1mBs011121 for ; Mon, 30 Aug 2021 09:30:38 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=TL7lMtsLiTD/zapzhxvE6QqvqnmEFo6XiXi3/RxRyiA=; b=KATYV05aIAFqWKQhIBZOeVzv4tMKAYXINzh8UVSUfDkPR5kVsi/5r1+P1ATi82nAjFCy mPTHolpyL7/McBA/G9m8Hp//v+Bx+HAAwgedaNblYGkl/Gldeo/Q3J15Gx8YqsreOeaB XJ6cHHtkApPAWn0loUzMj4SL/9pwS7wTKZbcHLFqYZq9nFgYtUS3/+Cwn/m/d3Nn5aog NnhAzcGzzJGYt1kfj9B5/ulhDuTwaXW3TiSpC41acq4+ZJqFoTfNq48hDdPtzSqs6ht2 bhZo96Tg6PMzt8Xi14pzgfkqRFTPQ/fQk+0EQKtWplhht8ZAt2USx95SCXOsvf92bm1Q hA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com with ESMTP id 3arj9m31s3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 30 Aug 2021 09:30:38 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 30 Aug 2021 09:30:36 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 30 Aug 2021 09:30:36 -0700 Received: from lab-ci-142.marvell.com (unknown [10.28.36.142]) by maili.marvell.com (Postfix) with ESMTP id 099823F7078; Mon, 30 Aug 2021 09:30:33 -0700 (PDT) From: Ashwin Sekhar T K To: CC: , , , , , , , , Date: Mon, 30 Aug 2021 21:59:03 +0530 Message-ID: <20210830162903.2736191-2-asekhar@marvell.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210830162903.2736191-1-asekhar@marvell.com> References: <20210830140819.2610366-1-asekhar@marvell.com> <20210830162903.2736191-1-asekhar@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: t5h5ve1Q73Macy03atSiSDzRJU8Rpe4h X-Proofpoint-ORIG-GUID: t5h5ve1Q73Macy03atSiSDzRJU8Rpe4h X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-08-30_05,2021-08-30_01,2020-04-07_01 Subject: [dpdk-dev] [PATCH 2/2] common/cnxk: avoid using stashing option of stype X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Avoid using stashing option of stype in NPA in cn10k-a0 stepping. This is a workaround for a HW Errata due to which NPA stashing operations will never result in writing the data into L2 cache. But instead, it will be written into LLC. Signed-off-by: Ashwin Sekhar T K --- drivers/common/cnxk/roc_nix_queue.c | 4 ++++ drivers/common/cnxk/roc_nix_tm_ops.c | 7 +++++++ drivers/common/cnxk/roc_npa.h | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/common/cnxk/roc_nix_queue.c b/drivers/common/cnxk/roc_nix_queue.c index 7e2f86eca7..76e439e7a9 100644 --- a/drivers/common/cnxk/roc_nix_queue.c +++ b/drivers/common/cnxk/roc_nix_queue.c @@ -585,6 +585,10 @@ 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()) + 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..f2173c9a58 100644 --- a/drivers/common/cnxk/roc_nix_tm_ops.c +++ b/drivers/common/cnxk/roc_nix_tm_ops.c @@ -38,6 +38,13 @@ 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()) { + 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..1cf50e5c4e 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; cmp.compare_s.dis_wait = dis_wait; cmp.compare_s.count = num; -- 2.32.0