From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by dpdk.org (Postfix) with ESMTP id 18D8A1DB3 for ; Mon, 30 Apr 2018 16:07:13 +0200 (CEST) Received: by mail-wr0-f193.google.com with SMTP id p18-v6so8176731wrm.1 for ; Mon, 30 Apr 2018 07:07:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MuWscrOdkgSQ3N/vXp35Mb9UTtMc/2P9PeGsukS0YNM=; b=a1hDTDx3OlWacNcrGwZcsA1FdXKpsSfDaQyD/j1wN6ibzzOkrOYGFabMuQJFfKzWxf MgFl/t9rJZUnWBsjMu2kYUpWAY+8hba9v6k9zMRKptnXuZ+iMeOJw5TdKlqNaVyQ+/Bx U2Tdl9TjqiCDlf2Qr7lLu4KYIA3NVPr6RmPf30xn4pO8nPpgAmt+ZQnXDGwddEczi30d +sPHvOjh8KAuzeUztu6rVceIGeaHe0bNgXg7BSBO8mcf6vJ/UU0Wg5XYH5U1FbmOkpHs o43e+PDucrYm0Ln3M04jZZdHuGEnIZK8stOU3jiKnSJfAJfC3waw2PIQ7OKUooDplF7g rFGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MuWscrOdkgSQ3N/vXp35Mb9UTtMc/2P9PeGsukS0YNM=; b=nCrODX1JkUtJjke/VzZqMx4CI+7VNYhaYrC66d5dC6q6uQoRMsYmc/yOlgMudPPdwW gojvTZnj013v11jgDqMqqgv/0LzGKT5Ixw4sEGh8cbq17lqjrarsBQFxCMoTuS2VxgAM 4DhQfaS3wKfchVz4Y0RTUo7JSY5MK5SZnFHWqzf9pkTziPzEEpVMlc6nM5sIajNF1bDE e7MpSS20dLKy1w44f9mIJLq7Hh4/WucRseBgulNtbDUUriR3PORe7Lj5lygHFMyCspgv bhIS/ibgaKMykHIF2Rjo4ub4UH011cLSmRn31NmIJ668211PpjhfDsMx8d+ibiSyHdvr YeOQ== X-Gm-Message-State: ALQs6tBPCZ+1ockiB11XhJe8w84+3gpJ5+Q1cjxkxUJspVGDgOfyvUkc LySfl1HISeU3pMjHMd46r7OjzhMBdHY= X-Google-Smtp-Source: AB8JxZq/P3ohk1WUjay4eWjhgIC1Td9sQUGFCWusf2g5MoNFRgVd72yMjbYmrNVj91+MA9Vxi9K10Q== X-Received: by 2002:adf:b937:: with SMTP id k52-v6mr9133416wrf.116.1525097232807; Mon, 30 Apr 2018 07:07:12 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id y81sm7532981wmd.31.2018.04.30.07.07.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 07:07:11 -0700 (PDT) From: luca.boccassi@gmail.com To: Radu Nicolau Cc: dpdk stable Date: Mon, 30 Apr 2018 15:03:08 +0100 Message-Id: <20180430140606.4615-30-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180430140606.4615-1-luca.boccassi@gmail.com> References: <20180430140606.4615-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'examples/exception_path: limit core count to 64' has been queued to stable release 18.02.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2018 14:07:13 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/02/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From bed667e509ac05765ee850f85fe28c1b8ca888e9 Mon Sep 17 00:00:00 2001 From: Radu Nicolau Date: Tue, 20 Feb 2018 12:05:57 +0000 Subject: [PATCH] examples/exception_path: limit core count to 64 [ upstream commit f93c7cd0823c2b268dda209e1ca8827e01900b3f ] Application doesn't support more that 64 lcores due to command line limitation of using a coremask that is parsed as a 64bit value, so changed it to reflect this limitation. Coverity issue: 30688 Fixes: af75078fece3 ("first public release") Signed-off-by: Radu Nicolau --- examples/exception_path/main.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/examples/exception_path/main.c b/examples/exception_path/main.c index 3e5b1e718..dda391cd5 100644 --- a/examples/exception_path/main.c +++ b/examples/exception_path/main.c @@ -41,13 +41,21 @@ #include #include +#ifndef APP_MAX_LCORE +#if (RTE_MAX_LCORE > 64) +#define APP_MAX_LCORE 64 +#else +#define APP_MAX_LCORE RTE_MAX_LCORE +#endif +#endif + /* Macros for printing using RTE_LOG */ #define RTE_LOGTYPE_APP RTE_LOGTYPE_USER1 #define FATAL_ERROR(fmt, args...) rte_exit(EXIT_FAILURE, fmt "\n", ##args) #define PRINT_INFO(fmt, args...) RTE_LOG(INFO, APP, fmt "\n", ##args) /* Max ports than can be used (each port is associated with two lcores) */ -#define MAX_PORTS (RTE_MAX_LCORE / 2) +#define MAX_PORTS (APP_MAX_LCORE / 2) /* Max size of a single packet */ #define MAX_PACKET_SZ (2048) @@ -101,7 +109,7 @@ static uint64_t input_cores_mask = 0; static uint64_t output_cores_mask = 0; /* Array storing port_id that is associated with each lcore */ -static uint16_t port_ids[RTE_MAX_LCORE]; +static uint16_t port_ids[APP_MAX_LCORE]; /* Structure type for recording lcore-specific stats */ struct stats { @@ -111,7 +119,7 @@ struct stats { } __rte_cache_aligned; /* Array of lcore-specific stats */ -static struct stats lcore_stats[RTE_MAX_LCORE]; +static struct stats lcore_stats[APP_MAX_LCORE]; /* Print out statistics on packets handled */ static void @@ -330,7 +338,9 @@ setup_port_lcore_affinities(void) uint16_t rx_port = 0; /* Setup port_ids[] array, and check masks were ok */ - RTE_LCORE_FOREACH(i) { + for (i = 0; i < APP_MAX_LCORE; i++) { + if (!rte_lcore_is_enabled(i)) + continue; if (input_cores_mask & (1ULL << i)) { /* Skip ports that are not enabled */ while ((ports_mask & (1 << rx_port)) == 0) { -- 2.14.2