From patchwork Sun Aug 21 20:50:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dmitry Kozlyuk X-Patchwork-Id: 115310 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9AF6EA00C2; Sun, 21 Aug 2022 22:50:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2269342802; Sun, 21 Aug 2022 22:50:32 +0200 (CEST) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) by mails.dpdk.org (Postfix) with ESMTP id 404C9410F2; Sun, 21 Aug 2022 22:50:30 +0200 (CEST) Received: by mail-lj1-f176.google.com with SMTP id x10so8991818ljq.4; Sun, 21 Aug 2022 13:50:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=i8hZ1WoRhTgMwe8SULFUTQYn8es8Ngt4eu+LpQucJkw=; b=MaFoynL7JfQrozb66SC/f9u7aCRyVWWJ5sydFLbK6G225EiMumyVXE6HmasHZ36cRx 2k+0QQlmLvxeNrWU3drDotnz4rM7TRr4jNI6vn6DaK2AHp2YAAjbWfXUEdnxK4lQ86hk ke76MITGWMBeElC3hxJCxRm/H7eEzM2ZeAYFr5QbkyX7HAEjkajeHaijsYGCCuOAu2Hi qwnHl5A8+I3pu+/mvSZAoUYJ9LHAh2M1nFB7KbSkEQ2cHrX/JZui6HngQS5Ptyfitprq 4dduDnny5TZ9qMQsSkTb848WzHTZrlu299OnUATyERk4gWBZ10e2IEm6eWiWX7F9R4IA HlqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=i8hZ1WoRhTgMwe8SULFUTQYn8es8Ngt4eu+LpQucJkw=; b=MPeqnYzJA6XtxiWOulMq1yLsKePR42TPVeqqKs2Rkqm0rbYeqXuT76M0AU0b8eMyeK njX/+ApFWFUZIwFyKvy+qnmpHhaMKLALmjSgiVV/tW3d86Glqw0OMPDnyxnSwfeMci1j yniV98Zg8x/S+aFsDW1s76DWrBJZiyEGp5JZLVbDMaavqHj/7gRUcTKwPhqjDlFpcUC/ EMSgB8EAS02nmpi1ykkLt72wyOYkAqWEvtNnjQfmFVK+lELcJAhjfgDyYdfaTkTzHskj Wm9lAzzSo01+9FEnclHF0W4NYNjwi45Z2Ul1tlAaC1HDSAG8jsxZq3L7voYjI1bR25jV VhPg== X-Gm-Message-State: ACgBeo04i7tXlTa/KydI8oa1XE+P69+B2LiapVZVEywLQcsPt2V0hnsK NhvyHnx+oAWz3imKDFyzAz2QUWBJTcg= X-Google-Smtp-Source: AA6agR4MOv0hCMdkw4pZ5FXd/BTeqL3x1MME6g0nSAmjkG1QJ/6kr75SEywxQmu4VGaDozqwpbSMHA== X-Received: by 2002:a05:651c:103c:b0:25e:78dd:62fa with SMTP id w28-20020a05651c103c00b0025e78dd62famr4590012ljm.183.1661115029435; Sun, 21 Aug 2022 13:50:29 -0700 (PDT) Received: from sovereign.. (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id b17-20020a056512071100b00492c77c55ddsm1337897lfs.67.2022.08.21.13.50.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Aug 2022 13:50:28 -0700 (PDT) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Dmitry Kozlyuk , stable@dpdk.org Subject: [PATCH 1/3] eal: fix pointer arithmetic with an expression argument Date: Sun, 21 Aug 2022 23:50:07 +0300 Message-Id: <20220821205009.1317044-2-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220821205009.1317044-1-dmitry.kozliuk@gmail.com> References: <20220821205009.1317044-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org RTE_PTR_SUB(ptr, x) and RTE_PTR_ALIGN_FLOOR() worked incorrectly if "ptr" was an expression: uint32_t arr[3]; RTE_PTR_SUB(arr + 1, sizeof(arr[0])); // expected: (uint32_t *)((uintptr_t)(arr + 1) - 4) == arr // actual: (uint32_t *)((uintptr_t) arr + 1 - 4) != arr RTE_PTR_ALIGN_FLOOR(arr + 2, sizeof(arr[0])); // expected: RTE_ALIGN_FLOOR((uintptr_t)(arr + 2), 4) == &arr[2] // actual: RTE_ALIGN_FLOOR((uintptr_t) arr + 2, 4) == &arr[0] Fix the macros and extend the relevant unit test. Fixes: af75078fece3 ("first public release") Cc: stable@dpdk.org Signed-off-by: Dmitry Kozlyuk Reviewed-by: Morten Brørup --- app/test/test_common.c | 11 +++++++++++ lib/eal/include/rte_common.h | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/app/test/test_common.c b/app/test/test_common.c index ef177cecb1..4194c1208a 100644 --- a/app/test/test_common.c +++ b/app/test/test_common.c @@ -31,6 +31,7 @@ test_macros(int __rte_unused unused_parm) uintptr_t unused = 0; unsigned int smaller = SMALLER, bigger = BIGGER; + uint32_t arr[3]; RTE_SET_USED(unused); @@ -41,6 +42,16 @@ test_macros(int __rte_unused unused_parm) FAIL_MACRO(RTE_PTR_ADD); if ((uintptr_t)RTE_PTR_SUB(BIGGER, PTR_DIFF) != SMALLER) FAIL_MACRO(RTE_PTR_SUB); + if (RTE_PTR_ADD(arr + 1, sizeof(arr[0])) != &arr[2]) + FAIL_MACRO(RTE_PTR_ADD); + if (RTE_PTR_SUB(arr + 1, sizeof(arr[0])) != &arr[0]) + FAIL_MACRO(RTE_PTR_SUB); + if (RTE_PTR_ALIGN_FLOOR(arr + 2, 4) != &arr[2]) + FAIL_MACRO(RTE_PTR_ALIGN_FLOOR); + if (RTE_PTR_ALIGN_CEIL(arr + 2, 4) != &arr[2]) + FAIL_MACRO(RTE_PTR_ALIGN_CEIL); + if (RTE_PTR_ALIGN(arr + 2, 4) != &arr[2]) + FAIL_MACRO(RTE_PTR_ALIGN); if (RTE_PTR_DIFF(BIGGER, SMALLER) != PTR_DIFF) FAIL_MACRO(RTE_PTR_DIFF); if (RTE_MAX(SMALLER, BIGGER) != BIGGER) diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h index a96cc2a138..d517e9f75f 100644 --- a/lib/eal/include/rte_common.h +++ b/lib/eal/include/rte_common.h @@ -295,7 +295,7 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void) /** * subtract a byte-value offset from a pointer */ -#define RTE_PTR_SUB(ptr, x) ((void*)((uintptr_t)ptr - (x))) +#define RTE_PTR_SUB(ptr, x) ((void *)((uintptr_t)(ptr) - (x))) /** * get the difference between two pointer values, i.e. how far apart @@ -320,7 +320,7 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void) * must be a power-of-two value. */ #define RTE_PTR_ALIGN_FLOOR(ptr, align) \ - ((typeof(ptr))RTE_ALIGN_FLOOR((uintptr_t)ptr, align)) + ((typeof(ptr))RTE_ALIGN_FLOOR((uintptr_t)(ptr), align)) /** * Macro to align a value to a given power-of-two. The resultant value From patchwork Sun Aug 21 20:50:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dmitry Kozlyuk X-Patchwork-Id: 115311 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BA19EA00C2; Sun, 21 Aug 2022 22:50:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 30BDB42826; Sun, 21 Aug 2022 22:50:33 +0200 (CEST) Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by mails.dpdk.org (Postfix) with ESMTP id 3BDFD427FF for ; Sun, 21 Aug 2022 22:50:31 +0200 (CEST) Received: by mail-lf1-f48.google.com with SMTP id z6so12742929lfu.9 for ; Sun, 21 Aug 2022 13:50:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=2twvjwwKwC57/PTmEykq78tBahFNZnNst+W3DZOGlb8=; b=OiG+/NeFFDLB2NKixozlk412M3yAyYEXgQC9NoZrvtD85Q9SYXIrPZz796Cq7KjyTS kM+TZ8x8vFVufDUgsQgaJiGdcsKYBSudsqxvMlogGurPeAZoklQHvJbnv9lCoSziNES7 oY+zYPnMSQ5JE2MHhsk2uIhT66zPHiwg2GOeO/Qe6Ys0Jl/uPlw0gahQhPT4nhkGd8kQ 7MhVCgcaMcS+esVEPhRkjBy1PQLaDVpZoJWv7STz5ZwRTWYlhRR2AGJFSwk3mFVk9oq0 XRhx9f5rk3D7UAfYKo6CDQrp+ZbhJzU89SX/v4yifDlkdTwQUeZ5zXTTtahLGBg6y75O afFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=2twvjwwKwC57/PTmEykq78tBahFNZnNst+W3DZOGlb8=; b=DWz5cZfsmkcS0Ytcbp0QndkdthCNJBaIqgcLdnTk/xMW6oQ0E8Yhk/kd3wgxFzq8f7 gDl+724jHJ36gwM7UEAEEzp8Q9kyyliINlogmYUBueVoaTA9XyXFAHR0xESSmB0hpioZ q23BbCYMVVjxJQST5KGtIeGw+FUbWLt3CZI+C+9Ef1iLgCmAFiFaMP8+SaTO/1J0AB7h M/d705Bbs6cKQ5sxIEIekGSq4vgxWDCBy7HnvqV/Jn+8TOgPbDlnNzPut8E/JXKBqe0q gbE0fuVM0MPqpeN4tP6wXnFZplnbK/AUofPaUtvUYH5uGjojCCMNETFni58ZGqMCzh/5 0j9A== X-Gm-Message-State: ACgBeo268yngZviqOGVBiIdVcaHv0LiSaEXJV+upXHxj+30hr/cyfXUJ 3vW2z7+vIjhenLC4BKJ4R84APjEUt04= X-Google-Smtp-Source: AA6agR6iJH99srsKPlx8M+PcFWfBucap1CaVi5RBsyjw7yf1YHviSxwzWxmIDxyZH73Odr+qjgBWpg== X-Received: by 2002:a05:6512:1524:b0:48a:aff5:59d0 with SMTP id bq36-20020a056512152400b0048aaff559d0mr5592877lfb.122.1661115030468; Sun, 21 Aug 2022 13:50:30 -0700 (PDT) Received: from sovereign.. (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id b17-20020a056512071100b00492c77c55ddsm1337897lfs.67.2022.08.21.13.50.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Aug 2022 13:50:29 -0700 (PDT) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Dmitry Kozlyuk , Ray Kinsella Subject: [PATCH 2/3] eal: uninline rte_str_to_size Date: Sun, 21 Aug 2022 23:50:08 +0300 Message-Id: <20220821205009.1317044-3-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220821205009.1317044-1-dmitry.kozliuk@gmail.com> References: <20220821205009.1317044-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org There is no reason for rte_str_to_size() to be inline. Move the implementation out of . Export it as a stable ABI because it always has been public. Signed-off-by: Dmitry Kozlyuk Acked-by: Morten Brørup --- Now doesn't need to #include and , but removing them breaks some DPDK code, may break user code too. I'm not sure what is the compatibility policy in this regard. If such a breakage is allowed, I'd remove includes and fix DPDK code. lib/eal/common/eal_common_string_fns.c | 32 ++++++++++++++++++++++++++ lib/eal/include/rte_common.h | 30 ++---------------------- lib/eal/version.map | 1 + 3 files changed, 35 insertions(+), 28 deletions(-) diff --git a/lib/eal/common/eal_common_string_fns.c b/lib/eal/common/eal_common_string_fns.c index 0236ae4023..5fc4ee71dc 100644 --- a/lib/eal/common/eal_common_string_fns.c +++ b/lib/eal/common/eal_common_string_fns.c @@ -64,3 +64,35 @@ rte_strscpy(char *dst, const char *src, size_t dsize) rte_errno = E2BIG; return -rte_errno; } + +uint64_t +rte_str_to_size(const char *str) +{ + char *endptr; + unsigned long long size; + + while (isspace((int)*str)) + str++; + if (*str == '-') + return 0; + + errno = 0; + size = strtoull(str, &endptr, 0); + if (errno) + return 0; + + if (*endptr == ' ') + endptr++; /* allow 1 space gap */ + + switch (*endptr) { + case 'G': case 'g': + size *= 1024; /* fall-through */ + case 'M': case 'm': + size *= 1024; /* fall-through */ + case 'K': case 'k': + size *= 1024; /* fall-through */ + default: + break; + } + return size; +} diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h index d517e9f75f..772e40f8c2 100644 --- a/lib/eal/include/rte_common.h +++ b/lib/eal/include/rte_common.h @@ -875,34 +875,8 @@ rte_log2_u64(uint64_t v) * @return * Number. */ -static inline uint64_t -rte_str_to_size(const char *str) -{ - char *endptr; - unsigned long long size; - - while (isspace((int)*str)) - str++; - if (*str == '-') - return 0; - - errno = 0; - size = strtoull(str, &endptr, 0); - if (errno) - return 0; - - if (*endptr == ' ') - endptr++; /* allow 1 space gap */ - - switch (*endptr){ - case 'G': case 'g': size *= 1024; /* fall-through */ - case 'M': case 'm': size *= 1024; /* fall-through */ - case 'K': case 'k': size *= 1024; /* fall-through */ - default: - break; - } - return size; -} +uint64_t +rte_str_to_size(const char *str); /** * Function to terminate the application immediately, printing an error diff --git a/lib/eal/version.map b/lib/eal/version.map index 1f293e768b..773b0902c0 100644 --- a/lib/eal/version.map +++ b/lib/eal/version.map @@ -261,6 +261,7 @@ DPDK_23 { rte_socket_id; rte_socket_id_by_idx; rte_srand; + rte_str_to_size; rte_strerror; rte_strscpy; rte_strsplit; From patchwork Sun Aug 21 20:50:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dmitry Kozlyuk X-Patchwork-Id: 115312 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AA278A00C2; Sun, 21 Aug 2022 22:50:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1143F4282F; Sun, 21 Aug 2022 22:50:35 +0200 (CEST) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) by mails.dpdk.org (Postfix) with ESMTP id 8F3A24280E for ; Sun, 21 Aug 2022 22:50:32 +0200 (CEST) Received: by mail-lf1-f51.google.com with SMTP id d23so8399255lfl.13 for ; Sun, 21 Aug 2022 13:50:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=s2Hzop8zhB0NxiM0a7sDp+Tr2O/LmjiZDM+PeF2jAJ4=; b=ZkzRIQa82ZuFaBaS22FxQY3pcJ1e5JQT5BquSpY5lDDYdz9lG4AXFr55jtZEJFZOtF Y03HVXJKGQADBHV0ltzFaH00ZTYGllOtDye1GOcCALulCK66lUl5aOOCu8+Un/FpYWCh AYKnuMw8o7yQ+M7bEGBhDIXDbSmlNZYdh2g5wtQVKXWhSg3Hfd/bT5itOcacccEIQYWB HlREbzdS0TYXFogQYeE29Tny76T/cIUZeOC8VFMiPVdOXDADQhX45ZSJdEUJpd+9AQOF Jh2gSKuyV4lhGbJp8idKTQl9nvBu34/FyP+b9aMeGz5bedViphJrja0sMpmJIa5ci0jz 9S/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=s2Hzop8zhB0NxiM0a7sDp+Tr2O/LmjiZDM+PeF2jAJ4=; b=2wE0CFqypQ9bQ6ua2XgBxAI4h0PO8t0ZfvYHHlaYedpy/i+/wvwlUYoimSSUuiYCv2 dQLCkMdBMoNqxTfyo14GACxVI7n7dl98CuLBgh+nrtTkKVSkS23gol15tDEDMrTOjLQN lT6FTB1MeJrDxnYgMZNWnwm34BCjUSZgPE5UbahINXa93U0Qmb0Fb9VmAOj59DXDLqY/ pDAjQpylYb4oV7Tj/D1mUfYKLze96tKRUsp14hhTrGOXDzWC3HWgdAJuRpMPTjJeDZeg jyDr3gsTvB1RZkD6jbw7HiCA+jPZDF7Qldf26nONj0bN490Mhf0K1YpbaQek0ePjMCEh 991g== X-Gm-Message-State: ACgBeo3OtgqtrKN9aEl3SLbejBvHeIydMnltEJoxKzK1db85iqKSti/2 nP3rP01yT5tm++eq/T27OIm2Q42d8U8= X-Google-Smtp-Source: AA6agR7RRSHXqhOKvb3SiuNOduR1miLyDz6wuBMw+6ZOf2GV1/2jobdbE2LCJ5S+Q5B6BbvK73SuCQ== X-Received: by 2002:a05:6512:4026:b0:48b:e4d:6657 with SMTP id br38-20020a056512402600b0048b0e4d6657mr5657896lfb.449.1661115031757; Sun, 21 Aug 2022 13:50:31 -0700 (PDT) Received: from sovereign.. (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id b17-20020a056512071100b00492c77c55ddsm1337897lfs.67.2022.08.21.13.50.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Aug 2022 13:50:30 -0700 (PDT) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Dmitry Kozlyuk Subject: [PATCH 3/3] eal: deduplicate roundup code Date: Sun, 21 Aug 2022 23:50:09 +0300 Message-Id: <20220821205009.1317044-4-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220821205009.1317044-1-dmitry.kozliuk@gmail.com> References: <20220821205009.1317044-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org RTE_CACHE_LINE_ROUNDUP() implementation repeated RTE_ALIGN_MUL_CEIL(). In other places RTE_CACHE_LINE_SIZE is assumed to be a power-of-2, so define RTE_CACHE_LINE_ROUNDUP() using RTE_ALIGN_CEIL(). Signed-off-by: Dmitry Kozlyuk Reviewed-by: Morten Brørup --- lib/eal/include/rte_common.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h index 772e40f8c2..86c50c55e0 100644 --- a/lib/eal/include/rte_common.h +++ b/lib/eal/include/rte_common.h @@ -425,9 +425,7 @@ rte_is_aligned(void *ptr, unsigned align) #define RTE_CACHE_LINE_MASK (RTE_CACHE_LINE_SIZE-1) /** Return the first cache-aligned value greater or equal to size. */ -#define RTE_CACHE_LINE_ROUNDUP(size) \ - (RTE_CACHE_LINE_SIZE * ((size + RTE_CACHE_LINE_SIZE - 1) / \ - RTE_CACHE_LINE_SIZE)) +#define RTE_CACHE_LINE_ROUNDUP(size) RTE_ALIGN_CEIL(size, RTE_CACHE_LINE_SIZE) /** Cache line size in terms of log2 */ #if RTE_CACHE_LINE_SIZE == 64