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 0A4F1429DC; Mon, 24 Apr 2023 16:36:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D417E410D0; Mon, 24 Apr 2023 16:36:16 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id A412F40FAE for ; Mon, 24 Apr 2023 16:36:14 +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 33ODU3tW017326 for ; Mon, 24 Apr 2023 07:36:13 -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=vQ8xxSplFJfgmAb7oE0HsaDjQV/DrEpgPbUKmDqCU18=; b=KozPylZAbV49vSBozRmJrr6lEEUivGoV3dXkVOem9avhgB2SHMxJRB/DWkOgmlRQ1FXQ 3JXFlPo+onuCbfqXnDQdGIEDXCLLtIQjNjh7/yWmEOfN5N/MWlPVGk+lbDKGUsGyUTD+ fzS1KABHwint+pkQOcfgTVt21lkXE3p2OAcxRoV4P1Y/tFUi3wOssx079gm+OSOmH4P3 wmvxfU3CexjEm8B0GpSlPw9TesvAi4EDZmHeXFseyWGNG6/2xAg1gJyLEH84+lLacMTN HVxpWIOVKV6artyijSm0OYwbIkljSdfnmO4vrs0+zK8uOEx0hMjlPSipbiWhrDjY7of2 EQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3q4f3p6dat-11 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 24 Apr 2023 07:36:13 -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; Mon, 24 Apr 2023 05:28:59 -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; Mon, 24 Apr 2023 05:28:59 -0700 Received: from localhost.marvell.com (unknown [10.106.27.249]) by maili.marvell.com (Postfix) with ESMTP id C951A3F70A0; Mon, 24 Apr 2023 05:28:59 -0700 (PDT) From: Sathesh Edara To: , , , "Radha Mohan Chintakuntla" , Veerasenareddy Burru CC: Subject: [PATCH v3 10/11] net/octeon_ep: set watermark for output queues Date: Mon, 24 Apr 2023 05:28:33 -0700 Message-ID: <20230424122835.39493-11-sedara@marvell.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230424122835.39493-1-sedara@marvell.com> References: <20230405142537.1899973-2-sedara@marvell.com> <20230424122835.39493-1-sedara@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: regMzcUgA3YaC6iZwqEMpQ6DWlXW3icm X-Proofpoint-GUID: regMzcUgA3YaC6iZwqEMpQ6DWlXW3icm 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-24_09,2023-04-21_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 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 dadc8d1579..0305079af9 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