get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/53252/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 53252,
    "url": "http://patches.dpdk.org/api/patches/53252/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190503140901.59064-3-bruce.richardson@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20190503140901.59064-3-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190503140901.59064-3-bruce.richardson@intel.com",
    "date": "2019-05-03T14:08:59",
    "name": "[RFC,2/4] power: add namespace prefix to public header elements",
    "commit_ref": null,
    "pull_url": null,
    "state": "rfc",
    "archived": true,
    "hash": "9a8bf2b5d68bf8278f95b7af3e04cd5ae3af7ea8",
    "submitter": {
        "id": 20,
        "url": "http://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190503140901.59064-3-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 4555,
            "url": "http://patches.dpdk.org/api/series/4555/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4555",
            "date": "2019-05-03T14:08:57",
            "name": "allow vm_power_manager to build using pkg-config",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/4555/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/53252/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/53252/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 1B42A5F0D;\n\tFri,  3 May 2019 16:09:15 +0200 (CEST)",
            "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n\tby dpdk.org (Postfix) with ESMTP id D39D85B36\n\tfor <dev@dpdk.org>; Fri,  3 May 2019 16:09:13 +0200 (CEST)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t03 May 2019 07:09:13 -0700",
            "from silpixa00399126.ir.intel.com (HELO\n\tsilpixa00399126.ger.corp.intel.com) ([10.237.222.236])\n\tby orsmga003.jf.intel.com with ESMTP; 03 May 2019 07:09:12 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.60,426,1549958400\"; d=\"scan'208\";a=\"147884572\"",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "david.hunt@intel.com",
        "Cc": "dev@dpdk.org,\n\tBruce Richardson <bruce.richardson@intel.com>",
        "Date": "Fri,  3 May 2019 15:08:59 +0100",
        "Message-Id": "<20190503140901.59064-3-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<20190503140901.59064-1-bruce.richardson@intel.com>",
        "References": "<20190503140901.59064-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [RFC PATCH 2/4] power: add namespace prefix to public\n\theader elements",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Now that the rte_channel_commands.h header file is public, we need to\nensure that all structs and defines there start with an rte_ prefix - in\nmany cases, with an rte_power prefix.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n examples/vm_power_manager/channel_monitor.c   | 72 +++++++++----------\n examples/vm_power_manager/channel_monitor.h   |  8 +--\n examples/vm_power_manager/guest_cli/main.c    |  2 +-\n .../guest_cli/vm_power_cli_guest.c            | 10 +--\n .../guest_cli/vm_power_cli_guest.h            |  4 +-\n examples/vm_power_manager/main.c              |  2 +-\n lib/librte_power/guest_channel.c              |  6 +-\n lib/librte_power/guest_channel.h              |  4 +-\n lib/librte_power/power_kvm_vm.c               | 14 ++--\n lib/librte_power/rte_channel_commands.h       | 66 ++++++++---------\n 10 files changed, 94 insertions(+), 94 deletions(-)",
    "diff": "diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c\nindex 9ae90c63f..0643e2d6c 100644\n--- a/examples/vm_power_manager/channel_monitor.c\n+++ b/examples/vm_power_manager/channel_monitor.c\n@@ -104,7 +104,7 @@ str_to_ether_addr(const char *a, struct ether_addr *ether_addr)\n }\n \n static int\n-set_policy_mac(struct channel_packet *pkt, int idx, char *mac)\n+set_policy_mac(struct rte_power_channel_pkt *pkt, int idx, char *mac)\n {\n \tunion PFID pfid;\n \tint ret;\n@@ -131,20 +131,20 @@ set_policy_mac(struct channel_packet *pkt, int idx, char *mac)\n \n \n static int\n-parse_json_to_pkt(json_t *element, struct channel_packet *pkt)\n+parse_json_to_pkt(json_t *element, struct rte_power_channel_pkt *pkt)\n {\n \tconst char *key;\n \tjson_t *value;\n \tint ret;\n \n-\tmemset(pkt, 0, sizeof(struct channel_packet));\n+\tmemset(pkt, 0, sizeof(struct rte_power_channel_pkt));\n \n \tpkt->nb_mac_to_monitor = 0;\n \tpkt->t_boost_status.tbEnabled = false;\n \tpkt->workload = LOW;\n-\tpkt->policy_to_use = TIME;\n+\tpkt->policy_to_use = RTE_POWER_TIME;\n \tpkt->command = PKT_POLICY;\n-\tpkt->core_type = CORE_TYPE_PHYSICAL;\n+\tpkt->core_type = RTE_POWER_CORE_TYPE_PHYSICAL;\n \n \tjson_object_foreach(element, key, value) {\n \t\tif (!strcmp(key, \"policy\")) {\n@@ -178,13 +178,13 @@ parse_json_to_pkt(json_t *element, struct channel_packet *pkt)\n \t\t\tchar command[32];\n \t\t\tstrlcpy(command, json_string_value(value), 32);\n \t\t\tif (!strcmp(command, \"TIME\")) {\n-\t\t\t\tpkt->policy_to_use = TIME;\n+\t\t\t\tpkt->policy_to_use = RTE_POWER_TIME;\n \t\t\t} else if (!strcmp(command, \"TRAFFIC\")) {\n-\t\t\t\tpkt->policy_to_use = TRAFFIC;\n+\t\t\t\tpkt->policy_to_use = RTE_POWER_TRAFFIC;\n \t\t\t} else if (!strcmp(command, \"WORKLOAD\")) {\n-\t\t\t\tpkt->policy_to_use = WORKLOAD;\n+\t\t\t\tpkt->policy_to_use = RTE_POWER_WORKLOAD;\n \t\t\t} else if (!strcmp(command, \"BRANCH_RATIO\")) {\n-\t\t\t\tpkt->policy_to_use = BRANCH_RATIO;\n+\t\t\t\tpkt->policy_to_use = RTE_POWER_BRANCH_RATIO;\n \t\t\t} else {\n \t\t\t\tRTE_LOG(ERR, CHANNEL_MONITOR,\n \t\t\t\t\t\"Wrong policy_type received in JSON\\n\");\n@@ -254,17 +254,17 @@ parse_json_to_pkt(json_t *element, struct channel_packet *pkt)\n \t\t\tchar unit[32];\n \t\t\tstrlcpy(unit, json_string_value(value), 32);\n \t\t\tif (!strcmp(unit, \"SCALE_UP\")) {\n-\t\t\t\tpkt->unit = CPU_POWER_SCALE_UP;\n+\t\t\t\tpkt->unit = RTE_POWER_CPU_SCALE_UP;\n \t\t\t} else if (!strcmp(unit, \"SCALE_DOWN\")) {\n-\t\t\t\tpkt->unit = CPU_POWER_SCALE_DOWN;\n+\t\t\t\tpkt->unit = RTE_POWER_CPU_SCALE_DOWN;\n \t\t\t} else if (!strcmp(unit, \"SCALE_MAX\")) {\n-\t\t\t\tpkt->unit = CPU_POWER_SCALE_MAX;\n+\t\t\t\tpkt->unit = RTE_POWER_CPU_SCALE_MAX;\n \t\t\t} else if (!strcmp(unit, \"SCALE_MIN\")) {\n-\t\t\t\tpkt->unit = CPU_POWER_SCALE_MIN;\n+\t\t\t\tpkt->unit = RTE_POWER_CPU_SCALE_MIN;\n \t\t\t} else if (!strcmp(unit, \"ENABLE_TURBO\")) {\n-\t\t\t\tpkt->unit = CPU_POWER_ENABLE_TURBO;\n+\t\t\t\tpkt->unit = RTE_POWER_CPU_ENABLE_TURBO;\n \t\t\t} else if (!strcmp(unit, \"DISABLE_TURBO\")) {\n-\t\t\t\tpkt->unit = CPU_POWER_DISABLE_TURBO;\n+\t\t\t\tpkt->unit = RTE_POWER_CPU_DISABLE_TURBO;\n \t\t\t} else {\n \t\t\t\tRTE_LOG(ERR, CHANNEL_MONITOR,\n \t\t\t\t\t\"Invalid command received in JSON\\n\");\n@@ -330,7 +330,7 @@ pcpu_monitor(struct policy *pol, struct core_info *ci, int pcpu, int count)\n {\n \tint ret = 0;\n \n-\tif (pol->pkt.policy_to_use == BRANCH_RATIO) {\n+\tif (pol->pkt.policy_to_use == RTE_POWER_BRANCH_RATIO) {\n \t\tci->cd[pcpu].oob_enabled = 1;\n \t\tret = add_core_to_monitor(pcpu);\n \t\tif (ret == 0)\n@@ -370,7 +370,7 @@ get_pcpu_to_control(struct policy *pol)\n \t * differenciate between them when adding them to the branch monitor.\n \t * Virtual cores need to be converted to physical cores.\n \t */\n-\tif (pol->pkt.core_type == CORE_TYPE_VIRTUAL) {\n+\tif (pol->pkt.core_type == RTE_POWER_CORE_TYPE_VIRTUAL) {\n \t\t/*\n \t\t * If the cores in the policy are virtual, we need to map them\n \t\t * to physical core. We look up the vm info and use that for\n@@ -422,7 +422,7 @@ get_pfid(struct policy *pol)\n }\n \n static int\n-update_policy(struct channel_packet *pkt)\n+update_policy(struct rte_power_channel_pkt *pkt)\n {\n \n \tunsigned int updated = 0;\n@@ -438,7 +438,7 @@ update_policy(struct channel_packet *pkt)\n \t\t\tpolicies[i].pkt = *pkt;\n \t\t\tget_pcpu_to_control(&policies[i]);\n \t\t\t/* Check Eth dev only for Traffic policy */\n-\t\t\tif (policies[i].pkt.policy_to_use == TRAFFIC) {\n+\t\t\tif (policies[i].pkt.policy_to_use == RTE_POWER_TRAFFIC) {\n \t\t\t\tif (get_pfid(&policies[i]) < 0) {\n \t\t\t\t\tupdated = 1;\n \t\t\t\t\tbreak;\n@@ -455,7 +455,7 @@ update_policy(struct channel_packet *pkt)\n \t\t\t\tpolicies[i].pkt = *pkt;\n \t\t\t\tget_pcpu_to_control(&policies[i]);\n \t\t\t\t/* Check Eth dev only for Traffic policy */\n-\t\t\t\tif (policies[i].pkt.policy_to_use == TRAFFIC) {\n+\t\t\t\tif (policies[i].pkt.policy_to_use == RTE_POWER_TRAFFIC) {\n \t\t\t\t\tif (get_pfid(&policies[i]) < 0) {\n \t\t\t\t\t\tupdated = 1;\n \t\t\t\t\t\tbreak;\n@@ -471,7 +471,7 @@ update_policy(struct channel_packet *pkt)\n }\n \n static int\n-remove_policy(struct channel_packet *pkt __rte_unused)\n+remove_policy(struct rte_power_channel_pkt *pkt __rte_unused)\n {\n \tint i;\n \n@@ -568,7 +568,7 @@ apply_time_profile(struct policy *pol)\n \t/* Format the date and time, down to a single second. */\n \tstrftime(time_string, sizeof(time_string), \"%Y-%m-%d %H:%M:%S\", ptm);\n \n-\tfor (x = 0; x < HOURS; x++) {\n+\tfor (x = 0; x < RTE_HOURS_PER_DAY; x++) {\n \n \t\tif (ptm->tm_hour == pol->pkt.timer_policy.busy_hours[x]) {\n \t\t\tfor (count = 0; count < pol->pkt.num_vcpu; count++) {\n@@ -626,19 +626,19 @@ static void\n apply_policy(struct policy *pol)\n {\n \n-\tstruct channel_packet *pkt = &pol->pkt;\n+\tstruct rte_power_channel_pkt *pkt = &pol->pkt;\n \n \t/*Check policy to use*/\n-\tif (pkt->policy_to_use == TRAFFIC)\n+\tif (pkt->policy_to_use == RTE_POWER_TRAFFIC)\n \t\tapply_traffic_profile(pol);\n-\telse if (pkt->policy_to_use == TIME)\n+\telse if (pkt->policy_to_use == RTE_POWER_TIME)\n \t\tapply_time_profile(pol);\n-\telse if (pkt->policy_to_use == WORKLOAD)\n+\telse if (pkt->policy_to_use == RTE_POWER_WORKLOAD)\n \t\tapply_workload_profile(pol);\n }\n \n static int\n-process_request(struct channel_packet *pkt, struct channel_info *chan_info)\n+process_request(struct rte_power_channel_pkt *pkt, struct channel_info *chan_info)\n {\n \tint ret;\n \n@@ -652,7 +652,7 @@ process_request(struct channel_packet *pkt, struct channel_info *chan_info)\n \tif (pkt->command == CPU_POWER) {\n \t\tunsigned int core_num;\n \n-\t\tif (pkt->core_type == CORE_TYPE_VIRTUAL)\n+\t\tif (pkt->core_type == RTE_POWER_CORE_TYPE_VIRTUAL)\n \t\t\tcore_num = get_pcpu(chan_info, pkt->resource_id);\n \t\telse\n \t\t\tcore_num = pkt->resource_id;\n@@ -661,22 +661,22 @@ process_request(struct channel_packet *pkt, struct channel_info *chan_info)\n \t\t\tcore_num);\n \n \t\tswitch (pkt->unit) {\n-\t\tcase(CPU_POWER_SCALE_MIN):\n+\t\tcase(RTE_POWER_CPU_SCALE_MIN):\n \t\t\tpower_manager_scale_core_min(core_num);\n \t\t\tbreak;\n-\t\tcase(CPU_POWER_SCALE_MAX):\n+\t\tcase(RTE_POWER_CPU_SCALE_MAX):\n \t\t\tpower_manager_scale_core_max(core_num);\n \t\t\tbreak;\n-\t\tcase(CPU_POWER_SCALE_DOWN):\n+\t\tcase(RTE_POWER_CPU_SCALE_DOWN):\n \t\t\tpower_manager_scale_core_down(core_num);\n \t\t\tbreak;\n-\t\tcase(CPU_POWER_SCALE_UP):\n+\t\tcase(RTE_POWER_CPU_SCALE_UP):\n \t\t\tpower_manager_scale_core_up(core_num);\n \t\t\tbreak;\n-\t\tcase(CPU_POWER_ENABLE_TURBO):\n+\t\tcase(RTE_POWER_CPU_ENABLE_TURBO):\n \t\t\tpower_manager_enable_turbo_core(core_num);\n \t\t\tbreak;\n-\t\tcase(CPU_POWER_DISABLE_TURBO):\n+\t\tcase(RTE_POWER_CPU_DISABLE_TURBO):\n \t\t\tpower_manager_disable_turbo_core(core_num);\n \t\t\tbreak;\n \t\tdefault:\n@@ -765,7 +765,7 @@ channel_monitor_init(void)\n static void\n read_binary_packet(struct channel_info *chan_info)\n {\n-\tstruct channel_packet pkt;\n+\tstruct rte_power_channel_pkt pkt;\n \tvoid *buffer = &pkt;\n \tint buffer_len = sizeof(pkt);\n \tint n_bytes, err = 0;\n@@ -796,7 +796,7 @@ read_binary_packet(struct channel_info *chan_info)\n static void\n read_json_packet(struct channel_info *chan_info)\n {\n-\tstruct channel_packet pkt;\n+\tstruct rte_power_channel_pkt pkt;\n \tint n_bytes, ret;\n \tjson_t *root;\n \tjson_error_t error;\ndiff --git a/examples/vm_power_manager/channel_monitor.h b/examples/vm_power_manager/channel_monitor.h\nindex a8bc9a4f1..1a8e8c212 100644\n--- a/examples/vm_power_manager/channel_monitor.h\n+++ b/examples/vm_power_manager/channel_monitor.h\n@@ -18,11 +18,11 @@ struct core_share {\n };\n \n struct policy {\n-\tstruct channel_packet pkt;\n-\tuint32_t pfid[MAX_VFS];\n-\tuint32_t port[MAX_VFS];\n+\tstruct rte_power_channel_pkt pkt;\n+\tuint32_t pfid[RTE_POWER_MAX_VFS];\n+\tuint32_t port[RTE_POWER_MAX_VFS];\n \tunsigned int enabled;\n-\tstruct core_share core_share[MAX_VCPU_PER_VM];\n+\tstruct core_share core_share[RTE_POWER_MAX_VCPU_PER_VM];\n };\n \n #ifdef __cplusplus\ndiff --git a/examples/vm_power_manager/guest_cli/main.c b/examples/vm_power_manager/guest_cli/main.c\nindex 36365b124..4f748a759 100644\n--- a/examples/vm_power_manager/guest_cli/main.c\n+++ b/examples/vm_power_manager/guest_cli/main.c\n@@ -48,7 +48,7 @@ parse_args(int argc, char **argv)\n \t\t{ \"policy\", required_argument, 0, 'o'},\n \t\t{NULL, 0, 0, 0}\n \t};\n-\tstruct channel_packet *policy;\n+\tstruct rte_power_channel_pkt *policy;\n \tunsigned short int hours[MAX_HOURS];\n \tunsigned short int cores[MAX_VCPU_PER_VM];\n \tunsigned short int ports[MAX_VCPU_PER_VM];\ndiff --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\nindex 2d9e7689a..cb7f5ff02 100644\n--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c\n+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c\n@@ -38,9 +38,9 @@ union PFID {\n \tuint64_t pfid;\n };\n \n-static struct channel_packet policy;\n+static struct rte_power_channel_pkt policy;\n \n-struct channel_packet *\n+struct rte_power_channel_pkt *\n get_policy(void)\n {\n \treturn &policy;\n@@ -49,7 +49,7 @@ get_policy(void)\n int\n set_policy_mac(int port, int idx)\n {\n-\tstruct channel_packet *policy;\n+\tstruct rte_power_channel_pkt *policy;\n \tunion PFID pfid;\n \n \t/* Use port MAC address as the vfid */\n@@ -67,7 +67,7 @@ set_policy_mac(int port, int idx)\n }\n \n void\n-set_policy_defaults(struct channel_packet *pkt)\n+set_policy_defaults(struct rte_power_channel_pkt *pkt)\n {\n \tset_policy_mac(0, 0);\n \tpkt->nb_mac_to_monitor = 1;\n@@ -185,7 +185,7 @@ struct cmd_send_policy_result {\n };\n \n static inline int\n-send_policy(struct channel_packet *pkt)\n+send_policy(struct rte_power_channel_pkt *pkt)\n {\n \tint ret;\n \ndiff --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\nindex fd77f6a69..d38d90690 100644\n--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h\n+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h\n@@ -11,11 +11,11 @@ extern \"C\" {\n \n #include \"channel_commands.h\"\n \n-struct channel_packet *get_policy(void);\n+struct rte_power_channel_pkt *get_policy(void);\n \n int set_policy_mac(int port, int idx);\n \n-void set_policy_defaults(struct channel_packet *pkt);\n+void set_policy_defaults(struct rte_power_channel_pkt *pkt);\n \n void run_cli(__attribute__((unused)) void *arg);\n \ndiff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c\nindex 5fa13fe62..fbe9d6299 100644\n--- a/examples/vm_power_manager/main.c\n+++ b/examples/vm_power_manager/main.c\n@@ -373,7 +373,7 @@ main(int argc, char **argv)\n \t\t\t\t\t\"Cannot init port %\"PRIu8 \"\\n\",\n \t\t\t\t\tportid);\n \n-\t\t\tfor (w = 0; w < MAX_VFS; w++) {\n+\t\t\tfor (w = 0; w < RTE_POWER_MAX_VFS; w++) {\n \t\t\t\teth.addr_bytes[5] = w + 0xf0;\n \n \t\t\t\tret = -ENOTSUP;\ndiff --git a/lib/librte_power/guest_channel.c b/lib/librte_power/guest_channel.c\nindex bb35fecec..722f7dda4 100644\n--- a/lib/librte_power/guest_channel.c\n+++ b/lib/librte_power/guest_channel.c\n@@ -25,7 +25,7 @@ int\n guest_channel_host_connect(const char *path, unsigned int lcore_id)\n {\n \tint flags, ret;\n-\tstruct channel_packet pkt;\n+\tstruct rte_power_channel_pkt pkt;\n \tchar fd_path[PATH_MAX];\n \tint fd = -1;\n \n@@ -89,7 +89,7 @@ guest_channel_host_connect(const char *path, unsigned int lcore_id)\n }\n \n int\n-guest_channel_send_msg(struct channel_packet *pkt, unsigned int lcore_id)\n+guest_channel_send_msg(struct rte_power_channel_pkt *pkt, unsigned int lcore_id)\n {\n \tint ret, buffer_len = sizeof(*pkt);\n \tvoid *buffer = pkt;\n@@ -119,7 +119,7 @@ guest_channel_send_msg(struct channel_packet *pkt, unsigned int lcore_id)\n \treturn 0;\n }\n \n-int rte_power_guest_channel_send_msg(struct channel_packet *pkt,\n+int rte_power_guest_channel_send_msg(struct rte_power_channel_pkt *pkt,\n \t\t\tunsigned int lcore_id)\n {\n \treturn guest_channel_send_msg(pkt, lcore_id);\ndiff --git a/lib/librte_power/guest_channel.h b/lib/librte_power/guest_channel.h\nindex 6219063d3..804743a76 100644\n--- a/lib/librte_power/guest_channel.h\n+++ b/lib/librte_power/guest_channel.h\n@@ -48,7 +48,7 @@ void guest_channel_host_disconnect(unsigned int lcore_id);\n  *  - Negative on channel not connected.\n  *  - errno on write to channel error.\n  */\n-int guest_channel_send_msg(struct channel_packet *pkt, unsigned int lcore_id);\n+int guest_channel_send_msg(struct rte_power_channel_pkt *pkt, unsigned int lcore_id);\n \n /**\n  * Send a message contained in pkt over the Virtio-Serial to the host endpoint.\n@@ -63,7 +63,7 @@ int guest_channel_send_msg(struct channel_packet *pkt, unsigned int lcore_id);\n  *  - 0 on success.\n  *  - Negative on error.\n  */\n-int rte_power_guest_channel_send_msg(struct channel_packet *pkt,\n+int rte_power_guest_channel_send_msg(struct rte_power_channel_pkt *pkt,\n \t\t\tunsigned int lcore_id);\n \n #ifdef __cplusplus\ndiff --git a/lib/librte_power/power_kvm_vm.c b/lib/librte_power/power_kvm_vm.c\nindex 1c60551a4..259b68801 100644\n--- a/lib/librte_power/power_kvm_vm.c\n+++ b/lib/librte_power/power_kvm_vm.c\n@@ -13,7 +13,7 @@\n \n #define FD_PATH \"/dev/virtio-ports/virtio.serial.port.poweragent\"\n \n-static struct channel_packet pkt[RTE_MAX_LCORE];\n+static struct rte_power_channel_pkt pkt[RTE_MAX_LCORE];\n \n \n int\n@@ -85,25 +85,25 @@ send_msg(unsigned int lcore_id, uint32_t scale_direction)\n int\n power_kvm_vm_freq_up(unsigned int lcore_id)\n {\n-\treturn send_msg(lcore_id, CPU_POWER_SCALE_UP);\n+\treturn send_msg(lcore_id, RTE_POWER_CPU_SCALE_UP);\n }\n \n int\n power_kvm_vm_freq_down(unsigned int lcore_id)\n {\n-\treturn send_msg(lcore_id, CPU_POWER_SCALE_DOWN);\n+\treturn send_msg(lcore_id, RTE_POWER_CPU_SCALE_DOWN);\n }\n \n int\n power_kvm_vm_freq_max(unsigned int lcore_id)\n {\n-\treturn send_msg(lcore_id, CPU_POWER_SCALE_MAX);\n+\treturn send_msg(lcore_id, RTE_POWER_CPU_SCALE_MAX);\n }\n \n int\n power_kvm_vm_freq_min(unsigned int lcore_id)\n {\n-\treturn send_msg(lcore_id, CPU_POWER_SCALE_MIN);\n+\treturn send_msg(lcore_id, RTE_POWER_CPU_SCALE_MIN);\n }\n \n int\n@@ -116,13 +116,13 @@ power_kvm_vm_turbo_status(__attribute__((unused)) unsigned int lcore_id)\n int\n power_kvm_vm_enable_turbo(unsigned int lcore_id)\n {\n-\treturn send_msg(lcore_id, CPU_POWER_ENABLE_TURBO);\n+\treturn send_msg(lcore_id, RTE_POWER_CPU_ENABLE_TURBO);\n }\n \n int\n power_kvm_vm_disable_turbo(unsigned int lcore_id)\n {\n-\treturn send_msg(lcore_id, CPU_POWER_DISABLE_TURBO);\n+\treturn send_msg(lcore_id, RTE_POWER_CPU_DISABLE_TURBO);\n }\n \n struct rte_power_core_capabilities;\ndiff --git a/lib/librte_power/rte_channel_commands.h b/lib/librte_power/rte_channel_commands.h\nindex eca8ff70c..d4681ef19 100644\n--- a/lib/librte_power/rte_channel_commands.h\n+++ b/lib/librte_power/rte_channel_commands.h\n@@ -19,62 +19,62 @@ extern \"C\" {\n #define PKT_POLICY_REMOVE       4\n \n /* CPU Power Command Scaling */\n-#define CPU_POWER_SCALE_UP      1\n-#define CPU_POWER_SCALE_DOWN    2\n-#define CPU_POWER_SCALE_MAX     3\n-#define CPU_POWER_SCALE_MIN     4\n-#define CPU_POWER_ENABLE_TURBO  5\n-#define CPU_POWER_DISABLE_TURBO 6\n-#define HOURS 24\n+#define RTE_POWER_CPU_SCALE_UP      1\n+#define RTE_POWER_CPU_SCALE_DOWN    2\n+#define RTE_POWER_CPU_SCALE_MAX     3\n+#define RTE_POWER_CPU_SCALE_MIN     4\n+#define RTE_POWER_CPU_ENABLE_TURBO  5\n+#define RTE_POWER_CPU_DISABLE_TURBO 6\n+#define RTE_HOURS_PER_DAY 24\n \n-#define MAX_VFS 10\n-#define VM_MAX_NAME_SZ 32\n+#define RTE_POWER_MAX_VFS 10\n+#define RTE_POWER_VM_MAX_NAME_SZ 32\n \n-#define MAX_VCPU_PER_VM         8\n+#define RTE_POWER_MAX_VCPU_PER_VM         8\n \n-struct t_boost_status {\n+struct rte_power_t_boost_status {\n \tbool tbEnabled;\n };\n \n-struct timer_profile {\n-\tint busy_hours[HOURS];\n-\tint quiet_hours[HOURS];\n-\tint hours_to_use_traffic_profile[HOURS];\n+struct rte_power_timer_profile {\n+\tint busy_hours[RTE_HOURS_PER_DAY];\n+\tint quiet_hours[RTE_HOURS_PER_DAY];\n+\tint hours_to_use_traffic_profile[RTE_HOURS_PER_DAY];\n };\n \n-enum workload {HIGH, MEDIUM, LOW};\n-enum policy_to_use {\n-\tTRAFFIC,\n-\tTIME,\n-\tWORKLOAD,\n-\tBRANCH_RATIO\n+enum rte_power_workload {HIGH, MEDIUM, LOW};\n+enum rte_power_policy_to_use {\n+\tRTE_POWER_TRAFFIC,\n+\tRTE_POWER_TIME,\n+\tRTE_POWER_WORKLOAD,\n+\tRTE_POWER_BRANCH_RATIO\n };\n \n-struct traffic {\n+struct rte_power_channel_traffic {\n \tuint32_t min_packet_thresh;\n \tuint32_t avg_max_packet_thresh;\n \tuint32_t max_max_packet_thresh;\n };\n \n-#define CORE_TYPE_VIRTUAL 0\n-#define CORE_TYPE_PHYSICAL 1\n+#define RTE_POWER_CORE_TYPE_VIRTUAL 0\n+#define RTE_POWER_CORE_TYPE_PHYSICAL 1\n \n-struct channel_packet {\n+struct rte_power_channel_pkt {\n \tuint64_t resource_id; /**< core_num, device */\n \tuint32_t unit;        /**< scale down/up/min/max */\n \tuint32_t command;     /**< Power, IO, etc */\n-\tchar vm_name[VM_MAX_NAME_SZ];\n+\tchar vm_name[RTE_POWER_VM_MAX_NAME_SZ];\n \n-\tuint64_t vfid[MAX_VFS];\n+\tuint64_t vfid[RTE_POWER_MAX_VFS];\n \tint nb_mac_to_monitor;\n-\tstruct traffic traffic_policy;\n-\tuint8_t vcpu_to_control[MAX_VCPU_PER_VM];\n+\tstruct rte_power_channel_traffic traffic_policy;\n+\tuint8_t vcpu_to_control[RTE_POWER_MAX_VCPU_PER_VM];\n \tuint8_t num_vcpu;\n-\tstruct timer_profile timer_policy;\n+\tstruct rte_power_timer_profile timer_policy;\n \tbool core_type;\n-\tenum workload workload;\n-\tenum policy_to_use policy_to_use;\n-\tstruct t_boost_status t_boost_status;\n+\tenum rte_power_workload workload;\n+\tenum rte_power_policy_to_use policy_to_use;\n+\tstruct rte_power_t_boost_status t_boost_status;\n };\n \n \n",
    "prefixes": [
        "RFC",
        "2/4"
    ]
}