From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 904D9A04F6; Tue, 7 Jan 2020 14:17:53 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 804AB1D957; Tue, 7 Jan 2020 14:17:52 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id C154B1D94A for ; Tue, 7 Jan 2020 14:17:50 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 007DDAas028742 for ; Tue, 7 Jan 2020 05:17:49 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=8rMSp0mvXXKVSkTAkLqsUyK/5MnOibviD9VTO6/GAZw=; b=sNJtWnILrmu6aONfes+DRZoxmbwb9tOUC16j7OJxQd/MbROIDP5r1Mi7EfEyBXiKqn8z CUA0zJMk0VnQQU2T6AL6+ovSOtDeGve9Pn3esPOe15WO+BU03EviQFJm/Cb6nUybbbu/ CiU0IzHMrbBJWcKl7Qp4qDVlpPHM1tt110mXHy7Iav3Q2x8I0x0CZhSxVyKxBG5JIboR 5ypxTXG/fOgTkXo5gsIKT74Te2u5K9OurHGckGs4h13XPOb98OlL5dzgWz/XJGblPs9D lsf44/i7Iz3U+NiYaJXP10vBdpmvp8DPQWPabTosBi8ceNlIcmM6VAs8Z6szeI1Lhx6Q QA== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 2xarxvafsx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 07 Jan 2020 05:17:49 -0800 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 7 Jan 2020 05:17:42 -0800 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 7 Jan 2020 05:17:42 -0800 Received: from BG-LT7430.marvell.com (unknown [10.28.17.41]) by maili.marvell.com (Postfix) with ESMTP id BC1F03F704D; Tue, 7 Jan 2020 05:17:41 -0800 (PST) From: To: , Pavan Nikhilesh CC: Date: Tue, 7 Jan 2020 18:47:38 +0530 Message-ID: <20200107131738.11932-1-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2020-01-07_03:2020-01-06,2020-01-07 signatures=0 Subject: [dpdk-dev] [PATCH] event/octeontx2: relax memory requirement for event timers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" From: Pavan Nikhilesh Relax memory requirement for event timers when internal mempool used is octeontx2 mempool. Add debug log to print the memory used. Signed-off-by: Pavan Nikhilesh --- drivers/event/octeontx2/otx2_tim_evdev.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/event/octeontx2/otx2_tim_evdev.c b/drivers/event/octeontx2/otx2_tim_evdev.c index b275c6922..cd0dcde24 100644 --- a/drivers/event/octeontx2/otx2_tim_evdev.c +++ b/drivers/event/octeontx2/otx2_tim_evdev.c @@ -327,7 +327,11 @@ otx2_tim_ring_create(struct rte_event_timer_adapter *adptr) tim_optimze_bkt_param(tim_ring); } - tim_ring->nb_chunks = tim_ring->nb_chunks * tim_ring->nb_bkts; + if (tim_ring->disable_npa) + tim_ring->nb_chunks = tim_ring->nb_chunks * tim_ring->nb_bkts; + else + tim_ring->nb_chunks = tim_ring->nb_chunks + tim_ring->nb_bkts; + /* Create buckets. */ tim_ring->bkt = rte_zmalloc("otx2_tim_bucket", (tim_ring->nb_bkts) * sizeof(struct otx2_tim_bkt), @@ -376,6 +380,11 @@ otx2_tim_ring_create(struct rte_event_timer_adapter *adptr) RTE_EVENT_TYPE_TIMER); sso_xae_reconfigure(dev->event_dev); + otx2_tim_dbg("Total memory used %"PRIu64"MB\n", + (uint64_t)(((tim_ring->nb_chunks * tim_ring->chunk_sz) + + (tim_ring->nb_bkts * sizeof(struct otx2_tim_bkt))) / + BIT_ULL(20))); + return rc; chnk_mem_err: -- 2.17.1