From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0064.outbound.protection.outlook.com [104.47.38.64]) by dpdk.org (Postfix) with ESMTP id D3D741B1AC for ; Mon, 19 Feb 2018 10:15:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=cYWXjZJd2fAse/HUNm12IQzy0q/BldCkEd6a2yBjGuM=; b=DzRPClNngK6X9HvWBCtKgtFhmgVeWXtrxqTTeJfiCuIW+b3NCQQDbomrNDcWUeX4on2DDzzuCvK/WY6L8Yn8IZj9u6ZjhB0lVpvgrI67ycEj7iR3UCLE3eJcdG5Yt62udaEnW+OjuZ3+qzzrlAyZyNPj2ZUlbP5FK/TpbNizx6E= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from ltp-pvn (111.93.218.67) by BN6PR07MB3459.namprd07.prod.outlook.com (10.161.153.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.506.18; Mon, 19 Feb 2018 09:15:38 +0000 Date: Mon, 19 Feb 2018 14:45:21 +0530 From: Pavan Nikhilesh To: santosh , jerin.jacob@caviumnetworks.com, erik.g.carrillo@intel.com Cc: dev@dpdk.org Message-ID: <20180219091520.GA4746@ltp-pvn> References: <20180216213700.3415-1-pbhagavatula@caviumnetworks.com> <20180216213700.3415-9-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: SG2PR0601CA0018.apcprd06.prod.outlook.com (10.170.128.28) To BN6PR07MB3459.namprd07.prod.outlook.com (10.161.153.22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 35564796-0c08-44a2-6b55-08d5777958c8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:BN6PR07MB3459; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3459; 3:rpeVimEbv36QGwMxbmKAqgvHqPU7/O8cf3GajwazBPoP53sXAXT9Ste1iERTyLxl/1TZ6iR1ltzhUbwrGdSR9xYJ7X+zSj806bxCx8ADFS8iymoDDnBT4kDZMolZzgyt+DnmEPXXCZlXkr+wFgRVwTsB6v/cEuVa/GDh0Wf7CfJ/ctLeoRbCucgJFkfSlebnBVFjblN7NWC6lq7WvoTS5fZZ935DDhhqnTcWlZ9dq9g5io2n+7pBxl/FzhN7ymEl; 25:zw0kCOI+uUmcMH99pRLDn1Pz+7DKmbxxWjagV+PdAl1TnCeElBtWpFxOMfK5cqtw1dZxYytmWNMZTbug27GammwOOiviL+GeFoi6VJIEdteG64fW8fGk+FB+VhjzXGdru4EwXdX6We/m/wqyuSPxv8x43dBURUk1Nn/tIImUnN8JFKkNzz+q7q42/CUE/oBoRGYhbQ30UWD6GkKWbMYIcZrODXd8Nt5oB+aq1WW+GEQXHCOaeJV2lNTUBmbATUjG0HsEcSt40pNB3OtLKq5ywPfIXsEmdbH1wTFAsWz+6Ar+3kf95khQ+OAGHiuSnBAgcjWZ+fXM7bmHcMkSuTyRNw==; 31:p26P+nMXWGrFZIvgk1PLJlb1DWJovO1o3dXt+qd/om3dWTsiK0Yt2L9Cr4aeJ3K1h7nezdIfM5IxQbr8WOgxfVhAa7ts6zMCU68nN8YOi2NAvbO6kVDZi/F+EjR8Rld97xCB1yITQqE88s5bQQN3U9Qy1tUR2F7kNg0X4FXEYIR9ptdvdQtxmZlCO5Lyyw1q10kUbFWDKDC8qTISetMuH4+G3S+WUb2hyZWgUZbyRn0= X-MS-TrafficTypeDiagnostic: BN6PR07MB3459: X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3459; 20:IfWecf9zCoHgdBNF9zxaDn5vRSz/+rrfDrhfXa4GRPqIKmaBj9lixRoIzWSXu3Bwy86doRVYSxi93SsfH+AEHFQkP1A5PT4fB/tCkuMls7R6ULaF0HcVYsTy0c5JGJ7tArTIx0pk5RjLl6av8BSo/j1PGtk5WmPQdpD+s6g9LyyUzk4Qn5cmDkZy223NVu9m1LobAJDcgquZLPF/5QwzWJPlF8D909+74hfrI4qmekYQmUrCwd2wjJT/1USvDXkI4tOlGAPm87Y70qyxYgwHcsXDuoVVaBKc15r5xHZbV6sTNF7OW52wUZ3/fsfkpWhYmbrY21JNP3ds07meKJQF0CHGHn0TgFCaZdcdF5cndn0RkiZyCOdJGE4+yKmo1s5UmyIWACVkpXs+0zMWaswUMXMQYpmBR5NPvH9Gt0xX83O60YUrPZpiWfNtFzBA9Zawvl5qFcM3DMgtk1+ymX6YofopP5p677qsTSbbYD6PxdLLtQsV1atSZu2fpXg5uTZiv86v5PbPO0Iu2KVn9ss7P/4Np6BEGvdskK7afhhPa2Ip/SoQz1MOZ/E4u9xP7xRaLcapDLrIiWLGOglZr5R2giNRGQ0L1m8PnVEFqxjCRI4=; 4:WmQro7HVvbTREzckaibT8o+ZFx0Uxm/ObjNofABTMdcSPO0CDnruD9s3SYVYVtzuBLh7Q1MDePl6FAn7w3534tZLvPfSgCOLvccvA4frLOTPGb0JxBEiwhzk/hFBx+aKoxcGDj47S9pybokYYAVPFzXyOZCm9uEEPKdoLfnDxHyjPeQeJ3mzOm91vlP/qmwWACeUBCNx9+WrusGrTi+xcH3KdfK1uabFkkeQXGs/H0iHSDeSvzRru6CO07b9HpIHRv+7GpeJAJzlrxoNjnxwyA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001056)(6040501)(2401047)(8121501046)(5005006)(93006095)(10201501046)(3231101)(944501161)(3002001)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:BN6PR07MB3459; BCL:0; PCL:0; RULEID:; SRVR:BN6PR07MB3459; X-Forefront-PRVS: 0588B2BD96 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(346002)(39380400002)(396003)(39850400004)(366004)(199004)(189003)(16526019)(72206003)(386003)(81166006)(50466002)(478600001)(81156014)(8676002)(8936002)(26005)(6496006)(83506002)(16586007)(316002)(76176011)(33716001)(66066001)(58126008)(33656002)(47776003)(97736004)(52116002)(229853002)(7736002)(55016002)(5009440100003)(5660300001)(25786009)(4326008)(3846002)(6116002)(23726003)(1076002)(6246003)(33896004)(2906002)(105586002)(68736007)(305945005)(106356001)(53936002)(2950100002)(6666003)(42882006)(9686003)(18370500001)(107986001)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3459; H:ltp-pvn; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR07MB3459; 23:+IzRbYEzU2PtfcLZdk99zxgWOOij26LbuYIy3gQCU?= =?us-ascii?Q?A98ucn+e8DqWW9uzkbwmyhEoMkMACdj4DQ9VkZQ9zcIG/4KL6aKfUaxpFBjQ?= =?us-ascii?Q?8yhykKjNW3by7dKwOhV3xgAROasEWav4K9sA0ihFqiLDueZmzg34zX1LeU4Z?= =?us-ascii?Q?D0qo+jCD38P18DjGh0KagW4dl7DV3shkg3TJVMbcOpvUL8WdEsSzVe0Wm5Zj?= =?us-ascii?Q?DFUqhN4phB9lHpuErAY16q65bwpusry67uRDw1INlEBtYsjdAytXOMtdSGGB?= =?us-ascii?Q?RrARtnyv+HRXGAZ+TGt9MQ1SuxvBy2qPgsUYGENqiQRUBQ/hnaJGh+BT7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RisuveaLHYuSI2 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Feb 2018 09:15:38.9883 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 35564796-0c08-44a2-6b55-08d5777958c8 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3459 Subject: Re: [dpdk-dev] [PATCH 08/10] event/octeontx: add option to use fpavf as chunk pool 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: , X-List-Received-Date: Mon, 19 Feb 2018 09:15:42 -0000 Hi Santosh, On Sun, Feb 18, 2018 at 05:12:33PM +0530, santosh wrote: > Hi Pavan, > > > On Saturday 17 February 2018 03:06 AM, Pavan Nikhilesh wrote: > > Add compile-time configurable option to force TIMvf to use Octeontx > > FPAvf pool manager as its chunk pool. > > When FPAvf is used as pool manager the TIMvf automatically frees the > > chunks to FPAvf through gpool-id. > > > > Signed-off-by: Pavan Nikhilesh > > --- > > config/common_base | 1 + > > drivers/event/octeontx/timvf_evdev.c | 23 +++++++++++++++++++++++ > > drivers/event/octeontx/timvf_evdev.h | 3 +++ > > drivers/event/octeontx/timvf_worker.h | 35 +++++++++++++++++++++++++++++++++++ > > 4 files changed, 62 insertions(+) > > > > diff --git a/config/common_base b/config/common_base > > index ad03cf433..00010de92 100644 > > --- a/config/common_base > > +++ b/config/common_base > > @@ -562,6 +562,7 @@ CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV=y > > # Compile PMD for octeontx sso event device > > # > > CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF=y > > +CONFIG_RTE_PMD_OCTEONTX_TIMVF_USE_FPAVF=n > > > > How about using CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL? I think CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL is always enabled by default,using something like CONFIG_RTE_LIBRTE_TIMVF_USE_OCTEONTX_MEMPOOL be better? i.e telling TIMvf to specifically use fpa. > > > # > > # Compile PMD for OPDL event device > > diff --git a/drivers/event/octeontx/timvf_evdev.c b/drivers/event/octeontx/timvf_evdev.c > > index ffdfbb387..386eaa08f 100644 > > --- a/drivers/event/octeontx/timvf_evdev.c > > +++ b/drivers/event/octeontx/timvf_evdev.c > > @@ -162,10 +162,27 @@ timvf_ring_start(const struct rte_event_timer_adapter *adptr) > > 1ull << 48 | > > 1ull << 47 | > > 1ull << 44 | > > +#ifndef RTE_PMD_OCTEONTX_TIMVF_USE_FPAVF > > + 1ull << 43 | > > +#endif > > (timr->meta.nb_bkts - 1); > > > > rctrl.rctrl2 = (uint64_t)(TIM_CHUNK_SIZE / 16) << 40; > > > > +#ifdef RTE_PMD_OCTEONTX_TIMVF_USE_FPAVF > > + uintptr_t pool; > > + pool = (uintptr_t)((struct rte_mempool *) > > + timr->meta.chunk_pool)->pool_id; > > + ret = octeontx_fpa_bufpool_gpool(pool); > > + if (ret < 0) { > > + timvf_log_dbg("Unable to get gaura id"); > > + ret = -ENOMEM; > > + goto error; > > + } > > + timvf_write64((uint64_t)ret, > > + (uint8_t *)timr->vbar0 + TIM_VRING_AURA); > > +#endif > > + > > timvf_write64((uint64_t)timr->meta.bkt, > > (uint8_t *)timr->vbar0 + TIM_VRING_BASE); > > if (timvf_ring_conf_set(&rctrl, timr->tim_ring_id)) { > > @@ -296,9 +313,15 @@ timvf_ring_create(struct rte_event_timer_adapter *adptr) > > return -ENOMEM; > > } > > > > +#ifdef RTE_PMD_OCTEONTX_TIMVF_USE_FPAVF > > + ret = rte_mempool_set_ops_byname(timr->meta.chunk_pool, > > + "octeontx_fpavf", NULL); > > + timvf_log_dbg("Giving back chunks to fpa gaura : %d", ret); > > +#else > > ret = rte_mempool_set_ops_byname(timr->meta.chunk_pool, > > RTE_MBUF_DEFAULT_MEMPOOL_OPS, NULL); > > timvf_log_dbg("Not giving back chunks to fpa"); > > +#endif > > > > May be use rte_mbuf_best_mempool_ops Or rte_mbuf_user_mempool_ops, > that way avoid above ifdef. In timvf_worker.h the logic used to arm the event timer changes with the mempool used i.e. octeontx_fpavf has a different implementation vs ring. We could use rte_mbuf_best_mempool_ops() but again need check if the returned ops is fpa to enable automatic buffer recycling. > > Also a suggestion, Try to reduce ifdef by creating a new header file > called timvf_fpa_evdev.h, abstract all possible ifdefs their, > create small static inline API and call them in timvf eventdev driver. > [...] Agreed, will modify arm logic to reduce ifdef clutter. > > Thanks. > Thanks, Pavan.