From patchwork Mon Jul 4 08:57:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Liu X-Patchwork-Id: 14521 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 8AA64379E; Mon, 4 Jul 2016 10:58:08 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 8477B2C10 for ; Mon, 4 Jul 2016 10:58:07 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 04 Jul 2016 01:58:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.26,574,1459839600"; d="scan'208"; a="1010500103" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 04 Jul 2016 01:58:05 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id u648w4LR003094; Mon, 4 Jul 2016 16:58:04 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u648w17J017283; Mon, 4 Jul 2016 16:58:03 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id u648w1I8017279; Mon, 4 Jul 2016 16:58:01 +0800 From: Marvin Liu To: dev@dpdk.org Cc: Marvin Liu Date: Mon, 4 Jul 2016 16:57:59 +0800 Message-Id: <1467622679-17247-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] examples/vm_power_manager: remove dependency on internal header file 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Macro CHANNEL_CMDS_MAX_CPUS stand for the maximum number of cores controlled by virtual channels. This macro only be used in the example, so remove it from library to example header file. Signed-off-by: Marvin Liu diff --git a/examples/vm_power_manager/channel_manager.h b/examples/vm_power_manager/channel_manager.h index 67e26ec..47c3b9c 100644 --- a/examples/vm_power_manager/channel_manager.h +++ b/examples/vm_power_manager/channel_manager.h @@ -41,7 +41,13 @@ extern "C" { #include #include #include -#include "channel_commands.h" + +/* Maximum number of CPUs */ +#define CHANNEL_CMDS_MAX_CPUS 64 +#if CHANNEL_CMDS_MAX_CPUS > 64 +#error Maximum number of cores is 64, overflow is guaranteed to \ + cause problems with VM Power Management +#endif /* Maximum name length including '\0' terminator */ #define CHANNEL_MGR_MAX_NAME_LEN 64 diff --git a/lib/librte_power/channel_commands.h b/lib/librte_power/channel_commands.h index de6d926..383897b 100644 --- a/lib/librte_power/channel_commands.h +++ b/lib/librte_power/channel_commands.h @@ -40,13 +40,6 @@ extern "C" { #include -/* Maximum number of CPUs */ -#define CHANNEL_CMDS_MAX_CPUS 64 -#if CHANNEL_CMDS_MAX_CPUS > 64 -#error Maximum number of cores is 64, overflow is guaranteed to \ - cause problems with VM Power Management -#endif - /* Maximum number of channels per VM */ #define CHANNEL_CMDS_MAX_VM_CHANNELS 64