DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: david.hunt@intel.com
Cc: dev@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>
Subject: [dpdk-dev] [RFC PATCH 2/4] power: add namespace prefix to public header elements
Date: Fri,  3 May 2019 15:08:59 +0100	[thread overview]
Message-ID: <20190503140901.59064-3-bruce.richardson@intel.com> (raw)
Message-ID: <20190503140859.TclZxJ9UxmIVQAHuX5lIikvz4vPXnlpD9LaGsU6Z5kA@z> (raw)
In-Reply-To: <20190503140901.59064-1-bruce.richardson@intel.com>

Now that the rte_channel_commands.h header file is public, we need to
ensure that all structs and defines there start with an rte_ prefix - in
many cases, with an rte_power prefix.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/vm_power_manager/channel_monitor.c   | 72 +++++++++----------
 examples/vm_power_manager/channel_monitor.h   |  8 +--
 examples/vm_power_manager/guest_cli/main.c    |  2 +-
 .../guest_cli/vm_power_cli_guest.c            | 10 +--
 .../guest_cli/vm_power_cli_guest.h            |  4 +-
 examples/vm_power_manager/main.c              |  2 +-
 lib/librte_power/guest_channel.c              |  6 +-
 lib/librte_power/guest_channel.h              |  4 +-
 lib/librte_power/power_kvm_vm.c               | 14 ++--
 lib/librte_power/rte_channel_commands.h       | 66 ++++++++---------
 10 files changed, 94 insertions(+), 94 deletions(-)

diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c
index 9ae90c63f..0643e2d6c 100644
--- a/examples/vm_power_manager/channel_monitor.c
+++ b/examples/vm_power_manager/channel_monitor.c
@@ -104,7 +104,7 @@ str_to_ether_addr(const char *a, struct ether_addr *ether_addr)
 }
 
 static int
