From patchwork Tue Oct 3 18:00:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 114706 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp2163524qgn; Tue, 3 Oct 2017 11:02:14 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBbrlJaLyXS/1pQd70dseLCOS1mDK3ItK59EPyyyRhad0qyIjODvfy6wY7ij5ImVnJTW47/ X-Received: by 10.55.59.131 with SMTP id i125mr4964607qka.93.1507053734308; Tue, 03 Oct 2017 11:02:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507053734; cv=none; d=google.com; s=arc-20160816; b=Zgd8t8r/c0m9pllsKq4PeqZ5cQ9w6XA9wF1haA8xrbKc5K6h7dfE8Fy5T61gIpmkj3 2JDAGssFttiJhYsjxLuu8GxrR+KaAj7lrnOLB1CpOdsT9Cf+Bou3wk/8NRjKNkfsIKDc DuuR4W6omcKvIux7b5NGFIxOuzSY/hDiTtOVwA68ITqtyYrWJGG2Lu3IaEURAwTd+KRv Sj/MBnJtpcsfpIOwUy0T7+QNzh1c7G/4oFPo76+94IO8BD74oXyg881YNZZ9GCG18ZpP UYJ4eVKlW0cTgVfKTr4Cr4cBmzIx3wofpwoBi26I2Bn7QELkRK3+kHuTprHtC5K2HJBr j5ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=Qnx2Ub89nzPGJ76IV62aMWgI5d2uBZGtkvauOpls7NU=; b=fy4w9faUeUKdwd6noYqy/XnT99Y7G7S5tm7RywK5DMfh+vogWaVwQ8Vt9E0Xrm4Q4A gw1jiwFc45F2S/BhZ1JVp5ECWmK3XUtfYnLGaUUHu/0wp0XKWgXqQOYkv8khfVJ7RuFH lQ5o+iIDXiDx9GP4DE7sdsJMK1Yh3mY3s83YY4ijN6L91PXm2Y1wQO+ZBeI30Yqizc5W GnvP4CqX09OdiSyvPz21nLIWcb1i/hyqnsuJ0oGP3Oh3HFwUA0u5Pl6u0FbeNrS3ASM2 1WHpWZOtvSeq5NF/TnSt8ZY3AT68rkPm2VIeCb7zn785CL8wMoVoWjD8MTJKEGn2/bFK ODvg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id d43si1735177qtf.179.2017.10.03.11.02.13; Tue, 03 Oct 2017 11:02:14 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id CC7F262DF4; Tue, 3 Oct 2017 18:02:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 32AD060893; Tue, 3 Oct 2017 18:01:58 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 20FEC60D4E; Tue, 3 Oct 2017 18:01:55 +0000 (UTC) Received: from forward100p.mail.yandex.net (forward100p.mail.yandex.net [77.88.28.100]) by lists.linaro.org (Postfix) with ESMTPS id 1348B60C6C for ; Tue, 3 Oct 2017 18:01:14 +0000 (UTC) Received: from mxback4o.mail.yandex.net (mxback4o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1e]) by forward100p.mail.yandex.net (Yandex) with ESMTP id A5A1E5104164 for ; Tue, 3 Oct 2017 21:01:12 +0300 (MSK) Received: from smtp2j.mail.yandex.net (smtp2j.mail.yandex.net [2a02:6b8:0:801::ac]) by mxback4o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id dzl824h6VO-1CrClKrl; Tue, 03 Oct 2017 21:01:12 +0300 Received: by smtp2j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id mHeFvvAoGz-16M8ZWrp; Tue, 03 Oct 2017 21:01:06 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 3 Oct 2017 21:00:02 +0300 Message-Id: <1507053605-3951-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507053605-3951-1-git-send-email-odpbot@yandex.ru> References: <1507053605-3951-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 205 Subject: [lng-odp] [PATCH v1 1/4] linux-gen: timer: drop odp prefix from odp_timer_pool_new X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Maxim Uvarov Internal static function does not need odp_ prefix. Signed-off-by: Maxim Uvarov --- /** Email created from pull request 205 (muvarov:master_timer_cleanup) ** https://github.com/Linaro/odp/pull/205 ** Patch: https://github.com/Linaro/odp/pull/205.patch ** Base sha: 052d2687930e5a99568e9349ca9704ae507e8dc5 ** Merge commit sha: 86cbffb9c3a034c900ff3e6f84ef68c62c9dfa29 **/ platform/linux-generic/odp_timer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/linux-generic/odp_timer.c b/platform/linux-generic/odp_timer.c index 3a8cfcddd..0a4fbb7e3 100644 --- a/platform/linux-generic/odp_timer.c +++ b/platform/linux-generic/odp_timer.c @@ -225,8 +225,8 @@ static inline odp_timer_t tp_idx_to_handle(struct odp_timer_pool_s *tp, static void itimer_init(odp_timer_pool *tp); static void itimer_fini(odp_timer_pool *tp); -static odp_timer_pool_t odp_timer_pool_new(const char *name, - const odp_timer_pool_param_t *param) +static odp_timer_pool_t timer_pool_new(const char *name, + const odp_timer_pool_param_t *param) { uint32_t tp_idx = odp_atomic_fetch_add_u32(&num_timer_pools, 1); if (odp_unlikely(tp_idx >= MAX_TIMER_POOLS)) { @@ -804,7 +804,7 @@ odp_timer_pool_create(const char *name, __odp_errno = EINVAL; return ODP_TIMER_POOL_INVALID; } - return odp_timer_pool_new(name, param); + return timer_pool_new(name, param); } void odp_timer_pool_start(void) From patchwork Tue Oct 3 18:00:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 114707 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp2164341qgn; Tue, 3 Oct 2017 11:02:56 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDB9L7gUtMmWB3jmZNl0ZUo43fnI8RG5kC/lL8EsBwcoSfy4KCN+bk2kgBIwad7Lpvecrax X-Received: by 10.55.36.74 with SMTP id w71mr21175361qkg.260.1507053775712; Tue, 03 Oct 2017 11:02:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507053775; cv=none; d=google.com; s=arc-20160816; b=Kfaq+zD2Ic606wQ8aKvaWmuo9upyqh8uEjnb8wwWoRmKbtMw+MDXbcYZ36EDE8RZIT Udc+mo/5mbwnCcoMlpIK8GycyOPwt3NHCdaIe4HriRCdYCveC/M9lNQxsL8iCegZY9SD 4kLZsphcg+ryu+VVQyr2OsX0aLNW3rOFcfLb73ngn3Yh5eWq7nuVgkKVfL/22+s9Kw8W KU8hg6uPdfA5yzSzBwojP0bOD0IZQEVCLfYZHWEYuTjQDWRJ+p3PhmbF31G1ZUiFIt0V uM/1tspUh+s4mC2KHCxm4wk4eYoclXOAc921X0njbaLQiRWAmNiFx3Hkm3PIFXX6N6ru BO6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=YiaxcjJXj4/Vhw93x44LGI9QI9OE/cy913TznOG+ZUk=; b=H68CxwkV5XsykXVUEE3P/fVojuMgGlbfwCmc3AR+de0RAGLUizDQT2AaeNuCvD8+Wg TByS5knYPesxDQW7n4106H5RGuP5rGZyDzp2Ye6JVjGZMVXutzYO8mQlT8nLMitH1BmI Y8oLb0WyQx0qtiomzbB0C+K2275PAqSiVyI07+C1EyF7pN1OP9sCvkTT2R4ndODMLZ39 NRc4KUfc9bZLX5gYcSaQydzDPsrc4RpA9rS9YyzUhWxhd+ZMYXE2wP7lT50iU/btQz/r CEFb66cQqCCcJRag/gFo4Ct/uyB+PGZGmWM5NDAGHGiNpsGBkzwfF9B5NdjzethKnqNW Io9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id o42si8371526qta.496.2017.10.03.11.02.55; Tue, 03 Oct 2017 11:02:55 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 4DC186445B; Tue, 3 Oct 2017 18:02:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id A3755607C6; Tue, 3 Oct 2017 18:02:01 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 30A9960C18; Tue, 3 Oct 2017 18:01:57 +0000 (UTC) Received: from forward102p.mail.yandex.net (forward102p.mail.yandex.net [77.88.28.102]) by lists.linaro.org (Postfix) with ESMTPS id B14AF60893 for ; Tue, 3 Oct 2017 18:01:20 +0000 (UTC) Received: from mxback3g.mail.yandex.net (mxback3g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:164]) by forward102p.mail.yandex.net (Yandex) with ESMTP id 3E26E4304EDF for ; Tue, 3 Oct 2017 21:01:19 +0300 (MSK) Received: from smtp2j.mail.yandex.net (smtp2j.mail.yandex.net [2a02:6b8:0:801::ac]) by mxback3g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id j6jOIoBbut-1Jj8kuPK; Tue, 03 Oct 2017 21:01:19 +0300 Received: by smtp2j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id mHeFvvAoGz-1CMuk1M0; Tue, 03 Oct 2017 21:01:12 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 3 Oct 2017 21:00:03 +0300 Message-Id: <1507053605-3951-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507053605-3951-1-git-send-email-odpbot@yandex.ru> References: <1507053605-3951-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 205 Subject: [lng-odp] [PATCH v1 2/4] linux-gen: timer: drop odp prefix from odp_timer_pool X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Maxim Uvarov internal data type should not be named with odp api prefix. Signed-off-by: Maxim Uvarov --- /** Email created from pull request 205 (muvarov:master_timer_cleanup) ** https://github.com/Linaro/odp/pull/205 ** Patch: https://github.com/Linaro/odp/pull/205.patch ** Base sha: 052d2687930e5a99568e9349ca9704ae507e8dc5 ** Merge commit sha: 86cbffb9c3a034c900ff3e6f84ef68c62c9dfa29 **/ platform/linux-generic/odp_timer.c | 61 +++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/platform/linux-generic/odp_timer.c b/platform/linux-generic/odp_timer.c index 0a4fbb7e3..cecbcead0 100644 --- a/platform/linux-generic/odp_timer.c +++ b/platform/linux-generic/odp_timer.c @@ -162,7 +162,7 @@ static inline void set_next_free(odp_timer *tim, uint32_t nf) } /****************************************************************************** - * odp_timer_pool abstract datatype + * _timer_pool_t abstract datatype * Inludes alloc and free timer *****************************************************************************/ @@ -186,18 +186,18 @@ typedef struct odp_timer_pool_s { pthread_t timer_thread; /* pthread_t of timer thread */ pid_t timer_thread_id; /* gettid() for timer thread */ int timer_thread_exit; /* request to exit for timer thread */ -} odp_timer_pool; +} _timer_pool_t; #define MAX_TIMER_POOLS 255 /* Leave one for ODP_TIMER_INVALID */ #define INDEX_BITS 24 static odp_atomic_u32_t num_timer_pools; -static odp_timer_pool *timer_pool[MAX_TIMER_POOLS]; +static _timer_pool_t *timer_pool[MAX_TIMER_POOLS]; -static inline odp_timer_pool *handle_to_tp(odp_timer_t hdl) +static inline _timer_pool_t *handle_to_tp(odp_timer_t hdl) { uint32_t tp_idx = _odp_typeval(hdl) >> INDEX_BITS; if (odp_likely(tp_idx < MAX_TIMER_POOLS)) { - odp_timer_pool *tp = timer_pool[tp_idx]; + _timer_pool_t *tp = timer_pool[tp_idx]; if (odp_likely(tp != NULL)) return timer_pool[tp_idx]; } @@ -222,8 +222,8 @@ static inline odp_timer_t tp_idx_to_handle(struct odp_timer_pool_s *tp, } /* Forward declarations */ -static void itimer_init(odp_timer_pool *tp); -static void itimer_fini(odp_timer_pool *tp); +static void itimer_init(_timer_pool_t *tp); +static void itimer_fini(_timer_pool_t *tp); static odp_timer_pool_t timer_pool_new(const char *name, const odp_timer_pool_param_t *param) @@ -235,7 +235,7 @@ static odp_timer_pool_t timer_pool_new(const char *name, __odp_errno = ENFILE; /* Table overflow */ return ODP_TIMER_POOL_INVALID; } - size_t sz0 = ROUNDUP_CACHE_LINE(sizeof(odp_timer_pool)); + size_t sz0 = ROUNDUP_CACHE_LINE(sizeof(_timer_pool_t)); size_t sz1 = ROUNDUP_CACHE_LINE(sizeof(tick_buf_t) * param->num_timers); size_t sz2 = ROUNDUP_CACHE_LINE(sizeof(odp_timer) * param->num_timers); odp_shm_t shm = odp_shm_reserve(name, sz0 + sz1 + sz2, @@ -243,7 +243,7 @@ static odp_timer_pool_t timer_pool_new(const char *name, if (odp_unlikely(shm == ODP_SHM_INVALID)) ODP_ABORT("%s: timer pool shm-alloc(%zuKB) failed\n", name, (sz0 + sz1 + sz2) / 1024); - odp_timer_pool *tp = (odp_timer_pool *)odp_shm_addr(shm); + _timer_pool_t *tp = (_timer_pool_t *)odp_shm_addr(shm); odp_atomic_init_u64(&tp->cur_tick, 0); if (name == NULL) { @@ -292,7 +292,7 @@ static void block_sigalarm(void) sigprocmask(SIG_BLOCK, &sigset, NULL); } -static void stop_timer_thread(odp_timer_pool *tp) +static void stop_timer_thread(_timer_pool_t *tp) { int ret; @@ -303,7 +303,7 @@ static void stop_timer_thread(odp_timer_pool *tp) ODP_ABORT("unable to join thread, err %d\n", ret); } -static void odp_timer_pool_del(odp_timer_pool *tp) +static void odp_timer_pool_del(_timer_pool_t *tp) { odp_spinlock_lock(&tp->lock); timer_pool[tp->tp_idx] = NULL; @@ -326,7 +326,7 @@ static void odp_timer_pool_del(odp_timer_pool *tp) odp_atomic_sub_u32(&num_timer_pools, 1); } -static inline odp_timer_t timer_alloc(odp_timer_pool *tp, +static inline odp_timer_t timer_alloc(_timer_pool_t *tp, odp_queue_t queue, void *user_ptr) { @@ -357,11 +357,11 @@ static inline odp_timer_t timer_alloc(odp_timer_pool *tp, return hdl; } -static odp_buffer_t timer_cancel(odp_timer_pool *tp, - uint32_t idx, - uint64_t new_state); +static odp_buffer_t timer_cancel(_timer_pool_t *tp, + uint32_t idx, + uint64_t new_state); -static inline odp_buffer_t timer_free(odp_timer_pool *tp, uint32_t idx) +static inline odp_buffer_t timer_free(_timer_pool_t *tp, uint32_t idx) { odp_timer *tim = &tp->timers[idx]; @@ -391,7 +391,7 @@ static inline odp_buffer_t timer_free(odp_timer_pool *tp, uint32_t idx) static bool timer_reset(uint32_t idx, uint64_t abs_tck, odp_buffer_t *tmo_buf, - odp_timer_pool *tp) + _timer_pool_t *tp) { bool success = true; tick_buf_t *tb = &tp->tick_buf[idx]; @@ -522,9 +522,9 @@ static bool timer_reset(uint32_t idx, return success; } -static odp_buffer_t timer_cancel(odp_timer_pool *tp, - uint32_t idx, - uint64_t new_state) +static odp_buffer_t timer_cancel(_timer_pool_t *tp, + uint32_t idx, + uint64_t new_state) { tick_buf_t *tb = &tp->tick_buf[idx]; odp_buffer_t old_buf; @@ -561,7 +561,7 @@ static odp_buffer_t timer_cancel(odp_timer_pool *tp, return old_buf; } -static unsigned timer_expire(odp_timer_pool *tp, uint32_t idx, uint64_t tick) +static unsigned timer_expire(_timer_pool_t *tp, uint32_t idx, uint64_t tick) { odp_timer *tim = &tp->timers[idx]; tick_buf_t *tb = &tp->tick_buf[idx]; @@ -677,7 +677,7 @@ static unsigned odp_timer_pool_expire(odp_timer_pool_t tpid, uint64_t tick) * Functions that use Linux/POSIX per-process timers and related facilities *****************************************************************************/ -static void timer_notify(odp_timer_pool *tp) +static void timer_notify(_timer_pool_t *tp) { int overrun; int64_t prev_tick; @@ -707,7 +707,7 @@ static void timer_notify(odp_timer_pool *tp) static void *timer_thread(void *arg) { - odp_timer_pool *tp = (odp_timer_pool *)arg; + _timer_pool_t *tp = (_timer_pool_t *)arg; sigset_t sigset; int ret; struct timespec tmo; @@ -737,7 +737,7 @@ static void *timer_thread(void *arg) return NULL; } -static void itimer_init(odp_timer_pool *tp) +static void itimer_init(_timer_pool_t *tp) { struct sigevent sigev; struct itimerspec ispec; @@ -782,7 +782,7 @@ static void itimer_init(odp_timer_pool *tp) strerror(errno)); } -static void itimer_fini(odp_timer_pool *tp) +static void itimer_fini(_timer_pool_t *tp) { if (timer_delete(tp->timerid) != 0) ODP_ABORT("timer_delete() returned error %s\n", @@ -868,7 +868,7 @@ odp_timer_t odp_timer_alloc(odp_timer_pool_t tpid, odp_event_t odp_timer_free(odp_timer_t hdl) { - odp_timer_pool *tp = handle_to_tp(hdl); + _timer_pool_t *tp = handle_to_tp(hdl); uint32_t idx = handle_to_idx(hdl, tp); odp_buffer_t old_buf = timer_free(tp, idx); return odp_buffer_to_event(old_buf); @@ -878,9 +878,10 @@ int odp_timer_set_abs(odp_timer_t hdl, uint64_t abs_tck, odp_event_t *tmo_ev) { - odp_timer_pool *tp = handle_to_tp(hdl); + _timer_pool_t *tp = handle_to_tp(hdl); uint32_t idx = handle_to_idx(hdl, tp); uint64_t cur_tick = odp_atomic_load_u64(&tp->cur_tick); + if (odp_unlikely(abs_tck < cur_tick + tp->min_rel_tck)) return ODP_TIMER_TOOEARLY; if (odp_unlikely(abs_tck > cur_tick + tp->max_rel_tck)) @@ -895,7 +896,7 @@ int odp_timer_set_rel(odp_timer_t hdl, uint64_t rel_tck, odp_event_t *tmo_ev) { - odp_timer_pool *tp = handle_to_tp(hdl); + _timer_pool_t *tp = handle_to_tp(hdl); uint32_t idx = handle_to_idx(hdl, tp); uint64_t abs_tck = odp_atomic_load_u64(&tp->cur_tick) + rel_tck; if (odp_unlikely(rel_tck < tp->min_rel_tck)) @@ -910,7 +911,7 @@ int odp_timer_set_rel(odp_timer_t hdl, int odp_timer_cancel(odp_timer_t hdl, odp_event_t *tmo_ev) { - odp_timer_pool *tp = handle_to_tp(hdl); + _timer_pool_t *tp = handle_to_tp(hdl); uint32_t idx = handle_to_idx(hdl, tp); /* Set the expiration tick of the timer to TMO_INACTIVE */ odp_buffer_t old_buf = timer_cancel(tp, idx, TMO_INACTIVE); @@ -949,7 +950,7 @@ int odp_timeout_fresh(odp_timeout_t tmo) { const odp_timeout_hdr_t *hdr = timeout_hdr(tmo); odp_timer_t hdl = hdr->timer; - odp_timer_pool *tp = handle_to_tp(hdl); + _timer_pool_t *tp = handle_to_tp(hdl); uint32_t idx = handle_to_idx(hdl, tp); tick_buf_t *tb = &tp->tick_buf[idx]; #if __GCC_ATOMIC_LLONG_LOCK_FREE < 2 From patchwork Tue Oct 3 18:00:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 114709 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp2166227qgn; Tue, 3 Oct 2017 11:04:34 -0700 (PDT) X-Google-Smtp-Source: AOwi7QD6Ra56EAlZdt6o071XzRIH40HEpQ8w/IHdYutm2vrzK4RADs8RsXjxv8b0suIOLvSMMtIc X-Received: by 10.200.36.24 with SMTP id c24mr25551226qtc.202.1507053873943; Tue, 03 Oct 2017 11:04:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507053873; cv=none; d=google.com; s=arc-20160816; b=aKVL3Y5SdlwgXcljjztAG+V1D612SAW6Eub41ndt8HnrjLf5Dg+HP719PuflpwsChn dQsHfW5nr4IFbEW996KMiUN8UAa98A3YbF+pys5kRnBfRKzIa7CxZlXxjkFd3VNSgfe6 Go5BZ6ior5slVH4Q66eP4XuoMifqwJBcEJrMwvXVClresiMMvro1HpOcJo6lze7NXzai Ky4EoSS23Ux6IEs4vat9E3v9DJ6ddP9Aq86NqhS4KhYwPWOEKu8ouJF1ZLKmU+B0DrgW 4k9BPd9v4cnNywjuFNXdvbR7ay3+vxfQn0roJ0AIV1c15mv+VJXNBPq+wm3vh2pOxhaY S1Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=RIi931A1n69L3W1qo16j/6b344z6Q5PghjatZK96ars=; b=07D6JhWzPjDKFV71oqxxTQBboDiGScbEIMDmxzBb1CzvU6zoBovHYxByTxTshY5PEM ANSrzS2SWMWz0qUeDjw8Z+P0NoeBJxQuziU2yQJzoMmxGJDaKnhzbGid2Qt2a4ED1l0a 8nux0n4iXqIIXQHP0k1Brsj/jAbR8MkTVRyRJnUYeqR8/GaOqGgETfsF2xmH1bFGbQVu x188lWpoK3Gzl/qIWPyqL4WxXyMqKXdgxoNa4MK6PdaCwClCdYnPeiuRDqSMg0zYmNSj jp6+o1tEjFlZiL0uhyqkt5cUgx9XI/CFOjDQ86vP3CgwVZv6NxxaQ8bUp3H0L0kzRhfQ pUXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id h23si2395833qth.500.2017.10.03.11.04.33; Tue, 03 Oct 2017 11:04:33 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 98C8960CA1; Tue, 3 Oct 2017 18:04:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 7E31860C29; Tue, 3 Oct 2017 18:02:06 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 8FB0260CA0; Tue, 3 Oct 2017 18:02:02 +0000 (UTC) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [37.140.190.180]) by lists.linaro.org (Postfix) with ESMTPS id 7D7EA60CC1 for ; Tue, 3 Oct 2017 18:01:27 +0000 (UTC) Received: from mxback9g.mail.yandex.net (mxback9g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:170]) by forward100o.mail.yandex.net (Yandex) with ESMTP id 20D5F2A23A7F for ; Tue, 3 Oct 2017 21:01:26 +0300 (MSK) Received: from smtp2j.mail.yandex.net (smtp2j.mail.yandex.net [2a02:6b8:0:801::ac]) by mxback9g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 6r1axZ7vn0-1PDeA3UE; Tue, 03 Oct 2017 21:01:26 +0300 Received: by smtp2j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id mHeFvvAoGz-1JMeCWR0; Tue, 03 Oct 2017 21:01:19 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 3 Oct 2017 21:00:04 +0300 Message-Id: <1507053605-3951-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507053605-3951-1-git-send-email-odpbot@yandex.ru> References: <1507053605-3951-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 205 Subject: [lng-odp] [PATCH v1 3/4] linux-gen: timer: drop odp prefix from odp_timer_pool_s X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Maxim Uvarov internal structure should not be named with odp_. Also make code a little bit more consistent to pass type instead of struct to 2 more functions. Signed-off-by: Maxim Uvarov --- /** Email created from pull request 205 (muvarov:master_timer_cleanup) ** https://github.com/Linaro/odp/pull/205 ** Patch: https://github.com/Linaro/odp/pull/205.patch ** Base sha: 052d2687930e5a99568e9349ca9704ae507e8dc5 ** Merge commit sha: 86cbffb9c3a034c900ff3e6f84ef68c62c9dfa29 **/ platform/linux-generic/include/odp/api/plat/timer_types.h | 4 ++-- platform/linux-generic/odp_timer.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/platform/linux-generic/include/odp/api/plat/timer_types.h b/platform/linux-generic/include/odp/api/plat/timer_types.h index a8891f11f..731921b99 100644 --- a/platform/linux-generic/include/odp/api/plat/timer_types.h +++ b/platform/linux-generic/include/odp/api/plat/timer_types.h @@ -24,9 +24,9 @@ extern "C" { * @{ **/ -struct odp_timer_pool_s; /**< Forward declaration */ +struct _timer_pool_s; /**< Forward declaration */ -typedef struct odp_timer_pool_s *odp_timer_pool_t; +typedef struct _timer_pool_s *odp_timer_pool_t; #define ODP_TIMER_POOL_INVALID NULL diff --git a/platform/linux-generic/odp_timer.c b/platform/linux-generic/odp_timer.c index cecbcead0..fb3b34bb4 100644 --- a/platform/linux-generic/odp_timer.c +++ b/platform/linux-generic/odp_timer.c @@ -166,7 +166,7 @@ static inline void set_next_free(odp_timer *tim, uint32_t nf) * Inludes alloc and free timer *****************************************************************************/ -typedef struct odp_timer_pool_s { +typedef struct _timer_pool_s { /* Put frequently accessed fields in the first cache line */ odp_atomic_u64_t cur_tick;/* Current tick value */ uint64_t min_rel_tck; @@ -205,7 +205,7 @@ static inline _timer_pool_t *handle_to_tp(odp_timer_t hdl) } static inline uint32_t handle_to_idx(odp_timer_t hdl, - struct odp_timer_pool_s *tp) + _timer_pool_t *tp) { uint32_t idx = _odp_typeval(hdl) & ((1U << INDEX_BITS) - 1U); __builtin_prefetch(&tp->tick_buf[idx], 0, 0); @@ -214,8 +214,8 @@ static inline uint32_t handle_to_idx(odp_timer_t hdl, ODP_ABORT("Invalid timer handle %#x\n", hdl); } -static inline odp_timer_t tp_idx_to_handle(struct odp_timer_pool_s *tp, - uint32_t idx) +static inline odp_timer_t tp_idx_to_handle(_timer_pool_t *tp, + uint32_t idx) { ODP_ASSERT(idx < (1U << INDEX_BITS)); return _odp_cast_scalar(odp_timer_t, (tp->tp_idx << INDEX_BITS) | idx); From patchwork Tue Oct 3 18:00:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 114708 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp2165255qgn; Tue, 3 Oct 2017 11:03:44 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAEJLljWGosDqhgfiiyCvZRm5KH0Rrpf+ml/qq0C9eZdOj4X+MdozK5gQy2nnPuxab63bTg X-Received: by 10.200.57.83 with SMTP id t19mr25413715qtb.150.1507053824400; Tue, 03 Oct 2017 11:03:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507053824; cv=none; d=google.com; s=arc-20160816; b=kxljUM97QKFOfNsgJs0CZNeZR1F6M957kzRu9WkApyJZDFevOWAQmH27tOPtTVSLm2 fiaZqM2STo2+Gq72w3Zqu24pCg9KukVtTNvMa2T8LRoOs34uePmGx3csOyztVFIOoIw7 MO8patDtmAp8HlKaNmacQ+KshwOSNzQDMK2/YTLw5Evd3qw2s1GkHdYXEEKYU/rlqxbf q0I1UTcg5pybqv4dvL/OGkBYhsqAIPI5pMDC53UOshOKhfyFLTZwzoygGqBilmAXpNzY U1juLi+9LEzg5b6QjGaM8Qn7DK3Hfj4GgqRsU/ma3RwQZIBjkGiXxLCYVENDVo7LRe09 2bdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=Q5CYpLEnYAts0/DD/8abpJDW5JcVLB3um8FMTJKXH7s=; b=dXrgug1vCUGQH6SmP3uSA7jHjCoqPg7TjQfqTKS2nCs6xGz22oa8mi+tutucdcMXKV QRUGi3bRO6vM+0BD28FZ0gwANYveWBdbg8zapldZFXDTuO24aeN0dGeM+TJzKHop9Tlz jJHfElh29TNLGv7A1AYjXHVixQhSaz7aiy3b1Jv+52Ggw6g/CeZ7wdMdAhJLBsRF8FfW 10Gd4XBlBMjXzq2r/yLUtaoptGoJ+DzFqWpmDGr2xRBHv0zPBssOC35ibyfqMvvTTQp0 GDqRkrvd6gLv06sXekQFhE5Jr4PCJJzUxlSZ5f3pGJ3JwuAmCUdanRWCtaraydD+x/PI P7aQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id q1si5225505qta.21.2017.10.03.11.03.44; Tue, 03 Oct 2017 11:03:44 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 1D77164459; Tue, 3 Oct 2017 18:03:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 2450C60C6C; Tue, 3 Oct 2017 18:02:04 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 87AE060CA0; Tue, 3 Oct 2017 18:01:59 +0000 (UTC) Received: from forward106j.mail.yandex.net (forward106j.mail.yandex.net [5.45.198.249]) by lists.linaro.org (Postfix) with ESMTPS id A81D4607B2 for ; Tue, 3 Oct 2017 18:01:52 +0000 (UTC) Received: from mxback8o.mail.yandex.net (mxback8o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::22]) by forward106j.mail.yandex.net (Yandex) with ESMTP id D81DF1804321 for ; Tue, 3 Oct 2017 21:01:50 +0300 (MSK) Received: from smtp2j.mail.yandex.net (smtp2j.mail.yandex.net [2a02:6b8:0:801::ac]) by mxback8o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id CEnLPrxOzX-1o8eE0ZN; Tue, 03 Oct 2017 21:01:50 +0300 Received: by smtp2j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id mHeFvvAoGz-1QMWfkGa; Tue, 03 Oct 2017 21:01:26 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 3 Oct 2017 21:00:05 +0300 Message-Id: <1507053605-3951-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507053605-3951-1-git-send-email-odpbot@yandex.ru> References: <1507053605-3951-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 205 Subject: [lng-odp] [PATCH v1 4/4] linux-gen: timer: drop odp prefix from odp_timer_s X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Maxim Uvarov Signed-off-by: Maxim Uvarov --- /** Email created from pull request 205 (muvarov:master_timer_cleanup) ** https://github.com/Linaro/odp/pull/205 ** Patch: https://github.com/Linaro/odp/pull/205.patch ** Base sha: 052d2687930e5a99568e9349ca9704ae507e8dc5 ** Merge commit sha: 86cbffb9c3a034c900ff3e6f84ef68c62c9dfa29 **/ platform/linux-generic/odp_timer.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/platform/linux-generic/odp_timer.c b/platform/linux-generic/odp_timer.c index fb3b34bb4..242bbad1c 100644 --- a/platform/linux-generic/odp_timer.c +++ b/platform/linux-generic/odp_timer.c @@ -116,15 +116,15 @@ ODP_ALIGNED(16) /* 16-byte atomic operations need properly aligned addresses */ ODP_STATIC_ASSERT(sizeof(tick_buf_t) == 16, "sizeof(tick_buf_t) == 16"); #endif -typedef struct odp_timer_s { +typedef struct _timer_s { void *user_ptr; odp_queue_t queue;/* Used for free list when timer is free */ -} odp_timer; +} _timer_t; -static void timer_init(odp_timer *tim, - tick_buf_t *tb, - odp_queue_t _q, - void *_up) +static void timer_init(_timer_t *tim, + tick_buf_t *tb, + odp_queue_t _q, + void *_up) { tim->queue = _q; tim->user_ptr = _up; @@ -140,7 +140,7 @@ static void timer_init(odp_timer *tim, } /* Teardown when timer is freed */ -static void timer_fini(odp_timer *tim, tick_buf_t *tb) +static void timer_fini(_timer_t *tim, tick_buf_t *tb) { ODP_ASSERT(tb->exp_tck.v == TMO_UNUSED); ODP_ASSERT(tb->tmo_buf == ODP_BUFFER_INVALID); @@ -148,13 +148,13 @@ static void timer_fini(odp_timer *tim, tick_buf_t *tb) tim->user_ptr = NULL; } -static inline uint32_t get_next_free(odp_timer *tim) +static inline uint32_t get_next_free(_timer_t *tim) { /* Reusing 'queue' for next free index */ return _odp_typeval(tim->queue); } -static inline void set_next_free(odp_timer *tim, uint32_t nf) +static inline void set_next_free(_timer_t *tim, uint32_t nf) { ODP_ASSERT(tim->queue == ODP_QUEUE_INVALID); /* Reusing 'queue' for next free index */ @@ -172,7 +172,7 @@ typedef struct _timer_pool_s { uint64_t min_rel_tck; uint64_t max_rel_tck; tick_buf_t *tick_buf; /* Expiration tick and timeout buffer */ - odp_timer *timers; /* User pointer and queue handle (and lock) */ + _timer_t *timers; /* User pointer and queue handle (and lock) */ odp_atomic_u32_t high_wm;/* High watermark of allocated timers */ odp_spinlock_t lock; uint32_t num_alloc;/* Current number of allocated timers */ @@ -237,7 +237,7 @@ static odp_timer_pool_t timer_pool_new(const char *name, } size_t sz0 = ROUNDUP_CACHE_LINE(sizeof(_timer_pool_t)); size_t sz1 = ROUNDUP_CACHE_LINE(sizeof(tick_buf_t) * param->num_timers); - size_t sz2 = ROUNDUP_CACHE_LINE(sizeof(odp_timer) * param->num_timers); + size_t sz2 = ROUNDUP_CACHE_LINE(sizeof(_timer_t) * param->num_timers); odp_shm_t shm = odp_shm_reserve(name, sz0 + sz1 + sz2, ODP_CACHE_LINE_SIZE, ODP_SHM_SW_ONLY); if (odp_unlikely(shm == ODP_SHM_INVALID)) @@ -337,7 +337,7 @@ static inline odp_timer_t timer_alloc(_timer_pool_t *tp, /* Remove first unused timer from free list */ ODP_ASSERT(tp->first_free != tp->param.num_timers); uint32_t idx = tp->first_free; - odp_timer *tim = &tp->timers[idx]; + _timer_t *tim = &tp->timers[idx]; tp->first_free = get_next_free(tim); /* Initialize timer */ timer_init(tim, &tp->tick_buf[idx], queue, user_ptr); @@ -363,7 +363,7 @@ static odp_buffer_t timer_cancel(_timer_pool_t *tp, static inline odp_buffer_t timer_free(_timer_pool_t *tp, uint32_t idx) { - odp_timer *tim = &tp->timers[idx]; + _timer_t *tim = &tp->timers[idx]; /* Free the timer by setting timer state to unused and * grab any timeout buffer */ @@ -563,7 +563,7 @@ static odp_buffer_t timer_cancel(_timer_pool_t *tp, static unsigned timer_expire(_timer_pool_t *tp, uint32_t idx, uint64_t tick) { - odp_timer *tim = &tp->timers[idx]; + _timer_t *tim = &tp->timers[idx]; tick_buf_t *tb = &tp->tick_buf[idx]; odp_buffer_t tmo_buf = ODP_BUFFER_INVALID; uint64_t exp_tck; @@ -691,7 +691,7 @@ static void timer_notify(_timer_pool_t *tp) } } - odp_timer *array = &tp->timers[0]; + _timer_t *array = &tp->timers[0]; uint32_t i; /* Prefetch initial cache lines (match 32 above) */ for (i = 0; i < 32; i += ODP_CACHE_LINE_SIZE / sizeof(array[0]))