From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by dpdk.org (Postfix) with ESMTP id 2804ADD2 for ; Tue, 1 May 2018 12:46:36 +0200 (CEST) Received: by mail-wm0-f67.google.com with SMTP id l1so18501304wmb.2 for ; Tue, 01 May 2018 03:46:36 -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=oiR08MDXm8zqcNDzcSPpLH2rJcVO6LeKrafBPjqRnS0=; b=ITfOTtY2GzuZoJmdQq6iwFXAUgiwxK1gtgFwZtCe/DDUZmFFrOrsV6jAwoTFOXzOiF lrEYhPxkxXy201r6rPhIt30qfOxh+XvGLuS/u10LVkv6Y/g0V7QMMCW46rTt02+69xzX Cb+b2Boj7fWfGCpHip1IeoZEsbjH/EOYO/XUk/mVBDWJWS7mzDoeCvdr8dsI7tqoxuzk 4RpNrmV7UG/6TiOA6mOh/tmB1LxmKqBlqy2vNkHTC/64ThinOWlTRo5C+0M6MVo+/dAo QCeR7dTzo+buxv0QHs9FQZkG2J1Z89K3jQ08tKkt4KWEK0J3aDwMpaQ8PPcu7W2Dvfet zGDA== 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=oiR08MDXm8zqcNDzcSPpLH2rJcVO6LeKrafBPjqRnS0=; b=SWNcQtoKbbO3+tkLDte8mEHWes2C7woNBAHm7c0dyJnxKcOajWuAK0kLpGXr4uaVQj 1DWngXWDIYovFSsKDWSKpj3fs2FLBTCpoK7SpcPoxR3a/eEkH5R56jmpiMZyJSVW2Ix1 rYr8jSDYmJoGQOKwhQPw4KNQ2UORJ8a1+UauRSURLahTrMyqVfby8HKqpS61gPe/PcSe CgWTqMngCDv+nAFC3gMfbm8WH7NK1397fczEHdtJwfOt6X/fLvSmNsf5bL2aXnY4Ky8Y dA9erWu43CH5gu9gsrvmd8Gr5xHqWl4w50NO99elxWp24kVaZNkisGosvrPeJ0NiPbzG d66g== X-Gm-Message-State: ALQs6tCNW7W/6OkBhJHu+UiSxKwWcctJTE/AZB6bxf9gufKvCaDEA1Rq czs6RdtswBfJc/NlS1PKBfU= X-Google-Smtp-Source: AB8JxZrDgUps+h6DNRU9IM8iH2Bj5hxUI93aJlq4bV5moNspdrmaXoENsbIA4/A4vr7iIeQu360Mkg== X-Received: by 10.28.111.87 with SMTP id k84mr8275420wmc.142.1525171595796; Tue, 01 May 2018 03:46:35 -0700 (PDT) Received: from localhost (slip139-92-244-193.lon.uk.prserv.net. [139.92.244.193]) by smtp.gmail.com with ESMTPSA id x70sm9699305wma.9.2018.05.01.03.46.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 May 2018 03:46:34 -0700 (PDT) From: luca.boccassi@gmail.com To: Radu Nicolau Cc: dpdk stable Date: Tue, 1 May 2018 11:44:26 +0100 Message-Id: <20180501104509.17238-3-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180501104509.17238-1-luca.boccassi@gmail.com> References: <20180501104509.17238-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'examples/exception_path: limit core count to 64' has been queued to LTS release 16.11.7 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: Tue, 01 May 2018 10:46:36 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.7 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/03/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 2667828c1bdb43cb66675ac13230ad9391564f30 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 331d2f484..e70549bee 100644 --- a/examples/exception_path/main.c +++ b/examples/exception_path/main.c @@ -71,13 +71,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) @@ -134,7 +142,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 uint8_t port_ids[RTE_MAX_LCORE]; +static uint8_t port_ids[APP_MAX_LCORE]; /* Structure type for recording lcore-specific stats */ struct stats { @@ -144,7 +152,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 @@ -339,7 +347,9 @@ setup_port_lcore_affinities(void) uint8_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