get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 29609,
    "url": "https://patches.dpdk.org/api/patches/29609/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1507130720-48891-6-git-send-email-david.hunt@intel.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<1507130720-48891-6-git-send-email-david.hunt@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1507130720-48891-6-git-send-email-david.hunt@intel.com",
    "date": "2017-10-04T15:25:16",
    "name": "[dpdk-dev,v5,5/9] examples/vm_power_mgr: add policy to channels",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b06f09a6c395910067b60582a7d3a749a78dc538",
    "submitter": {
        "id": 342,
        "url": "https://patches.dpdk.org/api/people/342/?format=api",
        "name": "Hunt, David",
        "email": "david.hunt@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1507130720-48891-6-git-send-email-david.hunt@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/29609/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/29609/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 2535A1B6AB;\n\tWed,  4 Oct 2017 17:25:43 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id C0B9C1B6A5\n\tfor <dev@dpdk.org>; Wed,  4 Oct 2017 17:25:40 +0200 (CEST)",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t04 Oct 2017 08:25:40 -0700",
            "from silpixa00397898.ir.intel.com ([10.237.223.116])\n\tby fmsmga004.fm.intel.com with ESMTP; 04 Oct 2017 08:25:38 -0700"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.42,477,1500966000\"; d=\"scan'208\";a=\"319493507\"",
        "From": "David Hunt <david.hunt@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "konstantin.ananyev@intel.com, jingjing.wu@intel.com,\n\t\"Sexton, Rory\" <rory.sexton@intel.com>,\n\tNemanja Marjanovic <nemanja.marjanovic@intel.com>,\n\tDavid Hunt <david.hunt@intel.com>",
        "Date": "Wed,  4 Oct 2017 16:25:16 +0100",
        "Message-Id": "<1507130720-48891-6-git-send-email-david.hunt@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1507130720-48891-1-git-send-email-david.hunt@intel.com>",
        "References": "<1507108515-186477-1-git-send-email-david.hunt@intel.com>\n\t<1507130720-48891-1-git-send-email-david.hunt@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v5 5/9] examples/vm_power_mgr: add policy to\n\tchannels",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: \"Sexton, Rory\" <rory.sexton@intel.com>\n\nSigned-off-by: Nemanja Marjanovic <nemanja.marjanovic@intel.com>\nSigned-off-by: Rory Sexton <rory.sexton@intel.com>\nSigned-off-by: David Hunt <david.hunt@intel.com>\n---\n examples/vm_power_manager/Makefile          |  16 ++\n examples/vm_power_manager/channel_monitor.c | 321 +++++++++++++++++++++++++++-\n examples/vm_power_manager/channel_monitor.h |  18 ++\n 3 files changed, 348 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/examples/vm_power_manager/Makefile b/examples/vm_power_manager/Makefile\nindex 59a9641..9cf20a2 100644\n--- a/examples/vm_power_manager/Makefile\n+++ b/examples/vm_power_manager/Makefile\n@@ -54,6 +54,22 @@ CFLAGS += $(WERROR_FLAGS)\n \n LDLIBS += -lvirt\n \n+ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)\n+\n+ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y)\n+LDLIBS += -lrte_pmd_ixgbe\n+endif\n+\n+ifeq ($(CONFIG_RTE_LIBRTE_I40E_PMD),y)\n+LDLIBS += -lrte_pmd_i40e\n+endif\n+\n+ifeq ($(CONFIG_RTE_LIBRTE_BNXT_PMD),y)\n+LDLIBS += -lrte_pmd_bnxt\n+endif\n+\n+endif\n+\n # workaround for a gcc bug with noreturn attribute\n # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603\n ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)\ndiff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c\nindex ac40dac..f16358d 100644\n--- a/examples/vm_power_manager/channel_monitor.c\n+++ b/examples/vm_power_manager/channel_monitor.c\n@@ -41,13 +41,17 @@\n #include <sys/types.h>\n #include <sys/epoll.h>\n #include <sys/queue.h>\n+#include <sys/time.h>\n \n #include <rte_log.h>\n #include <rte_memory.h>\n #include <rte_malloc.h>\n #include <rte_atomic.h>\n+#include <rte_cycles.h>\n+#include <rte_ethdev.h>\n+#include <rte_pmd_i40e.h>\n \n-\n+#include <libvirt/libvirt.h>\n #include \"channel_monitor.h\"\n #include \"channel_commands.h\"\n #include \"channel_manager.h\"\n@@ -57,10 +61,15 @@\n \n #define MAX_EVENTS 256\n \n+uint64_t vsi_pkt_count_prev[384];\n+uint64_t rdtsc_prev[384];\n \n+double time_period_s = 1;\n static volatile unsigned run_loop = 1;\n static int global_event_fd;\n+static unsigned int policy_is_set;\n static struct epoll_event *global_events_list;\n+static struct policy policies[MAX_VMS];\n \n void channel_monitor_exit(void)\n {\n@@ -68,6 +77,286 @@ void channel_monitor_exit(void)\n \trte_free(global_events_list);\n }\n \n+static void\n+core_share(int pNo, int z, int x, int t)\n+{\n+\tif (policies[pNo].core_share[z].pcpu == lvm_info[x].pcpus[t]) {\n+\t\tif (strcmp(policies[pNo].pkt.vm_name,\n+\t\t\t\tlvm_info[x].vm_name) != 0) {\n+\t\t\tpolicies[pNo].core_share[z].status = 1;\n+\t\t\tpower_manager_scale_core_max(\n+\t\t\t\t\tpolicies[pNo].core_share[z].pcpu);\n+\t\t}\n+\t}\n+}\n+\n+static void\n+core_share_status(int pNo)\n+{\n+\n+\tint noVms, noVcpus, z, x, t;\n+\n+\tget_all_vm(&noVms, &noVcpus);\n+\n+\t/* Reset Core Share Status. */\n+\tfor (z = 0; z < noVcpus; z++)\n+\t\tpolicies[pNo].core_share[z].status = 0;\n+\n+\t/* Foreach vcpu in a policy. */\n+\tfor (z = 0; z < policies[pNo].pkt.num_vcpu; z++) {\n+\t\t/* Foreach VM on the platform. */\n+\t\tfor (x = 0; x < noVms; x++) {\n+\t\t\t/* Foreach vcpu of VMs on platform. */\n+\t\t\tfor (t = 0; t < lvm_info[x].num_cpus; t++)\n+\t\t\t\tcore_share(pNo, z, x, t);\n+\t\t}\n+\t}\n+}\n+\n+static void\n+get_pcpu_to_control(struct policy *pol)\n+{\n+\n+\t/* Convert vcpu to pcpu. */\n+\tstruct vm_info info;\n+\tint pcpu, count;\n+\tuint64_t mask_u64b;\n+\n+\tRTE_LOG(INFO, CHANNEL_MONITOR, \"Looking for pcpu for %s\\n\",\n+\t\t\tpol->pkt.vm_name);\n+\tget_info_vm(pol->pkt.vm_name, &info);\n+\n+\tfor (count = 0; count < pol->pkt.num_vcpu; count++) {\n+\t\tmask_u64b = info.pcpu_mask[pol->pkt.vcpu_to_control[count]];\n+\t\tfor (pcpu = 0; mask_u64b; mask_u64b &= ~(1ULL << pcpu++)) {\n+\t\t\tif ((mask_u64b >> pcpu) & 1)\n+\t\t\t\tpol->core_share[count].pcpu = pcpu;\n+\t\t}\n+\t}\n+}\n+\n+static int\n+get_pfid(struct policy *pol)\n+{\n+\n+\tint i, x, ret = 0, nb_ports;\n+\n+\tnb_ports = rte_eth_dev_count();\n+\tfor (i = 0; i < pol->pkt.nb_mac_to_monitor; i++) {\n+\n+\t\tfor (x = 0; x < nb_ports; x++) {\n+\t\t\tret = rte_pmd_i40e_query_vfid_by_mac(x,\n+\t\t\t\t(struct ether_addr *)&(pol->pkt.vfid[i]));\n+\t\t\tif (ret != -EINVAL) {\n+\t\t\t\tpol->port[i] = x;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t}\n+\t\tif (ret == -EINVAL || ret == -ENOTSUP || ret == ENODEV) {\n+\t\t\tRTE_LOG(INFO, CHANNEL_MONITOR,\n+\t\t\t\t\"Error with Policy. MAC not found on \"\n+\t\t\t\t\"attached ports \");\n+\t\t\tpol->enabled = 0;\n+\t\t\treturn ret;\n+\t\t}\n+\t\tpol->pfid[i] = ret;\n+\t}\n+\treturn 1;\n+}\n+\n+static int\n+update_policy(struct channel_packet *pkt)\n+{\n+\n+\tunsigned int updated = 0;\n+\n+\tfor (int i = 0; i < MAX_VMS; i++) {\n+\t\tif (strcmp(policies[i].pkt.vm_name, pkt->vm_name) == 0) {\n+\t\t\tpolicies[i].pkt = *pkt;\n+\t\t\tget_pcpu_to_control(&policies[i]);\n+\t\t\tif (get_pfid(&policies[i]) == -1) {\n+\t\t\t\tupdated = 1;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t\tcore_share_status(i);\n+\t\t\tpolicies[i].enabled = 1;\n+\t\t\tupdated = 1;\n+\t\t}\n+\t}\n+\tif (!updated) {\n+\t\tfor (int i = 0; i < MAX_VMS; i++) {\n+\t\t\tif (policies[i].enabled == 0) {\n+\t\t\t\tpolicies[i].pkt = *pkt;\n+\t\t\t\tget_pcpu_to_control(&policies[i]);\n+\t\t\t\tif (get_pfid(&policies[i]) == -1)\n+\t\t\t\t\tbreak;\n+\t\t\t\tcore_share_status(i);\n+\t\t\t\tpolicies[i].enabled = 1;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t}\n+\t}\n+\treturn 0;\n+}\n+\n+static uint64_t\n+get_pkt_diff(struct policy *pol)\n+{\n+\n+\tuint64_t vsi_pkt_count,\n+\t\tvsi_pkt_total = 0,\n+\t\tvsi_pkt_count_prev_total = 0;\n+\tdouble rdtsc_curr, rdtsc_diff, diff;\n+\tint x;\n+\tstruct rte_eth_stats vf_stats;\n+\n+\tfor (x = 0; x < pol->pkt.nb_mac_to_monitor; x++) {\n+\n+\t\t/*Read vsi stats*/\n+\t\tif (rte_pmd_i40e_get_vf_stats(x, pol->pfid[x], &vf_stats) == 0)\n+\t\t\tvsi_pkt_count = vf_stats.ipackets;\n+\t\telse\n+\t\t\tvsi_pkt_count = -1;\n+\n+\t\tvsi_pkt_total += vsi_pkt_count;\n+\n+\t\tvsi_pkt_count_prev_total += vsi_pkt_count_prev[pol->pfid[x]];\n+\t\tvsi_pkt_count_prev[pol->pfid[x]] = vsi_pkt_count;\n+\t}\n+\n+\trdtsc_curr = rte_rdtsc_precise();\n+\trdtsc_diff = rdtsc_curr - rdtsc_prev[pol->pfid[x-1]];\n+\trdtsc_prev[pol->pfid[x-1]] = rdtsc_curr;\n+\n+\tdiff = (vsi_pkt_total - vsi_pkt_count_prev_total) *\n+\t\t\t((double)rte_get_tsc_hz() / rdtsc_diff);\n+\n+\treturn diff;\n+}\n+\n+static void\n+apply_traffic_profile(struct policy *pol)\n+{\n+\n+\tint count;\n+\tuint64_t diff = 0;\n+\n+\tdiff = get_pkt_diff(pol);\n+\n+\tRTE_LOG(INFO, CHANNEL_MONITOR, \"Applying traffic profile\\n\");\n+\n+\tif (diff >= (pol->pkt.traffic_policy.max_max_packet_thresh)) {\n+\t\tfor (count = 0; count < pol->pkt.num_vcpu; count++) {\n+\t\t\tif (pol->core_share[count].status != 1)\n+\t\t\t\tpower_manager_scale_core_max(\n+\t\t\t\t\t\tpol->core_share[count].pcpu);\n+\t\t}\n+\t} else if (diff >= (pol->pkt.traffic_policy.avg_max_packet_thresh)) {\n+\t\tfor (count = 0; count < pol->pkt.num_vcpu; count++) {\n+\t\t\tif (pol->core_share[count].status != 1)\n+\t\t\t\tpower_manager_scale_core_med(\n+\t\t\t\t\t\tpol->core_share[count].pcpu);\n+\t\t}\n+\t} else if (diff < (pol->pkt.traffic_policy.avg_max_packet_thresh)) {\n+\t\tfor (count = 0; count < pol->pkt.num_vcpu; count++) {\n+\t\t\tif (pol->core_share[count].status != 1)\n+\t\t\t\tpower_manager_scale_core_min(\n+\t\t\t\t\t\tpol->core_share[count].pcpu);\n+\t\t}\n+\t}\n+}\n+\n+static void\n+apply_time_profile(struct policy *pol)\n+{\n+\n+\tint count, x;\n+\tstruct timeval tv;\n+\tstruct tm *ptm;\n+\tchar time_string[40];\n+\n+\t/* Obtain the time of day, and convert it to a tm struct. */\n+\tgettimeofday(&tv, NULL);\n+\tptm = localtime(&tv.tv_sec);\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+\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+\t\t\t\tif (pol->core_share[count].status != 1) {\n+\t\t\t\t\tpower_manager_scale_core_max(\n+\t\t\t\t\t\tpol->core_share[count].pcpu);\n+\t\t\t\tRTE_LOG(INFO, CHANNEL_MONITOR,\n+\t\t\t\t\t\"Scaling up core %d to max\\n\",\n+\t\t\t\t\tpol->core_share[count].pcpu);\n+\t\t\t\t}\n+\t\t\t}\n+\t\t\tbreak;\n+\t\t} else if (ptm->tm_hour ==\n+\t\t\t\tpol->pkt.timer_policy.quiet_hours[x]) {\n+\t\t\tfor (count = 0; count < pol->pkt.num_vcpu; count++) {\n+\t\t\t\tif (pol->core_share[count].status != 1) {\n+\t\t\t\t\tpower_manager_scale_core_min(\n+\t\t\t\t\t\tpol->core_share[count].pcpu);\n+\t\t\t\tRTE_LOG(INFO, CHANNEL_MONITOR,\n+\t\t\t\t\t\"Scaling down core %d to min\\n\",\n+\t\t\t\t\tpol->core_share[count].pcpu);\n+\t\t\t}\n+\t\t}\n+\t\t\tbreak;\n+\t\t} else if (ptm->tm_hour ==\n+\t\t\tpol->pkt.timer_policy.hours_to_use_traffic_profile[x]) {\n+\t\t\tapply_traffic_profile(pol);\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+}\n+\n+static void\n+apply_workload_profile(struct policy *pol)\n+{\n+\n+\tint count;\n+\n+\tif (pol->pkt.workload == HIGH) {\n+\t\tfor (count = 0; count < pol->pkt.num_vcpu; count++) {\n+\t\t\tif (pol->core_share[count].status != 1)\n+\t\t\t\tpower_manager_scale_core_max(\n+\t\t\t\t\t\tpol->core_share[count].pcpu);\n+\t\t}\n+\t} else if (pol->pkt.workload == MEDIUM) {\n+\t\tfor (count = 0; count < pol->pkt.num_vcpu; count++) {\n+\t\t\tif (pol->core_share[count].status != 1)\n+\t\t\t\tpower_manager_scale_core_med(\n+\t\t\t\t\t\tpol->core_share[count].pcpu);\n+\t\t}\n+\t} else if (pol->pkt.workload == LOW) {\n+\t\tfor (count = 0; count < pol->pkt.num_vcpu; count++) {\n+\t\t\tif (pol->core_share[count].status != 1)\n+\t\t\t\tpower_manager_scale_core_min(\n+\t\t\t\t\t\tpol->core_share[count].pcpu);\n+\t\t}\n+\t}\n+}\n+\n+static void\n+apply_policy(struct policy *pol)\n+{\n+\n+\tstruct channel_packet *pkt = &pol->pkt;\n+\n+\t/*Check policy to use*/\n+\tif (pkt->policy_to_use == TRAFFIC)\n+\t\tapply_traffic_profile(pol);\n+\telse if (pkt->policy_to_use == TIME)\n+\t\tapply_time_profile(pol);\n+\telse if (pkt->policy_to_use == WORKLOAD)\n+\t\tapply_workload_profile(pol);\n+}\n+\n+\n static int\n process_request(struct channel_packet *pkt, struct channel_info *chan_info)\n {\n@@ -140,6 +429,13 @@ process_request(struct channel_packet *pkt, struct channel_info *chan_info)\n \n \t\t}\n \t}\n+\n+\tif (pkt->command == PKT_POLICY) {\n+\t\tRTE_LOG(INFO, CHANNEL_MONITOR, \"\\nProcessing Policy request from Guest\\n\");\n+\t\tupdate_policy(pkt);\n+\t\tpolicy_is_set = 1;\n+\t}\n+\n \t/* Return is not checked as channel status may have been set to DISABLED\n \t * from management thread\n \t */\n@@ -209,9 +505,10 @@ run_channel_monitor(void)\n \t\t\tstruct channel_info *chan_info = (struct channel_info *)\n \t\t\t\t\tglobal_events_list[i].data.ptr;\n \t\t\tif ((global_events_list[i].events & EPOLLERR) ||\n-\t\t\t\t\t(global_events_list[i].events & EPOLLHUP)) {\n+\t\t\t\t(global_events_list[i].events & EPOLLHUP)) {\n \t\t\t\tRTE_LOG(DEBUG, CHANNEL_MONITOR, \"Remote closed connection for \"\n-\t\t\t\t\t\t\"channel '%s'\\n\", chan_info->channel_path);\n+\t\t\t\t\t\t\"channel '%s'\\n\",\n+\t\t\t\t\t\tchan_info->channel_path);\n \t\t\t\tremove_channel(&chan_info);\n \t\t\t\tcontinue;\n \t\t\t}\n@@ -223,14 +520,17 @@ run_channel_monitor(void)\n \t\t\t\tint buffer_len = sizeof(pkt);\n \n \t\t\t\twhile (buffer_len > 0) {\n-\t\t\t\t\tn_bytes = read(chan_info->fd, buffer, buffer_len);\n+\t\t\t\t\tn_bytes = read(chan_info->fd,\n+\t\t\t\t\t\t\tbuffer, buffer_len);\n \t\t\t\t\tif (n_bytes == buffer_len)\n \t\t\t\t\t\tbreak;\n \t\t\t\t\tif (n_bytes == -1) {\n \t\t\t\t\t\terr = errno;\n-\t\t\t\t\t\tRTE_LOG(DEBUG, CHANNEL_MONITOR, \"Received error on \"\n-\t\t\t\t\t\t\t\t\"channel '%s' read: %s\\n\",\n-\t\t\t\t\t\t\t\tchan_info->channel_path, strerror(err));\n+\t\t\t\t\t\tRTE_LOG(DEBUG, CHANNEL_MONITOR,\n+\t\t\t\t\t\t\t\"Received error on \"\n+\t\t\t\t\t\t\t\"channel '%s' read: %s\\n\",\n+\t\t\t\t\t\t\tchan_info->channel_path,\n+\t\t\t\t\t\t\tstrerror(err));\n \t\t\t\t\t\tremove_channel(&chan_info);\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n@@ -241,5 +541,12 @@ run_channel_monitor(void)\n \t\t\t\t\tprocess_request(&pkt, chan_info);\n \t\t\t}\n \t\t}\n+\t\trte_delay_us(time_period_s*1000000);\n+\t\tif (policy_is_set) {\n+\t\t\tfor (int j = 0; j < MAX_VMS; j++) {\n+\t\t\t\tif (policies[j].enabled == 1)\n+\t\t\t\t\tapply_policy(&policies[j]);\n+\t\t\t}\n+\t\t}\n \t}\n }\ndiff --git a/examples/vm_power_manager/channel_monitor.h b/examples/vm_power_manager/channel_monitor.h\nindex c138607..b52c1fc 100644\n--- a/examples/vm_power_manager/channel_monitor.h\n+++ b/examples/vm_power_manager/channel_monitor.h\n@@ -35,6 +35,24 @@\n #define CHANNEL_MONITOR_H_\n \n #include \"channel_manager.h\"\n+#include \"channel_commands.h\"\n+\n+struct core_share {\n+\tunsigned int pcpu;\n+\t/*\n+\t * 1 CORE SHARE\n+\t * 0 NOT SHARED\n+\t */\n+\tint status;\n+};\n+\n+struct policy {\n+\tstruct channel_packet pkt;\n+\tuint32_t pfid[MAX_VFS];\n+\tuint32_t port[MAX_VFS];\n+\tunsigned int enabled;\n+\tstruct core_share core_share[MAX_VCPU_PER_VM];\n+};\n \n #ifdef __cplusplus\n extern \"C\" {\n",
    "prefixes": [
        "dpdk-dev",
        "v5",
        "5/9"
    ]
}