List comments

GET /api/patches/52339/comments/
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

[
    {
        "id": 101474,
        "web_url": "http://patches.dpdk.org/comment/101474/",
        "msgid": "<2811a1e6-3eb5-5e0b-1cc8-f683a43c346b@intel.com>",
        "list_archive_url": "https://inbox.dpdk.org/dev/2811a1e6-3eb5-5e0b-1cc8-f683a43c346b@intel.com",
        "date": "2019-09-26T13:06:13",
        "subject": "Re: [dpdk-dev] [PATCH v5 4/4] power: send confirmation cmd to vm\n\tguest",
        "submitter": {
            "id": 342,
            "url": "http://patches.dpdk.org/api/people/342/",
            "name": "David Hunt",
            "email": "david.hunt@intel.com"
        },
        "content": "On 05/04/2019 14:24, Hajkowski wrote:\n> From: Marcin Hajkowski <marcinx.hajkowski@intel.com>\n>\n> Use new guest channel API to send confirmation\n> message for received power command.\n>\n> Signed-off-by: Marcin Hajkowski <marcinx.hajkowski@intel.com>\n> ---\n>   examples/vm_power_manager/channel_monitor.c | 68 +++++++++++++++++++--\n>   1 file changed, 62 insertions(+), 6 deletions(-)\n>\n> diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c\n> index 7892d75de..ed580b36a 100644\n> --- a/examples/vm_power_manager/channel_monitor.c\n> +++ b/examples/vm_power_manager/channel_monitor.c\n> @@ -627,6 +627,41 @@ apply_policy(struct policy *pol)\n>   \t\tapply_workload_profile(pol);\n>   }\n>   \n> +static int\n> +write_binary_packet(struct channel_packet *pkt, struct channel_info *chan_info)\n> +{\n> +\tint ret, buffer_len = sizeof(*pkt);\n> +\tvoid *buffer = pkt;\n> +\n> +\tif (chan_info->fd < 0) {\n> +\t\tRTE_LOG(ERR, CHANNEL_MONITOR, \"Channel is not connected\\n\");\n> +\t\treturn -1;\n> +\t}\n> +\n> +\twhile (buffer_len > 0) {\n> +\t\tret = write(chan_info->fd, buffer, buffer_len);\n> +\t\tif (ret == -1) {\n> +\t\t\tif (errno == EINTR)\n> +\t\t\t\tcontinue;\n> +\t\t\tRTE_LOG(ERR, CHANNEL_MONITOR, \"Write function failed due to %s.\\n\",\n> +\t\t\t\t\tstrerror(errno));\n> +\t\t\treturn -1;\n> +\t\t}\n> +\t\tbuffer = (char *)buffer + ret;\n> +\t\tbuffer_len -= ret;\n> +\t}\n> +\treturn 0;\n> +}\n> +\n> +static int\n> +send_ack_for_received_cmd(struct channel_packet *pkt,\n> +\t\tstruct channel_info *chan_info,\n> +\t\tuint32_t command)\n> +{\n> +\tpkt->command = command;\n> +\treturn write_binary_packet(pkt, chan_info);\n> +}\n> +\n>   static int\n>   process_request(struct channel_packet *pkt, struct channel_info *chan_info)\n>   {\n> @@ -650,33 +685,54 @@ process_request(struct channel_packet *pkt, struct channel_info *chan_info)\n>   \t\tRTE_LOG(DEBUG, CHANNEL_MONITOR, \"Processing requested cmd for cpu:%d\\n\",\n>   \t\t\tcore_num);\n>   \n> +\t\tbool valid_unit = true;\n> +\t\tint scale_res;\n> +\n>   \t\tswitch (pkt->unit) {\n>   \t\tcase(CPU_POWER_SCALE_MIN):\n> -\t\t\tpower_manager_scale_core_min(core_num);\n> +\t\t\tscale_res = power_manager_scale_core_min(core_num);\n>   \t\t\tbreak;\n>   \t\tcase(CPU_POWER_SCALE_MAX):\n> -\t\t\tpower_manager_scale_core_max(core_num);\n> +\t\t\tscale_res = power_manager_scale_core_max(core_num);\n>   \t\t\tbreak;\n>   \t\tcase(CPU_POWER_SCALE_DOWN):\n> -\t\t\tpower_manager_scale_core_down(core_num);\n> +\t\t\tscale_res = power_manager_scale_core_down(core_num);\n>   \t\t\tbreak;\n>   \t\tcase(CPU_POWER_SCALE_UP):\n> -\t\t\tpower_manager_scale_core_up(core_num);\n> +\t\t\tscale_res = power_manager_scale_core_up(core_num);\n>   \t\t\tbreak;\n>   \t\tcase(CPU_POWER_ENABLE_TURBO):\n> -\t\t\tpower_manager_enable_turbo_core(core_num);\n> +\t\t\tscale_res = power_manager_enable_turbo_core(core_num);\n>   \t\t\tbreak;\n>   \t\tcase(CPU_POWER_DISABLE_TURBO):\n> -\t\t\tpower_manager_disable_turbo_core(core_num);\n> +\t\t\tscale_res = power_manager_disable_turbo_core(core_num);\n>   \t\t\tbreak;\n>   \t\tdefault:\n> +\t\t\tvalid_unit = false;\n>   \t\t\tbreak;\n>   \t\t}\n> +\n> +\t\tif (valid_unit) {\n> +\t\t\tret = send_ack_for_received_cmd(pkt,\n> +\t\t\t\t\tchan_info,\n> +\t\t\t\t\tscale_res > 0 ?\n> +\t\t\t\t\t\tCPU_POWER_CMD_ACK :\n> +\t\t\t\t\t\tCPU_POWER_CMD_NACK);\n> +\t\t\tif (ret < 0)\n> +\t\t\t\tRTE_LOG(DEBUG, CHANNEL_MONITOR, \"Error during sending ack command.\\n\");\n> +\t\t} else\n> +\t\t\tRTE_LOG(DEBUG, CHANNEL_MONITOR, \"Unexpected unit type.\\n\");\n> +\n>   \t}\n>   \n>   \tif (pkt->command == PKT_POLICY) {\n>   \t\tRTE_LOG(INFO, CHANNEL_MONITOR, \"Processing policy request %s\\n\",\n>   \t\t\t\tpkt->vm_name);\n> +\t\tint ret = send_ack_for_received_cmd(pkt,\n> +\t\t\t\tchan_info,\n> +\t\t\t\tCPU_POWER_CMD_ACK);\n> +\t\tif (ret < 0)\n> +\t\t\tRTE_LOG(DEBUG, CHANNEL_MONITOR, \"Error during sending ack command.\\n\");\n>   \t\tupdate_policy(pkt);\n>   \t\tpolicy_is_set = 1;\n>   \t}\n\nUsing the guest_cli sample app in a VM, sending commands to the \nvm_power_manager app on the host, we now have Acks and Nacks coming from \nthe host to the VM to conform the execution of the guest requests.\n\nvmpower(guest)> set_cpu_freq 3 down\nACK received for message sent to host.\nvmpower(guest)> set_cpu_freq 3 up\nACK received for message sent to host.\nvmpower(guest)> set_cpu_freq 3 up\nNACK received for message sent to host.\n\n(NACK because we're already at the maxumum frequency)\n\nAnd in the host vm_power_manager command line, we can see when a guest \nrequest cannot be processed:\nPOWER: Turbo is off, frequency can't be scaled up more 31\n\nPatchset looks good functionally.\n\nTested-by: David Hunt <david.hunt@intel.com>",
        "headers": {
            "X-Amp-File-Uploaded": "False",
            "Subject": "Re: [dpdk-dev] [PATCH v5 4/4] power: send confirmation cmd to vm\n\tguest",
            "List-Post": "<mailto:dev@dpdk.org>",
            "X-Original-To": "patchwork@dpdk.org",
            "Message-ID": "<2811a1e6-3eb5-5e0b-1cc8-f683a43c346b@intel.com>",
            "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
            "From": "\"Hunt, David\" <david.hunt@intel.com>",
            "Return-Path": "<dev-bounces@dpdk.org>",
            "X-BeenThere": "dev@dpdk.org",
            "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
            "Date": "Thu, 26 Sep 2019 14:06:13 +0100",
            "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101\n\tThunderbird/60.7.2",
            "In-Reply-To": "<20190405132455.15468-5-marcinx.hajkowski@intel.com>",
            "MIME-Version": "1.0",
            "Errors-To": "dev-bounces@dpdk.org",
            "References": "<20190405132455.15468-1-marcinx.hajkowski@intel.com>\n\t<20190405132455.15468-5-marcinx.hajkowski@intel.com>",
            "X-Amp-Result": "SKIPPED(no attachment in message)",
            "Delivered-To": "patchwork@dpdk.org",
            "Precedence": "list",
            "Received": [
                "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 9FA7C2C57;\n\tThu, 26 Sep 2019 15:06:20 +0200 (CEST)",
                "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n\tby dpdk.org (Postfix) with ESMTP id 50FE32C38\n\tfor <dev@dpdk.org>; Thu, 26 Sep 2019 15:06:18 +0200 (CEST)",
                "from orsmga006.jf.intel.com ([10.7.209.51])\n\tby fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t26 Sep 2019 06:06:17 -0700",
                "from dhunt5-mobl4.ger.corp.intel.com (HELO [10.237.221.113])\n\t([10.237.221.113])\n\tby orsmga006-auth.jf.intel.com with ESMTP/TLS/AES256-SHA;\n\t26 Sep 2019 06:06:15 -0700"
            ],
            "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
            "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
            "To": "20190402082121.5472-1-marcinx.hajkowski@intel.com",
            "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
            "Sender": "\"dev\" <dev-bounces@dpdk.org>",
            "Content-Language": "en-US",
            "Content-Type": "text/plain; charset=utf-8; format=flowed",
            "X-Mailman-Version": "2.1.15",
            "Cc": "dev@dpdk.org, Marcin Hajkowski <marcinx.hajkowski@intel.com>",
            "Content-Transfer-Encoding": "7bit",
            "X-IronPort-AV": "E=Sophos;i=\"5.64,552,1559545200\"; d=\"scan'208\";a=\"194121492\""
        }
    },
    {
        "id": 101497,
        "web_url": "http://patches.dpdk.org/comment/101497/",
        "msgid": "<F5C6929789601049BEB7272E26735598A5D361@IRSMSX106.ger.corp.intel.com>",
        "list_archive_url": "https://inbox.dpdk.org/dev/F5C6929789601049BEB7272E26735598A5D361@IRSMSX106.ger.corp.intel.com",
        "date": "2019-09-26T15:47:20",
        "subject": "Re: [dpdk-dev] [PATCH v5 4/4] power: send confirmation cmd to\n\tvm\tguest",
        "submitter": {
            "id": 825,
            "url": "http://patches.dpdk.org/api/people/825/",
            "name": "Daly, Lee",
            "email": "lee.daly@intel.com"
        },
        "content": "> On 05/04/2019 14:24, Hajkowski wrote:\n> > From: Marcin Hajkowski <marcinx.hajkowski@intel.com>\n> >\n> > Use new guest channel API to send confirmation message for received\n> > power command.\n> >\n> > Signed-off-by: Marcin Hajkowski <marcinx.hajkowski@intel.com>\n> > ---\n> >   examples/vm_power_manager/channel_monitor.c | 68\n> +++++++++++++++++++--\n> >   1 file changed, 62 insertions(+), 6 deletions(-)\n> >\n> > diff --git a/examples/vm_power_manager/channel_monitor.c\n> > b/examples/vm_power_manager/channel_monitor.c\n> > index 7892d75de..ed580b36a 100644\n> > --- a/examples/vm_power_manager/channel_monitor.c\n> > +++ b/examples/vm_power_manager/channel_monitor.c\n\n\n<...>\n\n> \n> Using the guest_cli sample app in a VM, sending commands to the\n> vm_power_manager app on the host, we now have Acks and Nacks coming\n> from the host to the VM to conform the execution of the guest requests.\n> \n> vmpower(guest)> set_cpu_freq 3 down\n> ACK received for message sent to host.\n> vmpower(guest)> set_cpu_freq 3 up\n> ACK received for message sent to host.\n> vmpower(guest)> set_cpu_freq 3 up\n> NACK received for message sent to host.\n> \n> (NACK because we're already at the maxumum frequency)\n> \n> And in the host vm_power_manager command line, we can see when a\n> guest request cannot be processed:\n> POWER: Turbo is off, frequency can't be scaled up more 31\n> \n> Patchset looks good functionally.\n> \n> Tested-by: David Hunt <david.hunt@intel.com>\n Acked-by: Lee Daly <lee.daly@intel.com>",
        "headers": {
            "X-Amp-File-Uploaded": "False",
            "Subject": "Re: [dpdk-dev] [PATCH v5 4/4] power: send confirmation cmd to\n\tvm\tguest",
            "List-Post": "<mailto:dev@dpdk.org>",
            "X-Original-To": "patchwork@dpdk.org",
            "Message-ID": "<F5C6929789601049BEB7272E26735598A5D361@IRSMSX106.ger.corp.intel.com>",
            "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
            "From": "\"Daly, Lee\" <lee.daly@intel.com>",
            "Return-Path": "<dev-bounces@dpdk.org>",
            "X-MS-Has-Attach": "",
            "X-BeenThere": "dev@dpdk.org",
            "dlp-product": "dlpe-windows",
            "dlp-reaction": "no-action",
            "x-titus-metadata-40": "eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMWRhMWYzZWYtMmNhZS00NzgzLWJiYjQtODdjNTU2MWM0YjM4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiTlBVeUhQN2hYTVB5XC9WTnM5SGtMVWpPS09CeVdTbnRIcUozMGdSTWVcLzAxdXIrV0x5V0EyK3pZRnVNRCs2aXh4In0=",
            "Accept-Language": "en-US",
            "CC": "\"dev@dpdk.org\" <dev@dpdk.org>, Marcin Hajkowski\n\t<marcinx.hajkowski@intel.com>",
            "Date": "Thu, 26 Sep 2019 15:47:20 +0000",
            "In-Reply-To": "<2811a1e6-3eb5-5e0b-1cc8-f683a43c346b@intel.com>",
            "x-ctpclassification": "CTP_NT",
            "Errors-To": "dev-bounces@dpdk.org",
            "References": "<20190405132455.15468-1-marcinx.hajkowski@intel.com>\n\t<20190405132455.15468-5-marcinx.hajkowski@intel.com>\n\t<2811a1e6-3eb5-5e0b-1cc8-f683a43c346b@intel.com>",
            "X-Amp-Result": "SKIPPED(no attachment in message)",
            "Delivered-To": "patchwork@dpdk.org",
            "Precedence": "list",
            "Received": [
                "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id C9C602C57;\n\tThu, 26 Sep 2019 17:47:25 +0200 (CEST)",
                "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id DCE452BEA\n\tfor <dev@dpdk.org>; Thu, 26 Sep 2019 17:47:23 +0200 (CEST)",
                "from orsmga006.jf.intel.com ([10.7.209.51])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t26 Sep 2019 08:47:22 -0700",
                "from irsmsx108.ger.corp.intel.com ([163.33.3.3])\n\tby orsmga006.jf.intel.com with ESMTP; 26 Sep 2019 08:47:21 -0700",
                "from irsmsx112.ger.corp.intel.com (10.108.20.5) by\n\tIRSMSX108.ger.corp.intel.com (163.33.3.3) with Microsoft SMTP Server\n\t(TLS) id 14.3.439.0; Thu, 26 Sep 2019 16:47:20 +0100",
                "from irsmsx106.ger.corp.intel.com ([169.254.8.184]) by\n\tirsmsx112.ger.corp.intel.com ([169.254.1.33]) with mapi id\n\t14.03.0439.000; Thu, 26 Sep 2019 16:47:20 +0100"
            ],
            "x-originating-ip": "[163.33.239.181]",
            "MIME-Version": "1.0",
            "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
            "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
            "Thread-Topic": "[dpdk-dev] [PATCH v5 4/4] power: send confirmation cmd to vm\n\tguest",
            "To": "\"Hunt, David\" <david.hunt@intel.com>",
            "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
            "Sender": "\"dev\" <dev-bounces@dpdk.org>",
            "Content-Language": "en-US",
            "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
            "Content-Type": "text/plain; charset=\"utf-8\"",
            "X-ExtLoop1": "1",
            "Content-Transfer-Encoding": "base64",
            "dlp-version": "11.2.0.6",
            "X-Mailman-Version": "2.1.15",
            "Thread-Index": "AQHVdGs/0qLvujLVJkqnP4KU8O+Iaac+GdpQ",
            "X-MS-TNEF-Correlator": "",
            "X-IronPort-AV": "E=Sophos;i=\"5.64,552,1559545200\"; d=\"scan'208\";a=\"194166362\""
        }
    }
]