List comments

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

[
    {
        "id": 101473,
        "web_url": "http://patches.dpdk.org/comment/101473/",
        "msgid": "<8c4c691c-7ca5-fe13-ba31-0f649b804060@intel.com>",
        "list_archive_url": "https://inbox.dpdk.org/dev/8c4c691c-7ca5-fe13-ba31-0f649b804060@intel.com",
        "date": "2019-09-26T13:01:44",
        "subject": "Re: [dpdk-dev] [PATCH v5 3/4] power: process incoming confirmation\n\tcmds",
        "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> Extend vm_power_guest to check incoming confirmations\n> of messages previously sent to host.\n>\n> Signed-off-by: Marcin Hajkowski <marcinx.hajkowski@intel.com>\n> ---\n>   examples/vm_power_manager/guest_cli/Makefile  |  1 +\n>   .../guest_cli/vm_power_cli_guest.c            | 73 +++++++++++++++----\n>   2 files changed, 61 insertions(+), 13 deletions(-)\n>\n> diff --git a/examples/vm_power_manager/guest_cli/Makefile b/examples/vm_power_manager/guest_cli/Makefile\n> index e35a68d0f..67cf08193 100644\n> --- a/examples/vm_power_manager/guest_cli/Makefile\n> +++ b/examples/vm_power_manager/guest_cli/Makefile\n> @@ -18,6 +18,7 @@ SRCS-y := main.c vm_power_cli_guest.c parse.c\n>   \n>   CFLAGS += -O3 -I$(RTE_SDK)/lib/librte_power/\n>   CFLAGS += $(WERROR_FLAGS)\n> +CFLAGS += -DALLOW_EXPERIMENTAL_API\n>   \n>   # workaround for a gcc bug with noreturn attribute\n>   # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603\n> 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\n> index 2d9e7689a..49ed7b208 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> @@ -27,7 +27,7 @@\n>   #define CHANNEL_PATH \"/dev/virtio-ports/virtio.serial.port.poweragent\"\n>   \n>   \n> -#define RTE_LOGTYPE_GUEST_CHANNEL RTE_LOGTYPE_USER1\n> +#define RTE_LOGTYPE_GUEST_CLI RTE_LOGTYPE_USER1\n>   \n>   struct cmd_quit_result {\n>   \tcmdline_fixed_string_t quit;\n> @@ -132,6 +132,32 @@ struct cmd_set_cpu_freq_result {\n>   \tcmdline_fixed_string_t cmd;\n>   };\n>   \n> +static int\n> +check_response_cmd(unsigned int lcore_id, int *result)\n> +{\n> +\tstruct channel_packet pkt;\n> +\tint ret;\n> +\n> +\tret = rte_power_guest_channel_receive_msg(&pkt, lcore_id);\n> +\tif (ret < 0)\n> +\t\treturn -1;\n> +\n> +\tswitch (pkt.command) {\n> +\tcase(CPU_POWER_CMD_ACK):\n> +\t\t*result = 1;\n> +\t\tbreak;\n> +\tcase(CPU_POWER_CMD_NACK):\n> +\t\t*result = 0;\n> +\t\tbreak;\n> +\tdefault:\n> +\t\tRTE_LOG(ERR, GUEST_CLI,\n> +\t\t\t\t\"Received invalid response from host, expecting ACK/NACK.\\n\");\n> +\t\treturn -1;\n> +\t}\n> +\n> +\treturn 0;\n> +}\n> +\n>   static void\n>   cmd_set_cpu_freq_parsed(void *parsed_result, struct cmdline *cl,\n>   \t\t       __attribute__((unused)) void *data)\n> @@ -139,20 +165,31 @@ cmd_set_cpu_freq_parsed(void *parsed_result, struct cmdline *cl,\n>   \tint ret = -1;\n>   \tstruct cmd_set_cpu_freq_result *res = parsed_result;\n>   \n> -\tif (!strcmp(res->cmd , \"up\"))\n> +\tif (!strcmp(res->cmd, \"up\"))\n>   \t\tret = rte_power_freq_up(res->lcore_id);\n> -\telse if (!strcmp(res->cmd , \"down\"))\n> +\telse if (!strcmp(res->cmd, \"down\"))\n>   \t\tret = rte_power_freq_down(res->lcore_id);\n> -\telse if (!strcmp(res->cmd , \"min\"))\n> +\telse if (!strcmp(res->cmd, \"min\"))\n>   \t\tret = rte_power_freq_min(res->lcore_id);\n> -\telse if (!strcmp(res->cmd , \"max\"))\n> +\telse if (!strcmp(res->cmd, \"max\"))\n>   \t\tret = rte_power_freq_max(res->lcore_id);\n>   \telse if (!strcmp(res->cmd, \"enable_turbo\"))\n>   \t\tret = rte_power_freq_enable_turbo(res->lcore_id);\n>   \telse if (!strcmp(res->cmd, \"disable_turbo\"))\n>   \t\tret = rte_power_freq_disable_turbo(res->lcore_id);\n> -\tif (ret != 1)\n> +\n> +\tif (ret != 1) {\n>   \t\tcmdline_printf(cl, \"Error sending message: %s\\n\", strerror(ret));\n> +\t\treturn;\n> +\t}\n> +\tint result;\n> +\tret = check_response_cmd(res->lcore_id, &result);\n> +\tif (ret < 0) {\n> +\t\tRTE_LOG(ERR, GUEST_CLI, \"No confirmation for sent message received\\n\");\n> +\t} else {\n> +\t\tcmdline_printf(cl, \"%s received for message sent to host.\\n\",\n> +\t\t\t\tresult == 1 ? \"ACK\" : \"NACK\");\n> +\t}\n>   }\n>   \n>   cmdline_parse_token_string_t cmd_set_cpu_freq =\n> @@ -185,16 +222,26 @@ struct cmd_send_policy_result {\n>   };\n>   \n>   static inline int\n> -send_policy(struct channel_packet *pkt)\n> +send_policy(struct channel_packet *pkt, struct cmdline *cl)\n>   {\n>   \tint ret;\n>   \n>   \tret = rte_power_guest_channel_send_msg(pkt, 1);\n> -\tif (ret == 0)\n> -\t\treturn 1;\n> -\tRTE_LOG(DEBUG, POWER, \"Error sending message: %s\\n\",\n> -\t\t\tret > 0 ? strerror(ret) : \"channel not connected\");\n> -\treturn -1;\n> +\tif (ret < 0) {\n> +\t\tRTE_LOG(ERR, GUEST_CLI, \"Error sending message: %s\\n\",\n> +\t\t\t\tret > 0 ? strerror(ret) : \"channel not connected\");\n> +\t\treturn -1;\n> +\t}\n> +\n> +\tint result;\n> +\tret = check_response_cmd(1, &result);\n> +\tif (ret < 0) {\n> +\t\tRTE_LOG(ERR, GUEST_CLI, \"No confirmation for sent policy received\\n\");\n> +\t} else {\n> +\t\tcmdline_printf(cl, \"%s for sent policy received.\\n\",\n> +\t\t\t\tresult == 1 ? \"ACK\" : \"NACK\");\n> +\t}\n> +\treturn 1;\n>   }\n>   \n>   static void\n> @@ -206,7 +253,7 @@ cmd_send_policy_parsed(void *parsed_result, struct cmdline *cl,\n>   \n>   \tif (!strcmp(res->cmd, \"now\")) {\n>   \t\tprintf(\"Sending Policy down now!\\n\");\n> -\t\tret = send_policy(&policy);\n> +\t\tret = send_policy(&policy, cl);\n>   \t}\n>   \tif (ret != 1)\n>   \t\tcmdline_printf(cl, \"Error sending message: %s\\n\",\n\n\n\nI tested this with the later patches in the set, and the acknowledges \nsuccessfully get back to the guest from the host in the form of an Ack \nor Nack for various commands sent from the guest.\n\nTested-by: David Hunt <david.hunt@intel.com>",
        "headers": {
            "X-Amp-File-Uploaded": "False",
            "Subject": "Re: [dpdk-dev] [PATCH v5 3/4] power: process incoming confirmation\n\tcmds",
            "List-Post": "<mailto:dev@dpdk.org>",
            "X-Original-To": "patchwork@dpdk.org",
            "Message-ID": "<8c4c691c-7ca5-fe13-ba31-0f649b804060@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:01:44 +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-4-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-4-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 D90D93977;\n\tThu, 26 Sep 2019 15:01:49 +0200 (CEST)",
                "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n\tby dpdk.org (Postfix) with ESMTP id 920ED37A2\n\tfor <dev@dpdk.org>; Thu, 26 Sep 2019 15:01:48 +0200 (CEST)",
                "from orsmga006.jf.intel.com ([10.7.209.51])\n\tby fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t26 Sep 2019 06:01:47 -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:01:46 -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=\"194120135\""
        }
    },
    {
        "id": 101499,
        "web_url": "http://patches.dpdk.org/comment/101499/",
        "msgid": "<F5C6929789601049BEB7272E26735598A5D380@IRSMSX106.ger.corp.intel.com>",
        "list_archive_url": "https://inbox.dpdk.org/dev/F5C6929789601049BEB7272E26735598A5D380@IRSMSX106.ger.corp.intel.com",
        "date": "2019-09-26T15:49:03",
        "subject": "Re: [dpdk-dev] [PATCH v5 3/4] power: process incoming\n\tconfirmation\tcmds",
        "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> > Extend vm_power_guest to check incoming confirmations of messages\n> > previously sent to host.\n> >\n> > Signed-off-by: Marcin Hajkowski <marcinx.hajkowski@intel.com>\n> > ---\n> >   examples/vm_power_manager/guest_cli/Makefile  |  1 +\n> >   .../guest_cli/vm_power_cli_guest.c            | 73 +++++++++++++++----\n> >   2 files changed, 61 insertions(+), 13 deletions(-)\n> >\n> > diff --git a/examples/vm_power_manager/guest_cli/Makefile\n> > b/examples/vm_power_manager/guest_cli/Makefile\n> > index e35a68d0f..67cf08193 100644\n> > --- a/examples/vm_power_manager/guest_cli/Makefile\n> > +++ b/examples/vm_power_manager/guest_cli/Makefile\n> > @@ -18,6 +18,7 @@ SRCS-y := main.c vm_power_cli_guest.c parse.c\n\n\n<...>\n\n> I tested this with the later patches in the set, and the acknowledges\n> successfully get back to the guest from the host in the form of an Ack or Nack\n> for various commands sent from the guest.\n> \n> Tested-by: David Hunt <david.hunt@intel.com>\n\nAcked-by: Lee Daly <lee.daly@intel.com>",
        "headers": {
            "X-Amp-File-Uploaded": "False",
            "Subject": "Re: [dpdk-dev] [PATCH v5 3/4] power: process incoming\n\tconfirmation\tcmds",
            "List-Post": "<mailto:dev@dpdk.org>",
            "X-Original-To": "patchwork@dpdk.org",
            "Message-ID": "<F5C6929789601049BEB7272E26735598A5D380@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": "eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMmIxMTMyM2EtNGU1OC00ZjUzLTg4MWEtNjRmY2ZiYzA4MTQyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoicnN2NzNXYzN6UkpHMmlndWZJNEVCdG5iRTJlSUk0V3BoeVpCa3NTWnpQR0U4TFJGZDFiQnFlZFJKVlNjWHVyeCJ9",
            "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:49:03 +0000",
            "In-Reply-To": "<8c4c691c-7ca5-fe13-ba31-0f649b804060@intel.com>",
            "x-ctpclassification": "CTP_NT",
            "Errors-To": "dev-bounces@dpdk.org",
            "References": "<20190405132455.15468-1-marcinx.hajkowski@intel.com>\n\t<20190405132455.15468-4-marcinx.hajkowski@intel.com>\n\t<8c4c691c-7ca5-fe13-ba31-0f649b804060@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 D1AB25B32;\n\tThu, 26 Sep 2019 17:49:08 +0200 (CEST)",
                "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id E703F4C9D\n\tfor <dev@dpdk.org>; Thu, 26 Sep 2019 17:49:06 +0200 (CEST)",
                "from orsmga008.jf.intel.com ([10.7.209.65])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t26 Sep 2019 08:49:05 -0700",
                "from irsmsx152.ger.corp.intel.com ([163.33.192.66])\n\tby orsmga008.jf.intel.com with ESMTP; 26 Sep 2019 08:49:04 -0700",
                "from irsmsx111.ger.corp.intel.com (10.108.20.4) by\n\tIRSMSX152.ger.corp.intel.com (163.33.192.66) with Microsoft SMTP\n\tServer (TLS) id 14.3.439.0; Thu, 26 Sep 2019 16:49:04 +0100",
                "from irsmsx106.ger.corp.intel.com ([169.254.8.184]) by\n\tirsmsx111.ger.corp.intel.com ([169.254.2.112]) with mapi id\n\t14.03.0439.000; Thu, 26 Sep 2019 16:49:04 +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 3/4] power: process incoming confirmation\n\tcmds",
            "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": "AQHVdGqh4WBWGWfcMUi4qOiNUF3y0ac+GpQA",
            "X-MS-TNEF-Correlator": "",
            "X-IronPort-AV": "E=Sophos;i=\"5.64,552,1559545200\"; d=\"scan'208\";a=\"183661864\""
        }
    }
]