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 CBCE1428D4; Wed, 5 Apr 2023 16:26:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8091E42D50; Wed, 5 Apr 2023 16:25:59 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 7C80B42D4B for ; Wed, 5 Apr 2023 16:25:57 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 335EBFh4017887 for ; Wed, 5 Apr 2023 07:25:56 -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=80ABCsHcM4XH1iZe6sm7OT3rOfXXkVwH388z1X58JTA=; b=cAcuY/w5T6Th+4yEluT6RUPvJTOXsyL8hYj7tEBmxtH/b1u4BVQz32d21UuMaE5VH1vy Puw6josNmUxzpR3Kj8AM7rL5TemlFar5nP91ll0J812EcXVzqquzWaMl278Hyx3VS78m JIcJz8U9zcG5Z9Tvdmj3Jb4ZPa3w40x123DC7Wg+R90sRTDe5DCPKMaStL2Id5d7tHfh gteYsGgPhXdYabUx0MWyOy9dEipPOa+4X6gz/mNdEMZQN+dg12lU9QVlXxGJd3aODcMw +w4U76ycAgo1zqKkq+f0mYLPNSORXMCsp+se8CXcgvSCqdEe+FbgcR0IV/x/+fTDH7mp Tw== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3prpnd5gsm-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Wed, 05 Apr 2023 07:25:56 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 5 Apr 2023 07:25:55 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Wed, 5 Apr 2023 07:25:55 -0700 Received: from localhost.marvell.com (unknown [10.106.27.249]) by maili.marvell.com (Postfix) with ESMTP id E46443F7050; Wed, 5 Apr 2023 07:25:54 -0700 (PDT) From: Sathesh Edara To: , , , "Radha Mohan Chintakuntla" , Veerasenareddy Burru CC: Subject: [PATCH v2 09/10] net/octeon_ep: set watermark for output queues Date: Wed, 5 Apr 2023 07:25:35 -0700 Message-ID: <20230405142537.1899973-10-sedara@marvell.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230405142537.1899973-1-sedara@marvell.com> References: <20230404141855.1025625-2-sedara@marvell.com> <20230405142537.1899973-1-sedara@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: uUzeZjW9qBAOI8xIp8GII01oI5X96N9j X-Proofpoint-GUID: uUzeZjW9qBAOI8xIp8GII01oI5X96N9j X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-05_09,2023-04-05_01,2023-02-09_01 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 This patch sets the watermark level for SDP output queues to send backpressure to NIX, when available Rx buffers fall below watermark. Signed-off-by: Sathesh Edara --- drivers/net/octeon_ep/cnxk_ep_vf.c | 7 ++++++- drivers/net/octeon_ep/otx_ep_common.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/octeon_ep/cnxk_ep_vf.c b/drivers/net/octeon_ep/cnxk_ep_vf.c index cadb4ecbf9..92c2d2ca5c 100644 --- a/drivers/net/octeon_ep/cnxk_ep_vf.c +++ b/drivers/net/octeon_ep/cnxk_ep_vf.c @@ -245,7 +245,12 @@ cnxk_ep_vf_setup_oq_regs(struct otx_ep_device *otx_ep, uint32_t oq_no) } otx_ep_dbg("SDP_R[%d]_sent: %x", oq_no, rte_read32(droq->pkts_sent_reg)); - return 0; + + /* Set Watermark for backpressure */ + oct_ep_write64(OTX_EP_OQ_WMARK_MIN, + otx_ep->hw_addr + CNXK_EP_R_OUT_WMARK(oq_no)); + + return 0; } static int diff --git a/drivers/net/octeon_ep/otx_ep_common.h b/drivers/net/octeon_ep/otx_ep_common.h index 0bf5454a39..81d6857c52 100644 --- a/drivers/net/octeon_ep/otx_ep_common.h +++ b/drivers/net/octeon_ep/otx_ep_common.h @@ -23,6 +23,7 @@ #define OTX_EP_MAX_OQ_DESCRIPTORS (8192) #define OTX_EP_OQ_BUF_SIZE (2048) #define OTX_EP_MIN_RX_BUF_SIZE (64) +#define OTX_EP_OQ_WMARK_MIN (256) #define OTX_EP_OQ_INFOPTR_MODE (0) #define OTX_EP_OQ_REFIL_THRESHOLD (16) -- 2.31.1