-set_policy_mac(struct channel_packet *pkt, int idx, char *mac)
+set_policy_mac(struct rte_power_channel_pkt *pkt, int idx, char *mac)
 {
 	union PFID pfid;
 	int ret;
@@ -131,20 +131,20 @@ set_policy_mac(struct channel_packet *pkt, int idx, char *mac)
 
 
 static int
-parse_json_to_pkt(json_t *element, struct channel_packet *pkt)
+parse_json_to_pkt(json_t *element, struct rte_power_channel_pkt *pkt)
 {
 	const char *key;
 	json_t *value;
 	int ret;
 
-	memset(pkt, 0, sizeof(struct channel_packet));
+	memset(pkt, 0, sizeof(struct rte_power_channel_pkt));
 
 	pkt->nb_mac_to_monitor = 0;
 	pkt->t_boost_status.tbEnabled = false;
 	pkt->workload = LOW;
-	pkt->policy_to_use = TIME;
+	pkt->policy_to_use = RTE_POWER_TIME;
 	pkt->command = PKT_POLICY;
-	pkt->core_type = CORE_TYPE_PHYSICAL;
+	pkt->core_type = RTE_POWER_CORE_TYPE_PHYSICAL;
 
 	json_object_foreach(element, key, value) {
 		if (!strcmp(key, "policy")) {
@@ -178,13 +178,13 @@ parse_json_to_pkt(json_t *element, struct channel_packet *pkt)
 			char command[32];
 			strlcpy(command, json_string_value(value), 32);
 			if (!strcmp(command, "TIME")) {
-				pkt->policy_to_use = TIME;
+				pkt->policy_to_use = RTE_POWER_TIME;
 			} else if (!strcmp(command, "TRAFFIC")) {
-				pkt->policy_to_use = TRAFFIC;
+				pkt->policy_to_use = RTE_POWER_TRAFFIC;
 			} else if (!strcmp(command, "WORKLOAD")) {
-				pkt->policy_to_use = WORKLOAD;
+				pkt->policy_to_use = RTE_POWER_WORKLOAD;
 			} else if (!strcmp(command, "BRANCH_RATIO")) {
-				pkt->policy_to_use = BRANCH_RATIO;
+				pkt->policy_to_use = RTE_POWER_BRANCH_RATIO;
 			} else {
 				RTE_LOG(ERR, CHANNEL_MONITOR,
 					"Wrong policy_type received in JSON\n");
@@ -254,17 +254,17 @@ parse_json_to_pkt(json_t *element, struct channel_packet *pkt)
 			char unit[32];
 			strlcpy(unit, json_string_value(value), 32);
 			if (!strcmp(unit, "SCALE_UP")) {
-				pkt->unit = CPU_POWER_SCALE_UP;
+				pkt->unit = RTE_POWER_CPU_SCALE_UP;
 			} else if (!strcmp(unit, "SCALE_DOWN")) {
-				pkt->unit = CPU_POWER_SCALE_DOWN;
+				pkt->unit = RTE_POWER_CPU_SCALE_DOWN;
 			} else if (!strcmp(unit, "SCALE_MAX")) {
-				pkt->unit = CPU_POWER_SCALE_MAX;
+				pkt->unit = RTE_POWER_CPU_SCALE_MAX;
 			} else if (!strcmp(unit, "SCALE_MIN")) {
-				pkt->unit = CPU_POWER_SCALE_MIN;
+				pkt->unit = RTE_POWER_CPU_SCALE_MIN;
 			} else if (!strcmp(unit, "ENABLE_TURBO")) {
-				pkt->unit = CPU_POWER_ENABLE_TURBO;
+				pkt->unit = RTE_POWER_CPU_ENABLE_TURBO;
 			} else if (!strcmp(unit, "DISABLE_TURBO")) {
-				pkt->unit = CPU_POWER_DISABLE_TURBO;
+				pkt->unit = RTE_POWER_CPU_DISABLE_TURBO;
 			} else {
 				RTE_LOG(ERR, CHANNEL_MONITOR,
 					"Invalid command received in JSON\n");
@@ -330,7 +330,7 @@ pcpu_monitor(struct policy *pol, struct core_info *ci, int pcpu, int count)
 {
 	int ret = 0;
 
-	if (pol->pkt.policy_to_use == BRANCH_RATIO) {
+	if (pol->pkt.policy_to_use == RTE_POWER_BRANCH_RATIO) {
 		ci->cd[pcpu].oob_enabled = 1;
 		ret = add_core_to_monitor(pcpu);
 		if (ret == 0)
@@ -370,7 +370,7 @@ get_pcpu_to_control(struct policy *pol)
 	 * differenciate between them when adding them to the branch monitor.
 	 * Virtual cores need to be converted to physical cores.
 	 */
-	if (pol->pkt.core_type == CORE_TYPE_VIRTUAL) {
+	if (pol->pkt.core_type == RTE_POWER_CORE_TYPE_VIRTUAL) {
 		/*
 		 * If the cores in the policy are virtual, we need to map them
 		 * to physical core. We look up the vm info and use that for
@@ -422,7 +422,7 @@ get_pfid(struct policy *pol)
 }
 
 static int
-update_policy(struct channel_packet *pkt)
+update_policy(struct rte_power_channel_pkt *pkt)
 {
 
 	unsigned int updated = 0;
@@ -438,7 +438,7 @@ update_policy(struct channel_packet *pkt)
 			policies[i].pkt = *pkt;
 			get_pcpu_to_control(&policies[i]);
 			/* Check Eth dev only for Traffic policy */
-			if (policies[i].pkt.policy_to_use == TRAFFIC) {
+			if (policies[i].pkt.policy_to_use == RTE_POWER_TRAFFIC) {
 				if (get_pfid(&policies[i]) < 0) {
 					updated = 1;
 					break;
@@ -455,7 +455,7 @@ update_policy(struct channel_packet *pkt)
 				policies[i].pkt = *pkt;
 				get_pcpu_to_control(&policies[i]);
 				/* Check Eth dev only for Traffic policy */
-				if (policies[i].pkt.policy_to_use == TRAFFIC) {
+				if (policies[i].pkt.policy_to_use == RTE_POWER_TRAFFIC) {
 					if (get_pfid(&policies[i]) < 0) {
 						updated = 1;
 						break;
@@ -471,7 +471,7 @@ update_policy(struct channel_packet *pkt)
 }
 
 static int
-remove_policy(struct channel_packet *pkt __rte_unused)
+remove_policy(struct rte_power_channel_pkt *pkt __rte_unused)
 {
 	int i;
 
@@ -568,7 +568,7 @@ apply_time_profile(struct policy *pol)
 	/* Format the date and time, down to a single second. */
 	strftime(time_string, sizeof(time_string), "%Y-%m-%d %H:%M:%S", ptm);
 
-	for (x = 0; x < HOURS; x++) {
+	for (x = 0; x < RTE_HOURS_PER_DAY; x++) {
 
 		if (ptm->tm_hour == pol->pkt.timer_policy.busy_hours[x]) {
 			for (count = 0; count < pol->pkt.num_vcpu; count++) {
@@ -626,19 +626,19 @@ static void
 apply_policy(struct policy *pol)
 {
 
-	struct channel_packet *pkt = &pol->pkt;
+	struct rte_power_channel_pkt *pkt = &pol->pkt;
 
 	/*Check policy to use*/
-	if (pkt->policy_to_use == TRAFFIC)
+	if (pkt->policy_to_use == RTE_POWER_TRAFFIC)
 		apply_traffic_profile(pol);
-	else if (pkt->policy_to_use == TIME)
+	else if (pkt->policy_to_use == RTE_POWER_TIME)
 		apply_time_profile(pol);
-	else if (pkt->policy_to_use == WORKLOAD)
+	else if (pkt->policy_to_use == RTE_POWER_WORKLOAD)
 		apply_workload_profile(pol);
 }
 
 static int
-process_request(struct channel_packet *pkt, struct channel_info *chan_info)
+process_request(struct rte_power_channel_pkt *pkt, struct channel_info *chan_info)
 {
 	int ret;
 
@@ -652,7 +652,7 @@ process_request(struct channel_packet *pkt, struct channel_info *chan_info)
 	if (pkt->command == CPU_POWER) {
 		unsigned int core_num;
 
-		if (pkt->core_type == CORE_TYPE_VIRTUAL)
+		if (pkt->core_type == RTE_POWER_CORE_TYPE_VIRTUAL)
 			core_num = get_pcpu(chan_info, pkt->resource_id);
 		else
 			core_num = pkt->resource_id;
@@ -661,22 +661,22 @@ process_request(struct channel_packet *pkt, struct channel_info *chan_info)
 			core_num);
 
 		switch (pkt->unit) {
-		case(CPU_POWER_SCALE_MIN):
+		case(RTE_POWER_CPU_SCALE_MIN):
 			power_manager_scale_core_min(core_num);
 			break;
-		case(CPU_POWER_SCALE_MAX):
+		case(RTE_POWER_CPU_SCALE_MAX):
 			power_manager_scale_core_max(core_num);
 			break;
-		case(CPU_POWER_SCALE_DOWN):
+		case(RTE_POWER_CPU_SCALE_DOWN):
 			power_manager_scale_core_down(core_num);
 			break;
-		case(CPU_POWER_SCALE_UP):
+		case(RTE_POWER_CPU_SCALE_UP):
 			power_manager_scale_core_up(core_num);
 			break;
-		case(CPU_POWER_ENABLE_TURBO):
+		case(RTE_POWER_CPU_ENABLE_TURBO):
 			power_manager_enable_turbo_core(core_num);
 			break;
-		case(CPU_POWER_DISABLE_TURBO):
+		case(RTE_POWER_CPU_DISABLE_TURBO):
 			power_manager_disable_turbo_core(core_num);
 			break;
 		default:
@@ -765,7 +765,7 @@ channel_monitor_init(void)
 static void
 read_binary_packet(struct channel_info *chan_info)
 {
-	struct channel_packet pkt;
+	struct rte_power_channel_pkt pkt;
 	void *buffer = &pkt;
 	int buffer_len = sizeof(pkt);
 	int n_bytes, err = 0;
@@ -796,7 +796,7 @@ read_binary_packet(struct channel_info *chan_info)
 static void
 read_json_packet(struct channel_info *chan_info)
 {
-	struct channel_packet pkt;
+	struct rte_power_channel_pkt pkt;
 	int n_bytes, ret;
 	json_t *root;
 	json_error_t error;
diff --git a/examples/vm_power_manager/channel_monitor.h b/examples/vm_power_manager/channel_monitor.h
index a8bc9a4f1..1a8e8c212 100644
--- a/examples/vm_power_manager/channel_monitor.h
+++ b/examples/vm_power_manager/channel_monitor.h
@@ -18,11 +18,11 @@ struct core_share {
 };
 
 struct policy {
-	struct channel_packet pkt;
-	uint32_t pfid[MAX_VFS];
-	uint32_t port[MAX_VFS];
+	struct rte_power_channel_pkt pkt;
+	uint32_t pfid[RTE_POWER_MAX_VFS];
+	uint32_t port[RTE_POWER_MAX_VFS];
 	unsigned int enabled;
-	struct core_share core_share[MAX_VCPU_PER_VM];
+	struct core_share core_share[RTE_POWER_MAX_VCPU_PER_VM];
 };
 
 #ifdef __cplusplus
diff --git a/examples/vm_power_manager/guest_cli/main.c b/examples/vm_power_manager/guest_cli/main.c
index 36365b124..4f748a759 100644
--- a/examples/vm_power_manager/guest_cli/main.c
+++ b/examples/vm_power_manager/guest_cli/main.c
@@ -48,7 +48,7 @@ parse_args(int argc, char **argv)
 		{ "policy", required_argument, 0, 'o'},
 		{NULL, 0, 0, 0}
 	};
-	struct channel_packet *policy;
+	struct rte_power_channel_pkt *policy;
 	unsigned short int hours[MAX_HOURS];
 	unsigned short int cores[MAX_VCPU_PER_VM];
 	unsigned short int ports[MAX_VCPU_PER_VM];
diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
index 2d9e7689a..cb7f5ff02 100644
--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
@@ -38,9 +38,9 @@ union PFID {
 	uint64_t pfid;
 };
 
-static struct channel_packet policy;
+static struct rte_power_channel_pkt policy;
 
-struct channel_packet *
+struct rte_power_channel_pkt *
 get_policy(void)
 {
 	return &policy;
@@ -49,7 +49,7 @@ get_policy(void)
 int
 set_policy_mac(int port, int idx)
 {
-	struct channel_packet *policy;
+	struct rte_power_channel_pkt *policy;
 	union PFID pfid;
 
 	/* Use port MAC address as the vfid */
@@ -67,7 +67,7 @@ set_policy_mac(int port, int idx)
 }
 
 void
-set_policy_defaults(struct channel_packet *pkt)
+set_policy_defaults(struct rte_power_channel_pkt *pkt)
 {
 	set_policy_mac(0, 0);
 	pkt->nb_mac_to_monitor = 1;
@@ -185,7 +185,7 @@ struct cmd_send_policy_result {
 };
 
 static inline int
-send_policy(struct channel_packet *pkt)
+send_policy(struct rte_power_channel_pkt *pkt)
 {
 	int ret;
 
diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h
index fd77f6a69..d38d90690 100644
--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h
+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h
@@ -11,11 +11,11 @@ extern "C" {
 
 #include "channel_commands.h"
 
-struct channel_packet *get_policy(void);
+struct rte_power_channel_pkt *get_policy(void);
 
 int set_policy_mac(int port, int idx);
 
-void set_policy_defaults(struct channel_packet *pkt);
+void set_policy_defaults(struct rte_power_channel_pkt *pkt);
 
 void run_cli(__attribute__((unused)) void *arg);
 
diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
index 5fa13fe62..fbe9d6299 100644
--- a/examples/vm_power_manager/main.c
+++ b/examples/vm_power_manager/main.c
@@ -373,7 +373,7 @@ main(int argc, char **argv)
 					"Cannot init port %"PRIu8 "\n",
 					portid);
 
-			for (w = 0; w < MAX_VFS; w++) {
+			for (w = 0; w < RTE_POWER_MAX_VFS; w++) {
 				eth.addr_bytes[5] = w + 0xf0;
 
 				ret = -ENOTSUP;
diff --git a/lib/librte_power/guest_channel.c b/lib/librte_power/guest_channel.c
index bb35fecec..722f7dda4 100644
--- a/lib/librte_power/guest_channel.c
+++ b/lib/librte_power/guest_channel.c
@@ -25,7 +25,7 @@ int
 guest_channel_host_connect(const char *path, unsigned int lcore_id)
 {
 	int flags, ret;
-	struct channel_packet pkt;
+	struct rte_power_channel_pkt pkt;
 	char fd_path[PATH_MAX];
 	int fd = -1;
 
@@ -89,7 +89,7 @@ guest_channel_host_connect(const char *path, unsigned int lcore_id)
 }
 
 int
-guest_channel_send_msg(struct channel_packet *pkt, unsigned int lcore_id)
+guest_channel_send_msg(struct rte_power_channel_pkt *pkt, unsigned int lcore_id)
 {
 	int ret, buffer_len = sizeof(*pkt);
 	void *buffer = pkt;
@@ -119,7 +119,7 @@ guest_channel_send_msg(struct channel_packet *pkt, unsigned int lcore_id)
 	return 0;
 }
 
-int rte_power_guest_channel_send_msg(struct channel_packet *pkt,
+int rte_power_guest_channel_send_msg(struct rte_power_channel_pkt *pkt,
 			unsigned int lcore_id)
 {
 	return guest_channel_send_msg(pkt, lcore_id);
diff --git a/lib/librte_power/guest_channel.h b/lib/librte_power/guest_channel.h
index 6219063d3..804743a76 100644
--- a/lib/librte_power/guest_channel.h
+++ b/lib/librte_power/guest_channel.h
@@ -48,7 +48,7 @@ void guest_channel_host_disconnect(unsigned int lcore_id);
  *  - Negative on channel not connected.
  *  - errno on write to channel error.
  */
-int guest_channel_send_msg(struct channel_packet *pkt, unsigned int lcore_id);
+int guest_channel_send_msg(struct rte_power_channel_pkt *pkt, unsigned int lcore_id);
 
 /**
  * Send a message contained in pkt over the Virtio-Serial to the host endpoint.
@@ -63,7 +63,7 @@ int guest_channel_send_msg(struct channel_packet *pkt, unsigned int lcore_id);
  *  - 0 on success.
  *  - Negative on error.
  */
-int rte_power_guest_channel_send_msg(struct channel_packet *pkt,
+int rte_power_guest_channel_send_msg(struct rte_power_channel_pkt *pkt,
 			unsigned int lcore_id);
 
 #ifdef __cplusplus
diff --git a/lib/librte_power/power_kvm_vm.c b/lib/librte_power/power_kvm_vm.c
index 1c60551a4..259b68801 100644
--- a/lib/librte_power/power_kvm_vm.c
+++ b/lib/librte_power/power_kvm_vm.c
@@ -13,7 +13,7 @@
 
 #define FD_PATH "/dev/virtio-ports/virtio.serial.port.poweragent"
 
-static struct channel_packet pkt[RTE_MAX_LCORE];
+static struct rte_power_channel_pkt pkt[RTE_MAX_LCORE];
 
 
 int
@@ -85,25 +85,25 @@ send_msg(unsigned int lcore_id, uint32_t scale_direction)
 int
 power_kvm_vm_freq_up(unsigned int lcore_id)
 {
-	return send_msg(lcore_id, CPU_POWER_SCALE_UP);
+	return send_msg(lcore_id, RTE_POWER_CPU_SCALE_UP);
 }
 
 int
 power_kvm_vm_freq_down(unsigned int lcore_id)
 {
-	return send_msg(lcore_id, CPU_POWER_SCALE_DOWN);
+	return send_msg(lcore_id, RTE_POWER_CPU_SCALE_DOWN);
 }
 
 int
 power_kvm_vm_freq_max(unsigned int lcore_id)
 {
-	return send_msg(lcore_id, CPU_POWER_SCALE_MAX);
+	return send_msg(lcore_id, RTE_POWER_CPU_SCALE_MAX);
 }
 
 int
 power_kvm_vm_freq_min(unsigned int lcore_id)
 {
-	return send_msg(lcore_id, CPU_POWER_SCALE_MIN);
+	return send_msg(lcore_id, RTE_POWER_CPU_SCALE_MIN);
 }
 
 int
@@ -116,13 +116,13 @@ power_kvm_vm_turbo_status(__attribute__((unused)) unsigned int lcore_id)
 int
 power_kvm_vm_enable_turbo(unsigned int lcore_id)
 {
-	return send_msg(lcore_id, CPU_POWER_ENABLE_TURBO);
+	return send_msg(lcore_id, RTE_POWER_CPU_ENABLE_TURBO);
 }
 
 int
 power_kvm_vm_disable_turbo(unsigned int lcore_id)
 {
-	return send_msg(lcore_id, CPU_POWER_DISABLE_TURBO);
+	return send_msg(lcore_id, RTE_POWER_CPU_DISABLE_TURBO);
 }
 
 struct rte_power_core_capabilities;
diff --git a/lib/librte_power/rte_channel_commands.h b/lib/librte_power/rte_channel_commands.h
index eca8ff70c..d4681ef19 100644
--- a/lib/librte_power/rte_channel_commands.h
+++ b/lib/librte_power/rte_channel_commands.h
@@ -19,62 +19,62 @@ extern "C" {
 #define PKT_POLICY_REMOVE       4
 
 /* CPU Power Command Scaling */
-#define CPU_POWER_SCALE_UP      1
-#define CPU_POWER_SCALE_DOWN    2
-#define CPU_POWER_SCALE_MAX     3
-#define CPU_POWER_SCALE_MIN     4
-#define CPU_POWER_ENABLE_TURBO  5
-#define CPU_POWER_DISABLE_TURBO 6
-#define HOURS 24
+#define RTE_POWER_CPU_SCALE_UP      1
+#define RTE_POWER_CPU_SCALE_DOWN    2
+#define RTE_POWER_CPU_SCALE_MAX     3
+#define RTE_POWER_CPU_SCALE_MIN     4
+#define RTE_POWER_CPU_ENABLE_TURBO  5
+#define RTE_POWER_CPU_DISABLE_TURBO 6
+#define RTE_HOURS_PER_DAY 24
 
-#define MAX_VFS 10
-#define VM_MAX_NAME_SZ 32
+#define RTE_POWER_MAX_VFS 10
+#define RTE_POWER_VM_MAX_NAME_SZ 32
 
-#define MAX_VCPU_PER_VM         8
+#define RTE_POWER_MAX_VCPU_PER_VM         8
 
-struct t_boost_status {
+struct rte_power_t_boost_status {
 	bool tbEnabled;
 };
 
-struct timer_profile {
-	int busy_hours[HOURS];
-	int quiet_hours[HOURS];
-	int hours_to_use_traffic_profile[HOURS];
+struct rte_power_timer_profile {
+	int busy_hours[RTE_HOURS_PER_DAY];
+	int quiet_hours[RTE_HOURS_PER_DAY];
+	int hours_to_use_traffic_profile[RTE_HOURS_PER_DAY];
 };
 
-enum workload {HIGH, MEDIUM, LOW};
-enum policy_to_use {
-	TRAFFIC,
-	TIME,
-	WORKLOAD,
-	BRANCH_RATIO
+enum rte_power_workload {HIGH, MEDIUM, LOW};
+enum rte_power_policy_to_use {
+	RTE_POWER_TRAFFIC,
+	RTE_POWER_TIME,
+	RTE_POWER_WORKLOAD,
+	RTE_POWER_BRANCH_RATIO
 };
 
-struct traffic {
+struct rte_power_channel_traffic {
 	uint32_t min_packet_thresh;
 	uint32_t avg_max_packet_thresh;
 	uint32_t max_max_packet_thresh;
 };
 
-#define CORE_TYPE_VIRTUAL 0
-#define CORE_TYPE_PHYSICAL 1
+#define RTE_POWER_CORE_TYPE_VIRTUAL 0
+#define RTE_POWER_CORE_TYPE_PHYSICAL 1
 
-struct channel_packet {
+struct rte_power_channel_pkt {
 	uint64_t resource_id; /**< core_num, device */
 	uint32_t unit;        /**< scale down/up/min/max */
 	uint32_t command;     /**< Power, IO, etc */
-	char vm_name[VM_MAX_NAME_SZ];
+	char vm_name[RTE_POWER_VM_MAX_NAME_SZ];
 
-	uint64_t vfid[MAX_VFS];
+	uint64_t vfid[RTE_POWER_MAX_VFS];
 	int nb_mac_to_monitor;
-	struct traffic traffic_policy;
-	uint8_t vcpu_to_control[MAX_VCPU_PER_VM];
+	struct rte_power_channel_traffic traffic_policy;
+	uint8_t vcpu_to_control[RTE_POWER_MAX_VCPU_PER_VM];
 	uint8_t num_vcpu;
-	struct timer_profile timer_policy;
+	struct rte_power_timer_profile timer_policy;
 	bool core_type;
-	enum workload workload;
-	enum policy_to_use policy_to_use;
-	struct t_boost_status t_boost_status;
+	enum rte_power_workload workload;
+	enum rte_power_policy_to_use policy_to_use;
+	struct rte_power_t_boost_status t_boost_status;
 };
 
 
-- 
2.20.1


  parent reply	other threads:[~2019-05-03 14:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-03 14:08 [dpdk-dev] [RFC PATCH 0/4] allow vm_power_manager to build using pkg-config Bruce Richardson
2019-05-03 14:08 ` Bruce Richardson
2019-05-03 14:08 ` [dpdk-dev] [RFC PATCH 1/4] power: make channel commands header public Bruce Richardson
2019-05-03 14:08   ` Bruce Richardson
2019-05-03 14:08 ` Bruce Richardson [this message]
2019-05-03 14:08   ` [dpdk-dev] [RFC PATCH 2/4] power: add namespace prefix to public header elements Bruce Richardson
2019-05-03 14:09 ` [dpdk-dev] [RFC PATCH 3/4] examples/vm_power_manager: always compile all C files Bruce Richardson
2019-05-03 14:09   ` Bruce Richardson
2019-05-03 14:09 ` [dpdk-dev] [RFC PATCH 4/4] examples/vm_power_manager: support build using pkg-config Bruce Richardson
2019-05-03 14:09   ` Bruce Richardson

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=20190503140901.59064-3-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=david.hunt@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).