From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id B1B645960 for ; Thu, 6 Aug 2015 13:07:51 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 06 Aug 2015 04:07:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,622,1432623600"; d="scan'208";a="743369416" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga001.jf.intel.com with ESMTP; 06 Aug 2015 04:07:44 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t76B7hpr019775 for ; Thu, 6 Aug 2015 12:07:43 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id t76B7hN4016700 for ; Thu, 6 Aug 2015 12:07:43 +0100 Received: (from pdelarax@localhost) by sivswdev02.ir.intel.com with id t76B7haZ016696 for dev@dpdk.org; Thu, 6 Aug 2015 12:07:43 +0100 From: Pablo de Lara To: dev@dpdk.org Date: Thu, 6 Aug 2015 12:07:41 +0100 Message-Id: <1438859262-16655-2-git-send-email-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1438859262-16655-1-git-send-email-pablo.de.lara.guarch@intel.com> References: <1438859262-16655-1-git-send-email-pablo.de.lara.guarch@intel.com> Subject: [dpdk-dev] [PATCH 1/2] examples/vm_power_mgr: show warning when using systems with more than 64 cores X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Aug 2015 11:07:53 -0000 When using VM power manager app on systems with more than 64 cores, app could not run even though user does not use cores 64 or higher. The problem happens only in that case, in which case it will result in an undefined behaviour. Thefere, this patch allows the user to run the app on a system with more than 64 cores, warning the user not to use cores higher than 64 in the VM(s). Signed-off-by: Pablo de Lara --- examples/vm_power_manager/channel_manager.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/examples/vm_power_manager/channel_manager.c b/examples/vm_power_manager/channel_manager.c index 7d892e2..35ff40a 100644 --- a/examples/vm_power_manager/channel_manager.c +++ b/examples/vm_power_manager/channel_manager.c @@ -764,12 +764,11 @@ channel_manager_init(const char *path) } global_n_host_cpus = (unsigned)n_cpus; - if (global_n_host_cpus > CHANNEL_CMDS_MAX_CPUS) { - RTE_LOG(ERR, CHANNEL_MANAGER, "The number of host CPUs(%u) exceeds the " - "maximum of %u\n", global_n_host_cpus, CHANNEL_CMDS_MAX_CPUS); - goto error; - - } + if (global_n_host_cpus > CHANNEL_CMDS_MAX_CPUS) + RTE_LOG(WARNING, CHANNEL_MANAGER, "The number of host CPUs(%u) exceeds the " + "maximum of %u. No cores over %u should be used.\n", + global_n_host_cpus, CHANNEL_CMDS_MAX_CPUS, + CHANNEL_CMDS_MAX_CPUS - 1); return 0; error: -- 2.4.2