From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0077.outbound.protection.outlook.com [104.47.34.77]) by dpdk.org (Postfix) with ESMTP id 5DD991BA49 for ; Mon, 9 Apr 2018 23:01:41 +0200 (CEST) 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=824lShMoajHoLIPy4QE7yAyj7vHsvxYUdSSVOp1H6pA=; b=GfML7ignQ3DOLfaBCcz1umGyBZGCH8YEZ95x+mDBicESj84+V7/RGKammfkTJ3XAknyaSp5pKEOE8TcStYOUHkL/FIuegpW5qu4qmU7xVnBsjdyLtPZ33gvGiPV17yq60zkF9It+GzAnPX02HT365xyT1/GokAt5EgBZqSlK134= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from localhost.localdomain (111.93.218.67) by MWHPR07MB3470.namprd07.prod.outlook.com (2603:10b6:301:63::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.653.12; Mon, 9 Apr 2018 21:01:37 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, santosh.shukla@caviumnetworks.com, erik.g.carrillo@intel.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Tue, 10 Apr 2018 02:30:32 +0530 Message-Id: <20180409210035.23278-9-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180409210035.23278-1-pbhagavatula@caviumnetworks.com> References: <20180216213700.3415-1-pbhagavatula@caviumnetworks.com> <20180409210035.23278-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BM1PR01CA0088.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1::28) To MWHPR07MB3470.namprd07.prod.outlook.com (2603:10b6:301:63::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6e60b700-dd4e-4f38-e42e-08d59e5d1725 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603328)(7153060)(7193020); SRVR:MWHPR07MB3470; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3470; 3:3375J1NAMMRSdt38XtfcIULi8nYVNuo2Cs2ZT0x/P2UzZJ7AvFxUBsWhuRpyDf/ZgKAyevoyySrBTylYMiUziZDxvgNFAVjbklMk19ujWWap2besQ1P63fgdObcM9J4F+RnzQXxL88bFiT/g1TFpr9PwDJJfy1iWf4iNHtMTr40sW1o1uzsdaUNuetCDgSHeKJw6INDA2F5hnW5fOmf49mY5NO3GynlacXMT4A0QCmVJOTr1YCOuZzR1mBWgTOjn; 25:K+74pDwgA2dU0yT7nz58yIjhPMSK3Szji84CfrZRrME+4ifuCy/M98jGAdci34X/VnQbJCR1kk3CLUQDVUsyMGr5gndZFoZnfge5XrmXvYF6GY8iqZ2ysaG7EG+b85fVKDBMETBc6HeBYFcN67ip/hYT+DPBMPc+B9XESCuwGuyrPCiZ1MFrHxWg8MVlqzfSBhlvfol0s8SPqJylznngC66NcEcR/7jTKFkRq2vUVUSjl3PNtv4ubo4XYjD35nHl+xLS68JQVqEu83i1uoQlsWzT0BGlL1tnbPVOa3IQ5jJOhLHwmPfh1rI5uwXj3g/j4nIY3JCAOcsAuMcHvWouew==; 31:029WOhccQyblqJqQbJFa2qNkWLXNVgD9aFNiYIPqasw5nAPfzav9M636D/PDPugPh7ndHXUg7ot6dXm2tzm6BNcwSb5Y7J2dNXZHyTcYqaUxHgVUXPjNmkGPWyErTURHN5mrLnknnlGPZjVZCPY43n36YDmxNHtIAQx3e16p298GsbiZB1kEgGnfkeCPlm4yndLZ986M3Il8Z40bPmrkQAFHQtBKWX5szM2rk+gFfXo= X-MS-TrafficTypeDiagnostic: MWHPR07MB3470: X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3470; 20:b9bO7TgICzdWzgYdgMkK11RV1qFGePUg9Wu0PHPGqBAnats7nY1p9EmtDbhxH4C231cTT9wxqSgSrlf+cgPrVPeVXSob0TQFUBV+iO0WHNjYSkrACxEdvpZhHNkSyFVeRcb5bRm+QMhofSsYGWPej3JrCCtPlFK6MRKQgR0169rOAYiszCcRaYECx3fE1oli5RbFtWTfii9hQjmh72200aoDqa/eQJqoxU9n9vQm3LkKI3BLunWEbBzX7WBu+yPuauRdEmmAsHOnujZrFIm0RDyVEPqU4YZjL7aQVyKGTLzSaqjlBzRQeRy4suQoEdn65wd1DR1KgVxtvdqJ/hteZZyBsf3t1iMe4a3IgLGnIUfuj5tTZnWE4ws4I7K08KVsJfgNP7TawD8ygAZsXNbwPKJSXDwqDjKEyLhywqvIezshrcdNNYZjYKPrTvlRZFyK7ZqfjGi1t26U1dOL7mt12vFx68xF4pxFM6ynKK2mcFYWn5XZ9sjzFYxXddhYStNKlC/OyekGtlHOzXHmuzeAqRxJcsUtqwvKMbPjDH1tMVPUjZQ6bkMfsMw+LLi4eWd6cjjmJEM+xbQwTQp3S9HPURKNbogMDacgR8IEnTW6qJI=; 4:5eLaKo+LKotuLlC3QqslMmcIg86rz6aDyeu51k1sFNFA/6oxohdVijFTUke8GfTPl967NnFiVwHYMFSWUYPkvMv5v8gW55f7+T/Qmia8rn2sLwWXHgGiuB45T9ZnfZlG9tUB1OyX0CSxxBDNQa8VqASVc1ykQ0Mh3ICu83GAy6cw7glVVPk2rxXGjwNBUfy81dj8e6yA7ZaSYGgS3DtSpPrDLQSqohm1KqQFlBlKdJP9h9dQfOO+V2LIcy3dp83GOW6NKPz9ozxo44JHvz4Lcw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501327)(52105095)(3002001)(10201501046)(93006095)(6041310)(20161123558120)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011); SRVR:MWHPR07MB3470; BCL:0; PCL:0; RULEID:; SRVR:MWHPR07MB3470; X-Forefront-PRVS: 0637FCE711 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(366004)(376002)(346002)(39860400002)(396003)(39380400002)(189003)(199004)(107886003)(48376002)(446003)(1857600001)(50466002)(97736004)(66066001)(2906002)(53936002)(6512007)(42882007)(59450400001)(81166006)(956004)(81156014)(25786009)(16526019)(6116002)(2616005)(476003)(5660300001)(6486002)(3846002)(11346002)(8936002)(26005)(50226002)(8676002)(486006)(47776003)(1076002)(6666003)(478600001)(105586002)(76176011)(68736007)(72206003)(7736002)(106356001)(5009440100003)(305945005)(4326008)(6506007)(316002)(16586007)(386003)(51416003)(52116002)(36756003)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR07MB3470; H:localhost.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR07MB3470; 23:5Pt5JpV4rTsYm+frLZ2YLss+RugmllGPvalDCaF6L?= =?us-ascii?Q?glkK5VGqX4CNkKKsLcag5OSemq228uaAH4kb3KZx43WJ6e0q/nkmUjt5Knls?= =?us-ascii?Q?PrHoeXm9NBqCnhhaT7vGVuVjgY/vQh9tDc/+msS21qyxvA/ZRZqQNhxIImG8?= =?us-ascii?Q?przDq6fyWuuHqsGN7dJPW+j+Y6nOjPL+qnmZdtxXlJjhuqEdh4gZViA9VOz3?= =?us-ascii?Q?Yypc9Ux/wU7bbCW8vgenGpJqTSe5IPQkTZExeyN7ccwIkmILatxZrTQgg9SI?= =?us-ascii?Q?DZANEH7S1Ytih9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bpTcDW/xrPnLrchVVtDveJV5947BMEx4Z7jzBxThFZhpOAZ/4=; 24:9OWNyeRQkX7j0FNwb4hlthjURAVQMwGWm+wli30zleRebQSuFaju58tL4ElwCWWDBbu5J95u0ETqm6/YrfeewgLFUpCNzqDhuEqm6cXG/Go= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3470; 7:Ym4JWGawFU3DmORJMBIw2YwuWDyPJ03WqpqWkS/3mz5a+PzseZYPT6I28MGuGPZniYm8O82qmdqPSB8BZDf0WUCqe6AN0XwhygDuwImvx8pNwynI9x8sBmzPMn2SjlYYPtd62srreL6XSht5YI9fd7gQcPC+WKFZ+D4E9tnhfnkgtPBLstg3Tq38YeS2bLpR+714X1QwTxNsYTwFdL0d+TtBxehB1WHmc0UHRta7iDMw+00oNHtxlGEv2Npqh24s X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2018 21:01:37.9518 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6e60b700-dd4e-4f38-e42e-08d59e5d1725 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR07MB3470 Subject: [dpdk-dev] [PATCH v4 08/11] event/octeontx: add burst mode for timer arm 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, 09 Apr 2018 21:01:42 -0000 Signed-off-by: Pavan Nikhilesh --- drivers/event/octeontx/timvf_evdev.c | 3 + drivers/event/octeontx/timvf_evdev.h | 7 ++ drivers/event/octeontx/timvf_worker.c | 53 +++++++++++++++ drivers/event/octeontx/timvf_worker.h | 95 +++++++++++++++++++++++++++ 4 files changed, 158 insertions(+) diff --git a/drivers/event/octeontx/timvf_evdev.c b/drivers/event/octeontx/timvf_evdev.c index 3b698b7c8..b54d8b84f 100644 --- a/drivers/event/octeontx/timvf_evdev.c +++ b/drivers/event/octeontx/timvf_evdev.c @@ -327,6 +327,9 @@ timvf_timer_adapter_caps_get(const struct rte_eventdev *dev, uint64_t flags, timvf_timer_arm_burst_mp_stats : timvf_timer_arm_burst_mp; + timvf_ops.arm_tmo_tick_burst = enable_stats ? + timvf_timer_arm_tmo_brst_stats : + timvf_timer_arm_tmo_brst; timvf_ops.cancel_burst = timvf_timer_cancel_burst; *caps = RTE_EVENT_TIMER_ADAPTER_CAP_INTERNAL_PORT; *ops = &timvf_ops; diff --git a/drivers/event/octeontx/timvf_evdev.h b/drivers/event/octeontx/timvf_evdev.h index 01ffac09a..2e905702f 100644 --- a/drivers/event/octeontx/timvf_evdev.h +++ b/drivers/event/octeontx/timvf_evdev.h @@ -207,6 +207,13 @@ uint16_t timvf_timer_arm_burst_mp(const struct rte_event_timer_adapter *adptr, uint16_t timvf_timer_arm_burst_mp_stats( const struct rte_event_timer_adapter *adptr, struct rte_event_timer **tim, const uint16_t nb_timers); +uint16_t timvf_timer_arm_tmo_brst(const struct rte_event_timer_adapter *adptr, + struct rte_event_timer **tim, const uint64_t timeout_tick, + const uint16_t nb_timers); +uint16_t timvf_timer_arm_tmo_brst_stats( + const struct rte_event_timer_adapter *adptr, + struct rte_event_timer **tim, const uint64_t timeout_tick, + const uint16_t nb_timers); void timvf_set_chunk_refill(struct timvf_ring * const timr); #endif /* __TIMVF_EVDEV_H__ */ diff --git a/drivers/event/octeontx/timvf_worker.c b/drivers/event/octeontx/timvf_worker.c index 52b212c44..02e17b6f5 100644 --- a/drivers/event/octeontx/timvf_worker.c +++ b/drivers/event/octeontx/timvf_worker.c @@ -137,6 +137,59 @@ timvf_timer_arm_burst_mp_stats(const struct rte_event_timer_adapter *adptr, return ret; } +uint16_t +timvf_timer_arm_tmo_brst(const struct rte_event_timer_adapter *adptr, + struct rte_event_timer **tim, const uint64_t timeout_tick, + const uint16_t nb_timers) +{ + int ret; + uint16_t set_timers = 0; + uint16_t idx; + uint16_t arr_idx = 0; + struct timvf_ring *timr = adptr->data->adapter_priv; + struct tim_mem_entry entry[TIMVF_MAX_BURST] __rte_cache_aligned; + + if (unlikely(!timeout_tick || timeout_tick >= timr->nb_bkts)) { + const enum rte_event_timer_state state = timeout_tick ? + RTE_EVENT_TIMER_ERROR_TOOLATE : + RTE_EVENT_TIMER_ERROR_TOOEARLY; + for (idx = 0; idx < nb_timers; idx++) + tim[idx]->state = state; + rte_errno = EINVAL; + return 0; + } + + while (arr_idx < nb_timers) { + for (idx = 0; idx < TIMVF_MAX_BURST && (arr_idx < nb_timers); + idx++, arr_idx++) { + timvf_format_event(tim[arr_idx], &entry[idx]); + } + ret = timvf_add_entry_brst(timr, timeout_tick, &tim[set_timers], + entry, idx); + set_timers += ret; + if (ret != idx) + break; + } + + return set_timers; +} + + +uint16_t +timvf_timer_arm_tmo_brst_stats(const struct rte_event_timer_adapter *adptr, + struct rte_event_timer **tim, const uint64_t timeout_tick, + const uint16_t nb_timers) +{ + uint16_t set_timers; + struct timvf_ring *timr = adptr->data->adapter_priv; + + set_timers = timvf_timer_arm_tmo_brst(adptr, tim, timeout_tick, + nb_timers); + timr->tim_arm_cnt += set_timers; + + return set_timers; +} + void timvf_set_chunk_refill(struct timvf_ring * const timr) { diff --git a/drivers/event/octeontx/timvf_worker.h b/drivers/event/octeontx/timvf_worker.h index c3a669de9..93254cd39 100644 --- a/drivers/event/octeontx/timvf_worker.h +++ b/drivers/event/octeontx/timvf_worker.h @@ -324,3 +324,98 @@ timvf_add_entry_mp(struct timvf_ring * const timr, const uint32_t rel_bkt, tim->state = RTE_EVENT_TIMER_ARMED; return 0; } + +static inline uint16_t +timvf_cpy_wrk(uint16_t index, uint16_t cpy_lmt, + struct tim_mem_entry *chunk, + struct rte_event_timer ** const tim, + const struct tim_mem_entry * const ents, + const struct tim_mem_bucket * const bkt) +{ + for (; index < cpy_lmt; index++) { + *chunk = *(ents + index); + tim[index]->impl_opaque[0] = (uintptr_t)chunk++; + tim[index]->impl_opaque[1] = (uintptr_t)bkt; + tim[index]->state = RTE_EVENT_TIMER_ARMED; + } + + return index; +} + +/* Burst mode functions */ +static inline int +timvf_add_entry_brst(struct timvf_ring * const timr, const uint16_t rel_bkt, + struct rte_event_timer ** const tim, + const struct tim_mem_entry *ents, + const uint16_t nb_timers) +{ + int16_t rem; + int16_t crem; + uint8_t lock_cnt; + uint16_t index = 0; + uint16_t chunk_remainder; + uint64_t lock_sema; + struct tim_mem_bucket *bkt; + struct tim_mem_entry *chunk; + +__retry: + bkt = timvf_get_target_bucket(timr, rel_bkt); + + /* Only one thread beyond this. */ + lock_sema = timr_bkt_inc_lock(bkt); + lock_cnt = (uint8_t) + ((lock_sema >> TIM_BUCKET_W1_S_LOCK) & TIM_BUCKET_W1_M_LOCK); + + if (lock_cnt) { + timr_bkt_dec_lock(bkt); + goto __retry; + } + + /* Bucket related checks. */ + if (unlikely(timr_bkt_get_hbt(lock_sema))) { + timr_bkt_dec_lock(bkt); + goto __retry; + } + + chunk_remainder = timr_bkt_fetch_rem(lock_sema); + rem = chunk_remainder - nb_timers; + if (rem < 0) { + crem = nb_chunk_slots - chunk_remainder; + if (chunk_remainder && crem) { + chunk = ((struct tim_mem_entry *) + (uintptr_t)bkt->current_chunk) + crem; + + index = timvf_cpy_wrk(index, chunk_remainder, + chunk, tim, ents, bkt); + timr_bkt_sub_rem(bkt, chunk_remainder); + timr_bkt_add_nent(bkt, chunk_remainder); + } + rem = nb_timers - chunk_remainder; + ents = ents + chunk_remainder; + + chunk = timr->refill_chunk(bkt, timr); + if (unlikely(chunk == NULL)) { + timr_bkt_dec_lock(bkt); + rte_errno = ENOMEM; + tim[index]->state = RTE_EVENT_TIMER_ERROR; + return crem; + } + *(uint64_t *)(chunk + nb_chunk_slots) = 0; + bkt->current_chunk = (uintptr_t) chunk; + + index = timvf_cpy_wrk(index, nb_timers, chunk, tim, ents, bkt); + timr_bkt_set_rem(bkt, nb_chunk_slots - rem); + timr_bkt_add_nent(bkt, rem); + } else { + chunk = (struct tim_mem_entry *)(uintptr_t)bkt->current_chunk; + chunk += (nb_chunk_slots - chunk_remainder); + + index = timvf_cpy_wrk(index, nb_timers, + chunk, tim, ents, bkt); + timr_bkt_sub_rem(bkt, nb_timers); + timr_bkt_add_nent(bkt, nb_timers); + } + + timr_bkt_dec_lock(bkt); + return nb_timers; +} -- 2.17.0