DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yong Liu <yong.liu@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] rte_power: fix sample vm_power_mgr not work with Haswell cpus
Date: Tue,  7 Jul 2015 16:36:38 +0800	[thread overview]
Message-ID: <1436258198-9293-1-git-send-email-yong.liu@intel.com> (raw)

From: Marvin Liu <yong.liu@intel.com>

Two socket Haswell cpus on cottonwoodPass have 72 cores totally. And this
number oversize the default value of maximum core number 64.

Total number of channels should also increased for match core number.

Signed-off-by: Marvin Liu <yong.liu@intel.com>

diff --git a/examples/vm_power_manager/power_manager.h b/examples/vm_power_manager/power_manager.h
index 1b45bab..f8a680a 100644
--- a/examples/vm_power_manager/power_manager.h
+++ b/examples/vm_power_manager/power_manager.h
@@ -39,7 +39,7 @@ extern "C" {
 #endif
 
 /* Maximum number of CPUS to manage */
-#define POWER_MGR_MAX_CPUS 64
+#define POWER_MGR_MAX_CPUS RTE_MAX_LCORE
 /**
  * Initialize power management.
  * Initializes resources and verifies the number of CPUs on the system.
diff --git a/lib/librte_power/channel_commands.h b/lib/librte_power/channel_commands.h
index 7e78a8b..aac4668 100644
--- a/lib/librte_power/channel_commands.h
+++ b/lib/librte_power/channel_commands.h
@@ -41,17 +41,10 @@ extern "C" {
 #include <stdint.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 number of channels per VM */
-#define CHANNEL_CMDS_MAX_VM_CHANNELS 64
+#define CHANNEL_CMDS_MAX_CPUS           RTE_MAX_LCORE
 
 /* Maximum number of channels per VM */
-#define CHANNEL_CMDS_MAX_VM_CHANNELS 64
+#define CHANNEL_CMDS_MAX_VM_CHANNELS    RTE_MAX_LCORE
 
 /* Valid Commands */
 #define CPU_POWER               1
-- 
1.9.3

             reply	other threads:[~2015-07-07  8:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-07  8:36 Yong Liu [this message]
2015-07-10 12:24 ` Thomas Monjalon
2015-08-03 15:13   ` Thomas Monjalon
2015-08-06 10:27     ` De Lara Guarch, Pablo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1436258198-9293-1-git-send-email-yong.liu@intel.com \
    --to=yong.liu@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).