From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0064.outbound.protection.outlook.com [104.47.40.64]) by dpdk.org (Postfix) with ESMTP id 0354E2BF1 for ; Sun, 18 Feb 2018 12:42:52 +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=xBrizQ1TBJT771cPqBVXbNFgwlPgP9LHGJnO6ET3hjo=; b=gKhcXNPwI0NvKyMzpkR/n3rvAkhdGehTZyVFykB/PIEsFSQTgbqDxvWGVUnmKAtkVjjKk51u3YBOAe/oogC5tYrLaApgRWGr1ceBqRCmfAs8+2a50BHm9hcqfXw6DUa2MTy0pm71EknLnILRnavtqbwu0MAzDLDbqC/n+Kn3IU8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; Received: from [192.168.0.106] (103.76.56.167) by SN1PR0701MB1904.namprd07.prod.outlook.com (2a01:111:e400:517b::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.506.18; Sun, 18 Feb 2018 11:42:49 +0000 To: Pavan Nikhilesh , jerin.jacob@caviumnetworks.com, erik.g.carrillo@intel.com Cc: dev@dpdk.org References: <20180216213700.3415-1-pbhagavatula@caviumnetworks.com> <20180216213700.3415-9-pbhagavatula@caviumnetworks.com> From: santosh Message-ID: Date: Sun, 18 Feb 2018 17:12:33 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180216213700.3415-9-pbhagavatula@caviumnetworks.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [103.76.56.167] X-ClientProxiedBy: PN1PR0101CA0051.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:d::13) To SN1PR0701MB1904.namprd07.prod.outlook.com (2a01:111:e400:517b::30) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c93b9abf-d0e2-46b6-d2b4-08d576c4bd78 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:SN1PR0701MB1904; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0701MB1904; 3:5Te8IXKWdx4K5WSP8vrGYUjC6A5m7VPgd/4vouZwuY5Mlgfl815VJY3KKUiuA2bBke+0mYVcl1rbbr8whChFZAGC/VY+Og84YAuiClR7p+uqRhMa0rc0ZGDMxnZGbgJE6UUrajIjwteatlxhuNFgDDs4sfwyqYv7Rhd6ZHdK3aU4fw4SSuq9sSBOM34p3Jyee+HQfOQyK543OSAAa7XOJc8pbrYsuOcbK3RaElxY/H8Ya/wEzJ2ujCzUmEzosnn/; 25:qdAxrQCkHE8mcCPZmt3kKWRqmyQoYACc1LI2oPNkD4xhjfi1hTt14KJ92LLpzUwpFyTJZuX52f819dc6NCCJn0ZFkCrgw57QhppAirE0nYHGeA0zJE8Sx1U0qsqG7I1A5nhdBDuN/IgZSk6/mSRjWgoQmYsoW/NHCMrNj6v0L6+fuIwcJehpoa38pGEL7amhkvsjlI98dJ5c88t4EVFZj/hW8eGNEKUzfgIL6MtvWWFhdjdq77fBxaRkIPzM+wsa25/kPatnGdMuHgrAKZLcZrjawF2pez428aPPH7mrz4nvTGJPUZxPh2NXpESPFN2PJvEPoovbiaaTMLqnsqm2cg==; 31:TR9HUrq63AHZDcFEdh4AkTOg7zlznyd6G+NDgpduifi1tmZ1DmhzWkVo/CekT+z8J2R/7SpbC6qYrCEBHYwAGZ12KGpNRpTM1QnfnNAem74rLg48Dvp5iCP3ssEjTF8HvqKdr5MvoXmyF4VPXq18bG+14NhO1MKwq1/5kCANhhgd9jDVAlhETelDC0HFIQh7fpOcCiI0I20bruxMiN/dDSSNTj0ycePfQ+CT3qLT9R8= X-MS-TrafficTypeDiagnostic: SN1PR0701MB1904: X-Microsoft-Exchange-Diagnostics: 1; SN1PR0701MB1904; 20:EThcMaYw0Hcx/xdF+H9pnQG6LRi+aj9TqIN/qTAy46UM+fKgOsyFlofOdWCd750yCdk0HGF475AMSzweWsvqTqb5xoEBoL67K/coxXykd9OfxMwjoQhv6fgVqf8M57PcKPGfJeRx0IibSrb6QCGbms9ffVvtjvsQZ8rOu2yubuOmQN2dnlC2XOgYqqmtJ6M7mNS/Ahpuy3mMZg+QiKUOIj4Xtt1LtUD6gBVMo35X16m/UX1GufG5cxv47up+lJDzj5ZU9rXBLQvDxsbQ3X3MeD/IY8BGZ1sHlqNubWVyXWtsiZZmieKUUewivYNZ00HeZcmHd4Pnkqo5A0KOObrpvzd9kVbsEnAZEOzsU+VNLLx3nIv5ZVNuna2lAIJUL0kaS3bMq4fHgXIAP5QiicsOPC38oOSQ8lgcjga1vAN7adBjwvBV3ZVRQiwnLflDVpQrQOBHksU66k51G9AF4LsZ0xypcIiMKjtH3JobiRjJGrAGqyXCzcc0D6b3lobxhbj/OKR2kirffwO3XnIrn5MW44y+ggF5cpMgOKEMun626HX1sfS47TApQTvVX5ro1CUg6qEe/dbZW+HFJX8m478GSk1rXRVWpg5+fRTi5FpR3CM=; 4:4J0aWHHs57KZ+6JsZaFuTGOMlKZMk+AiW85zMq7ztlHVXza54UF6blcJDlfsdcYEjTKkeq1S//1vTQGh0+PdTDPlzrCIh3PdaUwbKIIlCghTlKX1ZiS7AIWI8MR14ZY4e/lodmQk41UKwcr2gDF1/bKe65fiucs6RwxHzV9GgBqFxmY019lOxURnHT17w207h4/RF882nnV+837gphukIYF7UzZ9kIRkX/EkDDWTNUbD8o/4tE4Gdd88CdqVt/aiqnRIUFSXpTrVo5B/Eua4AQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(93006095)(3002001)(10201501046)(3231101)(944501161)(6041288)(20161123560045)(20161123558120)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:SN1PR0701MB1904; BCL:0; PCL:0; RULEID:; SRVR:SN1PR0701MB1904; X-Forefront-PRVS: 058707456E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(346002)(366004)(376002)(39850400004)(396003)(39380400002)(189003)(199004)(52116002)(64126003)(66066001)(2906002)(47776003)(478600001)(53936002)(6246003)(65956001)(72206003)(65806001)(2486003)(36756003)(23676004)(68736007)(86152003)(52146003)(50466002)(25786009)(117156002)(7736002)(4326008)(305945005)(6116002)(42882006)(2950100002)(6666003)(65826007)(3846002)(6486002)(76176011)(229853002)(97736004)(8936002)(8676002)(81166006)(81156014)(5660300001)(31696002)(83506002)(316002)(106356001)(230700001)(16576012)(58126008)(186003)(26005)(16526019)(386003)(105586002)(77096007)(31686004); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0701MB1904; H:[192.168.0.106]; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtTTjFQUjA3MDFNQjE5MDQ7MjM6VGRSUkJFZGtDcE1DODIzcnVZTjVMZ2Fy?= =?utf-8?B?QWQxYm5IQ1pwblpza083QTdiRmY4TGFxZnYzTEFoTnNqRG9CTlRxMmFsbDlj?= =?utf-8?B?UHBFVVdqQmpTcitYM1FnZTlRWlNvUGpkZUg0NVpOdGhrRk1BbXlpMXpCVE9K?= =?utf-8?B?UTA3emMrRmZ4WElDWmhNNEY5eWlXMTFSYzVFOEZvL2JEUlJ1bWF5RndGWk8x?= =?utf-8?B?RUZ0dE1XblR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RFSsvkBpXVyr8MWeAx25vFjOMqiSqJnuyoZFPX2dGgKzAveYmHqi+b3+vzI8V0S8hyVrgMHmt/+3eGBxh3Xc0jbwqcJxD6VTB+9amBp1tvIS+FU+nxtOZPNU1iySFkLxoqDOZL22en1BosiwdNS3DnXyNnOsmArKRPCLebeM0aGMBEP4wecuRI/DW3pWgeA5Ye0N2tti5bFyjiKOzWpfG9I4AsMoMjQRR/4SA=; 5:SGbJT92X9q27Sw92yYun+DeHGRVjLju9CbSX1bgC64Iy4N+JhRLYTSwMzI55ECnO1cpw4jB7aq5OyHKYxC9jObfeWTN+CJ9MLEA9ko/TKnbZIpOR0ruOOCSQZYccreEEN3WfKaokdla0v2rYcwolnMOCRrFrZZuwt2xLwiWaw14=; 24:LAH3UuJBd6rd6ONIJVMb/Q4dFGo5xIzYVpeGgW38GkbAGjRqxcfdPDz0qkrcq27btEuMAzmRVONAOgwkbqXZZ2jj9KiUInrdZfSQPxdLTJ0=; 7:zDn9KDdH6BdQ42f6fLSehD/CnVzYRuBSCWkI69r4aJ/IwbsEmQX6pMq3fDz23tGZlP3YVG2hevU5IuaXp10gw/SMX5efqRdRS7ai8an7xtK8yZHsYmhv8JB/Hx5X+EKs4Ox3LHp/iiMN5UYyDnNylQlmQ1MrsuuiAqgrv1muxzbBFCHd4/U9UWeHrQXZ47lqI0KbayErKudUaysfphR3pTjpypjyQ8aaEA4obC/lKHzOqB/kot8bxyaGATfWjPpv SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Feb 2018 11:42:49.1490 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c93b9abf-d0e2-46b6-d2b4-08d576c4bd78 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR0701MB1904 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: Sun, 18 Feb 2018 11:42:53 -0000 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? > # > # 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. 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. [...] Thanks.