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 2E244428CE; Tue, 4 Apr 2023 16:20:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 15FAB42D20; Tue, 4 Apr 2023 16:19:17 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id C6AF142D1A for ; Tue, 4 Apr 2023 16:19:15 +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 334CraZO013222 for ; Tue, 4 Apr 2023 07:19:15 -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=A+nlCPdq7ppNoYufCqDhVM1Ct4OtobR/xk8xNL2ZLJc=; b=fShBATYRpCuI+MJTi6V2z9e+1ROdTH91KAQ9RxWJk/cpv4jhkELLfMnS1C86CVQOxhXo ckG1AmC3QwIlVtvvKk50vmFhhFRUaBcgqum7IwuG2PLUC9ahjkKyusjseSOjCfRQhrxK QQIZHKtWJeOiSNONhvoa2Xl2a6qav2OIAiWdDEOtv9Wi6F60hlZ3FwkWwy0RmRgWApZs 0N1VJ3+AftzgA+3iKIxrlBlWVRaRK0TBRk7pQ6N0GAuaob3XuwNNhhu0fNqj1HT8eF/E /9MsRpG7RRbTarEhimvSusJRceTVzhtkgX0eO/lCnxS/r8/O0mG4+z2QtnhIJnUt4phB eg== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3ppm4qw0xc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 04 Apr 2023 07:19:15 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Tue, 4 Apr 2023 07:19:13 -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; Tue, 4 Apr 2023 07:19:13 -0700 Received: from localhost.marvell.com (unknown [10.106.27.249]) by maili.marvell.com (Postfix) with ESMTP id 014085B6930; Tue, 4 Apr 2023 07:19:12 -0700 (PDT) From: Sathesh Edara To: , , , "Radha Mohan Chintakuntla" , Veerasenareddy Burru CC: Subject: [PATCH v1 9/9] net/octeon_ep: set watermark for output queues Date: Tue, 4 Apr 2023 07:18:54 -0700 Message-ID: <20230404141855.1025625-10-sedara@marvell.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230404141855.1025625-1-sedara@marvell.com> References: <20230404141855.1025625-1-sedara@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: tQxCMXBwcWsU7reUVrA0iP0ETkprYSy0 X-Proofpoint-GUID: tQxCMXBwcWsU7reUVrA0iP0ETkprYSy0 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-04_06,2023-04-04_04,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 931aac887b..e26060b604 100644 --- a/drivers/net/octeon_ep/cnxk_ep_vf.c +++ b/drivers/net/octeon_ep/cnxk_ep_vf.c @@ -243,7 +243,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 029d013aef..0f189d4570 100644 --- a/drivers/net/octeon_ep/otx_ep_common.h +++ b/drivers/net/octeon_ep/otx_ep_common.h @@ -22,6 +22,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