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 931EDA034C; Tue, 22 Feb 2022 20:36:05 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BEF2341161; Tue, 22 Feb 2022 20:35:46 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 2E6164115A for ; Tue, 22 Feb 2022 20:35:42 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 21MIn8LX020159 for ; Tue, 22 Feb 2022 11:35:41 -0800 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-type; s=pfpt0220; bh=WeX9ySBqWwl7J9R5RW/UBI2GfU7dRl7kE2iPceZAyug=; b=J/zZWMyqaCrp7S7/icZIfvPQQ1Lxtllmfm84xrfnRc816IMPUdza2bBqS8JsifAM6X18 ISHM00qFlFRhIkpn6ph5dsI2IASi8ai4yiWSZcXejMtgvcIKGDZi+9jiktfQbtr+zn0+ zlDaT96fNrOlL2Yd1ftjkU5/v+Dq1tF6NXfGU8i/Cq94tH3zGXUrr4JBOwXiUOb7VUJ1 ezOHrXa3XkLBT1BTopBfj8ZL2f9X7GxllBu03GygnP/21N44uwwiGnw2GwX42Skgc01g ST6mTkxmNJYQmPZ78BmAl1Y3zKrRRjVbER7lO838jbUGgWaLMnMBvdiwik54QDqXCOBq KQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3ecwaxar2c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 22 Feb 2022 11:35:41 -0800 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.18; Tue, 22 Feb 2022 11:35:39 -0800 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.18 via Frontend Transport; Tue, 22 Feb 2022 11:35:39 -0800 Received: from hyd1588t430.marvell.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id CBD233F707B; Tue, 22 Feb 2022 11:35:37 -0800 (PST) From: Nithin Dabilpuram To: , Nithin Dabilpuram , "Kiran Kumar K" , Sunil Kumar Kori , Satha Rao CC: Subject: [PATCH v2 08/21] common/cnxk: use SSO time counter threshold for IRQ Date: Wed, 23 Feb 2022 01:04:59 +0530 Message-ID: <20220222193512.19292-8-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20220222193512.19292-1-ndabilpuram@marvell.com> References: <20220207072932.22409-1-ndabilpuram@marvell.com> <20220222193512.19292-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-GUID: Pb6aztl9cLZdpWuX6BTyQ7ffItYUuF-e X-Proofpoint-ORIG-GUID: Pb6aztl9cLZdpWuX6BTyQ7ffItYUuF-e X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-02-22_06,2022-02-21_02,2021-12-02_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 Enable time counter based threshold for raising SSO EXE_INT instead of IAQ threshold. Time counter based threshold helps getting periodic interrupts and process pkts in burst instead of getting HW to raise an interrupt for every new work. Signed-off-by: Nithin Dabilpuram --- drivers/common/cnxk/roc_nix_inl_dev_irq.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/common/cnxk/roc_nix_inl_dev_irq.c b/drivers/common/cnxk/roc_nix_inl_dev_irq.c index d758e0c..8a0cb74 100644 --- a/drivers/common/cnxk/roc_nix_inl_dev_irq.c +++ b/drivers/common/cnxk/roc_nix_inl_dev_irq.c @@ -5,6 +5,8 @@ #include "roc_api.h" #include "roc_priv.h" +#define WORK_LIMIT 1000 + static void nix_inl_sso_work_cb(struct nix_inl_dev *inl_dev) { @@ -15,6 +17,7 @@ nix_inl_sso_work_cb(struct nix_inl_dev *inl_dev) __uint128_t get_work; uint64_t u64[2]; } gw; + uint16_t cnt = 0; uint64_t work; again: @@ -33,7 +36,9 @@ nix_inl_sso_work_cb(struct nix_inl_dev *inl_dev) else plt_warn("Undelivered inl dev work gw0: %p gw1: %p", (void *)gw.u64[0], (void *)gw.u64[1]); - goto again; + cnt++; + if (cnt < WORK_LIMIT) + goto again; } plt_atomic_thread_fence(__ATOMIC_ACQ_REL); @@ -138,8 +143,10 @@ nix_inl_sso_register_irqs(struct nix_inl_dev *inl_dev) /* Enable hw interrupt */ plt_write64(~0ull, sso_base + SSO_LF_GGRP_INT_ENA_W1S); - /* Setup threshold for work exec interrupt to 1 wqe in IAQ */ - plt_write64(0x1ull, sso_base + SSO_LF_GGRP_INT_THR); + /* Setup threshold for work exec interrupt to 100us timeout + * based on time counter. + */ + plt_write64(BIT_ULL(63) | 10ULL << 48, sso_base + SSO_LF_GGRP_INT_THR); return rc; } -- 2.8.4