List comments

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

[
    {
        "id": 81974,
        "web_url": "http://patches.dpdk.org/comment/81974/",
        "msgid": "<856a4948-756a-16e7-95c8-c61ecf52916e@nxp.com>",
        "list_archive_url": "https://inbox.dpdk.org/dev/856a4948-756a-16e7-95c8-c61ecf52916e@nxp.com",
        "date": "2018-06-08T11:12:24",
        "subject": "Re: [dpdk-dev] [PATCH 01/22] eal: introduce one device scan",
        "submitter": {
            "id": 497,
            "url": "http://patches.dpdk.org/api/people/497/",
            "name": "Shreyansh Jain",
            "email": "shreyansh.jain@nxp.com"
        },
        "content": "On 6/7/2018 6:08 PM, Qi Zhang wrote:\n> When hot plug a new device, it is not necessary to scan everything\n> on the bus since the devname and devargs are already there. So new\n> rte_bus ops \"scan_one\" is introduced, bus driver can implement this\n> function to simply the hotplug process.\n              ^^^^^^^^^\n              simplify\n\n> \n> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>\n> ---\n>   lib/librte_eal/common/eal_common_dev.c  | 17 +++++++++++++----\n>   lib/librte_eal/common/include/rte_bus.h |  4 ++++\n>   2 files changed, 17 insertions(+), 4 deletions(-)\n> \n> diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c\n> index 61cb3b162..1ad033536 100644\n> --- a/lib/librte_eal/common/eal_common_dev.c\n> +++ b/lib/librte_eal/common/eal_common_dev.c\n> @@ -147,11 +147,20 @@ int __rte_experimental rte_eal_hotplug_add(const char *busname, const char *devn\n>   \tif (ret)\n>   \t\tgoto err_devarg;\n>   \n> -\tret = bus->scan();\n> -\tif (ret)\n> -\t\tgoto err_devarg;\n> +\t/**\n> +\t * if bus support to scan specific device by devargs,\n> +\t * we don't need to scan all devices on the bus.\n> +\t */\n> +\tif (bus->scan_one) {\n> +\t\tdev = bus->scan_one(da);\n> +\t} else {\n> +\t\tret = bus->scan();\n> +\t\tif (ret)\n> +\t\t\tgoto err_devarg;\n> +\n> +\t\tdev = bus->find_device(NULL, cmp_detached_dev_name, devname);\n> +\t}\n>   \n> -\tdev = bus->find_device(NULL, cmp_detached_dev_name, devname);\n>   \tif (dev == NULL) {\n>   \t\tRTE_LOG(ERR, EAL, \"Cannot find unplugged device (%s)\\n\",\n>   \t\t\tdevname);\n> diff --git a/lib/librte_eal/common/include/rte_bus.h b/lib/librte_eal/common/include/rte_bus.h\n> index eb9eded4e..b15cff892 100644\n> --- a/lib/librte_eal/common/include/rte_bus.h\n> +++ b/lib/librte_eal/common/include/rte_bus.h\n> @@ -83,6 +83,7 @@ enum rte_iova_mode {\n>    */\n>   typedef int (*rte_bus_scan_t)(void);\n>   \n> +typedef struct rte_device *(*rte_bus_scan_one_t)(struct rte_devargs *);\n\nYou should add comments over the declaration, just like the other \nsimilar declarations.\nAnd, a new line should be here.\n\n>   /**\n>    * Implementation specific probe function which is responsible for linking\n>    * devices on that bus with applicable drivers.\n> @@ -95,6 +96,8 @@ typedef int (*rte_bus_scan_t)(void);\n>    */\n>   typedef int (*rte_bus_probe_t)(void);\n>   \n> +\n> +\n\nAnd please remove the extra lines added above in next version of patch.\n\n>   /**\n>    * Device iterator to find a device on a bus.\n>    *\n> @@ -204,6 +207,7 @@ struct rte_bus {\n>   \tTAILQ_ENTRY(rte_bus) next;   /**< Next bus object in linked list */\n>   \tconst char *name;            /**< Name of the bus */\n>   \trte_bus_scan_t scan;         /**< Scan for devices attached to bus */\n> +\trte_bus_scan_one_t scan_one; /**< Scan one device by devargs */\n\nI think you mean \"Scan one device using devargs\" rather than \"Scan one \ndevice by devargs\".\n\n>   \trte_bus_probe_t probe;       /**< Probe devices on bus */\n>   \trte_bus_find_device_t find_device; /**< Find a device on the bus */\n>   \trte_bus_plug_t plug;         /**< Probe single device for drivers */\n>",
        "headers": {
            "Content-Language": "en-US",
            "Return-Path": "<dev-bounces@dpdk.org>",
            "MIME-Version": "1.0",
            "Sender": "\"dev\" <dev-bounces@dpdk.org>",
            "X-Microsoft-Exchange-Diagnostics": [
                "1; DB6PR0402MB2774;\n\t3:DJgzB124TAFrw6H9Jg+or0UXDAOy9xk8p8vKDgldolOQ1ppnhcty8jCTY+WF9BhEM9ypwKv7RmionXgS6It3+cAfo6dOXsbwSCZqRZzIl1/AWT/rGhol2VbhgYz97WVumm6M/mR0R5Cqh/uqEExyxnw1tFtyBrHh5+Tq9tPI0RiPAVuO1KWePBcZl6ZCMJ5VEGw1HFZPSB6vTqiri6sZAVp9tLn22TqFx/MDqYC1j8GJpskY/iEURXD5Rj9F9+ge;\n\t25:z8FBnZe6Yp2d6Vf4LKTq0wz8GuJDv1jRTCCobIaRF6FLVRtuOc9q/tXdoREOGDlQyKKKEUtEh3WohYaYPNF4E3h0qQLoQGqqNEKvQEr9Knj7Omgc+IKHGf3fQEApUSI3SmY6fYBt5vec17GX3v+gNKIxqJiw5LM7SJAeG1cUa6YGw085eevPRst3+Fx8XloB7Fz3y3Y+tTIc63bJFumvvrmq5S6WPxiWKXe/+FsMUvUfxwR9IttWmnlHqHyA/volfqN7guojO2RTbyXD+mgwlDEbPX70F4xzg4cB7z8oj/msrn5pjJUQGQVKZtdm/h1Eoe8DeQB61wvQ4X+xCRetWw==;\n\t31:9H5dNNysu/qS77uOhO0RaaAKwkA5lW2bdKYIA3v2o5hN8belxuMtzxcV84phHL2LRbIsS4zkBKysowgExVib/MXOOiI6m3lck1l61Kp8mZAz/GtdVIhmi9JSZZVr8ChLEHU5aMNYknzElEfIC45uyKuqqu5sCdN6dOriOq4YzCzWclre0oFwcBRdtWPiX55YzUAIfml+yLmR3/D8hn78AGcfC5rnOHK6GEt/+PQNRYE=",
                "1; DB6PR0402MB2774;\n\t20:crla4htVxBC0zeiDB0I7Z19bpZJWsWHYv3sBQuimyWXA/avCXF7Ucucdy+AY555kMlrAHyKtDVwvGSbeNGJQUeE7icF9G3ztCnTtSWw3vndEFSR2wwO5wXV9qVr/ANn3oldfNJl4mCxy5LEtDDffDGX0abca3kvUwil+drch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hVrj4GXOm0uwDA==;\n\t5:2VaEzx1Zp4WAtqq/p+gbrJSwUWz8KCw//7p77vXxjw/nfvuxp0upNAZ9OhxYbUbNoVmVwVksGTelF5hTAeFsM8l4q36jYT1jfZiK9HXCsfcChdk/2+WQpqIe4c8chiCQ/+OVyyK1Yh0doFultXbAfLoaWQp34SjK9Uk2Da1I27M=;\n\t24:oHCHtB7FNc2fvq0/buwzV5+OC8kmacY53zT0XxPv55G/kQZCPbKkOFMX/FaXyS6VYzgAhYk5cFN3CYPuj8G4nGPsaseUMIDA6Oe+JYWa/j4=",
                "1; DB6PR0402MB2774;\n\t7:tcLrpWFmtqBbSTusTFKcZIBFEUt51ATnF+dc5wqLMSG4piYA1JYguvtMNMBDCNBah2M8KJ3YovE2Tr4y4v7hEGOrR6vfrYtX2b8zVIqYgTv60SP8oBs21UsYXW66g+LSWMxSjR2yZjSJXOax468OfKb3dulwZN1xdl+HT4ECWaBZsWiQbif3hhPXCDzCIqEJdqL03bGNqeJbgPN5mgXITHcqH9E+Ec5ix19LgGo++yLGkmmVon2KwTuosdglz7zW"
            ],
            "X-Forefront-Antispam-Report": "SFV:NSPM;\n\tSFS:(10009020)(6049001)(39380400002)(346002)(39860400002)(366004)(396003)(376002)(199004)(189003)(31686004)(5660300001)(65826007)(3260700006)(3846002)(6116002)(44832011)(186003)(476003)(5890100001)(2616005)(956004)(16526019)(81156014)(31696002)(230700001)(81166006)(86362001)(5009440100003)(8676002)(8936002)(486006)(6486002)(47776003)(229853002)(68736007)(478600001)(52146003)(23676004)(2486003)(2906002)(50466002)(305945005)(64126003)(67846002)(7736002)(316002)(66066001)(6666003)(4326008)(58126008)(16576012)(36756003)(446003)(55236004)(53546011)(76176011)(386003)(25786009)(106356001)(11346002)(77096007)(105586002)(26005)(6246003)(53936002)(97736004)(52116002)(65806001)(65956001)(6916009)(110426005);\n\tDIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0402MB2774; H:[10.232.40.129];\n\tFPR:; \n\tSPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; ",
            "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
            "References": "<20180607123849.14439-1-qi.z.zhang@intel.com>\n\t<20180607123849.14439-2-qi.z.zhang@intel.com>",
            "In-Reply-To": "<20180607123849.14439-2-qi.z.zhang@intel.com>",
            "SpamDiagnosticOutput": "1:99",
            "List-Subscribe": "<https://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
            "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "DB6PR0402MB2774",
            "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "08 Jun 2018 11:12:43.0996\n\t(UTC)",
            "List-Unsubscribe": "<https://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
            "SpamDiagnosticMetadata": "NSPM",
            "Content-Type": "text/plain; charset=utf-8; format=flowed",
            "X-MS-PublicTrafficType": "Email",
            "X-Originating-IP": "[14.142.187.166]",
            "Content-Transfer-Encoding": "7bit",
            "X-MS-Exchange-CrossTenant-FromEntityHeader": "Hosted",
            "X-BeenThere": "dev@dpdk.org",
            "X-Forefront-PRVS": "06973FFAD3",
            "X-MS-Exchange-CrossTenant-Network-Message-Id": "d87824d1-7084-4151-eb3c-08d5cd30c358",
            "Date": "Fri, 8 Jun 2018 16:42:24 +0530",
            "Errors-To": "dev-bounces@dpdk.org",
            "X-Microsoft-Antispam-Message-Info": "5oXcPdNvtSADaSgh9zwTFimEFyqazU7s2yeu0dziA5rLiuNK36PLMgJgoEo7bfbwU4gYupJNMNS79h1YAZFNVn78bLEfzoST99MWHZUYfMXjWoNjDHTRtk11pt4t/xmvQ2ZybTd+AS/nAhpB9Evc0kWOfyYAWtVgqRL3bEhoQZgSfw0+/uQ8ywmGcqCS5TnT",
            "Received-SPF": "None (protection.outlook.com: nxp.com does not designate\n\tpermitted sender hosts)",
            "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1;\n\th=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n\tbh=FG+akwlSgJ13cM2D/ucNdxZYQ0tux9AUzvF+mKM8pF8=;\n\tb=MEpYvELtrloDKyIuYEmbFz5ocFGaibXuDnPoXvT9bRfDJN0Z9epDNvRe/xhcjiCGIwKHFHC6pWaGpaeI546PaaFImC+WnoVCenJF/HUM8vsMl6U42EnPwC882ajAL7S5eIcdfrVWdq9HbeQZaKKzKiv0yYygVSYMMccGeEbtH18=",
            "X-MS-Exchange-CrossTenant-Id": "686ea1d3-bc2b-4c6f-a92c-d99c5c301635",
            "From": "Shreyansh Jain <shreyansh.jain@nxp.com>",
            "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
            "To": "Qi Zhang <qi.z.zhang@intel.com>",
            "Received": [
                "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 0A5C55B30;\n\tFri,  8 Jun 2018 13:12:49 +0200 (CEST)",
                "from EUR01-HE1-obe.outbound.protection.outlook.com\n\t(mail-he1eur01on0088.outbound.protection.outlook.com [104.47.0.88])\n\tby dpdk.org (Postfix) with ESMTP id 718875B2C\n\tfor <dev@dpdk.org>; Fri,  8 Jun 2018 13:12:48 +0200 (CEST)",
                "from [10.232.40.129] (14.142.187.166) by\n\tDB6PR0402MB2774.eurprd04.prod.outlook.com (2603:10a6:4:96::11) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n\t15.20.841.13; Fri, 8 Jun 2018 11:12:43 +0000"
            ],
            "X-MS-Office365-Filtering-Correlation-Id": "d87824d1-7084-4151-eb3c-08d5cd30c358",
            "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101\n\tThunderbird/52.8.0",
            "X-MS-TrafficTypeDiagnostic": "DB6PR0402MB2774:",
            "X-Microsoft-Antispam": "UriScan:; BCL:0; PCL:0;\n\tRULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);\n\tSRVR:DB6PR0402MB2774; ",
            "X-Microsoft-Antispam-PRVS": "<DB6PR0402MB277438769990E60D617C4D83907B0@DB6PR0402MB2774.eurprd04.prod.outlook.com>",
            "Delivered-To": "patchwork@dpdk.org",
            "X-Original-To": "patchwork@dpdk.org",
            "List-Post": "<mailto:dev@dpdk.org>",
            "Message-ID": "<856a4948-756a-16e7-95c8-c61ecf52916e@nxp.com>",
            "X-Exchange-Antispam-Report-CFA-Test": "BCL:0; PCL:0;\n\tRULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016);\n\tSRVR:DB6PR0402MB2774; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0402MB2774; ",
            "X-MS-Office365-Filtering-HT": "Tenant",
            "X-MS-Exchange-SenderADCheck": "1",
            "X-Mailman-Version": "2.1.15",
            "X-ClientProxiedBy": "SG2PR02CA0023.apcprd02.prod.outlook.com\n\t(2603:1096:3:17::35) To DB6PR0402MB2774.eurprd04.prod.outlook.com\n\t(2603:10a6:4:96::11)",
            "X-OriginatorOrg": "nxp.com",
            "X-Exchange-Antispam-Report-Test": "UriScan:(228905959029699);",
            "Subject": "Re: [dpdk-dev] [PATCH 01/22] eal: introduce one device scan",
            "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
            "Precedence": "list",
            "Authentication-Results": "spf=none (sender IP is )\n\tsmtp.mailfrom=shreyansh.jain@nxp.com; ",
            "Cc": "thomas@monjalon.net, anatoly.burakov@intel.com,\n\tkonstantin.ananyev@intel.com, dev@dpdk.org, bruce.richardson@intel.com,\n\tferruh.yigit@intel.com, benjamin.h.shelton@intel.com,\n\tnarender.vangati@intel.com"
        }
    },
    {
        "id": 82133,
        "web_url": "http://patches.dpdk.org/comment/82133/",
        "msgid": "<039ED4275CED7440929022BC67E7061153237730@SHSMSX103.ccr.corp.intel.com>",
        "list_archive_url": "https://inbox.dpdk.org/dev/039ED4275CED7440929022BC67E7061153237730@SHSMSX103.ccr.corp.intel.com",
        "date": "2018-06-13T13:32:38",
        "subject": "Re: [dpdk-dev] [PATCH 01/22] eal: introduce one device scan",
        "submitter": {
            "id": 504,
            "url": "http://patches.dpdk.org/api/people/504/",
            "name": "Qi Zhang",
            "email": "qi.z.zhang@intel.com"
        },
        "content": "Hi Shreyansh:\n\tThanks for your review.\n\tWill fix base on your comments in v2.\nRegards\nQi\n\n> -----Original Message-----\n> From: Shreyansh Jain [mailto:shreyansh.jain@nxp.com]\n> Sent: Friday, June 8, 2018 7:12 PM\n> To: Zhang, Qi Z <qi.z.zhang@intel.com>\n> Cc: thomas@monjalon.net; Burakov, Anatoly <anatoly.burakov@intel.com>;\n> Ananyev, Konstantin <konstantin.ananyev@intel.com>; dev@dpdk.org;\n> Richardson, Bruce <bruce.richardson@intel.com>; Yigit, Ferruh\n> <ferruh.yigit@intel.com>; Shelton, Benjamin H\n> <benjamin.h.shelton@intel.com>; Vangati, Narender\n> <narender.vangati@intel.com>\n> Subject: Re: [dpdk-dev] [PATCH 01/22] eal: introduce one device scan\n> \n> On 6/7/2018 6:08 PM, Qi Zhang wrote:\n> > When hot plug a new device, it is not necessary to scan everything on\n> > the bus since the devname and devargs are already there. So new\n> > rte_bus ops \"scan_one\" is introduced, bus driver can implement this\n> > function to simply the hotplug process.\n>               ^^^^^^^^^\n>               simplify\n> \n> >\n> > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>\n> > ---\n> >   lib/librte_eal/common/eal_common_dev.c  | 17 +++++++++++++----\n> >   lib/librte_eal/common/include/rte_bus.h |  4 ++++\n> >   2 files changed, 17 insertions(+), 4 deletions(-)\n> >\n> > diff --git a/lib/librte_eal/common/eal_common_dev.c\n> > b/lib/librte_eal/common/eal_common_dev.c\n> > index 61cb3b162..1ad033536 100644\n> > --- a/lib/librte_eal/common/eal_common_dev.c\n> > +++ b/lib/librte_eal/common/eal_common_dev.c\n> > @@ -147,11 +147,20 @@ int __rte_experimental\n> rte_eal_hotplug_add(const char *busname, const char *devn\n> >   \tif (ret)\n> >   \t\tgoto err_devarg;\n> >\n> > -\tret = bus->scan();\n> > -\tif (ret)\n> > -\t\tgoto err_devarg;\n> > +\t/**\n> > +\t * if bus support to scan specific device by devargs,\n> > +\t * we don't need to scan all devices on the bus.\n> > +\t */\n> > +\tif (bus->scan_one) {\n> > +\t\tdev = bus->scan_one(da);\n> > +\t} else {\n> > +\t\tret = bus->scan();\n> > +\t\tif (ret)\n> > +\t\t\tgoto err_devarg;\n> > +\n> > +\t\tdev = bus->find_device(NULL, cmp_detached_dev_name,\n> devname);\n> > +\t}\n> >\n> > -\tdev = bus->find_device(NULL, cmp_detached_dev_name, devname);\n> >   \tif (dev == NULL) {\n> >   \t\tRTE_LOG(ERR, EAL, \"Cannot find unplugged device (%s)\\n\",\n> >   \t\t\tdevname);\n> > diff --git a/lib/librte_eal/common/include/rte_bus.h\n> > b/lib/librte_eal/common/include/rte_bus.h\n> > index eb9eded4e..b15cff892 100644\n> > --- a/lib/librte_eal/common/include/rte_bus.h\n> > +++ b/lib/librte_eal/common/include/rte_bus.h\n> > @@ -83,6 +83,7 @@ enum rte_iova_mode {\n> >    */\n> >   typedef int (*rte_bus_scan_t)(void);\n> >\n> > +typedef struct rte_device *(*rte_bus_scan_one_t)(struct rte_devargs\n> > +*);\n> \n> You should add comments over the declaration, just like the other similar\n> declarations.\n> And, a new line should be here.\n> \n> >   /**\n> >    * Implementation specific probe function which is responsible for\n> linking\n> >    * devices on that bus with applicable drivers.\n> > @@ -95,6 +96,8 @@ typedef int (*rte_bus_scan_t)(void);\n> >    */\n> >   typedef int (*rte_bus_probe_t)(void);\n> >\n> > +\n> > +\n> \n> And please remove the extra lines added above in next version of patch.\n> \n> >   /**\n> >    * Device iterator to find a device on a bus.\n> >    *\n> > @@ -204,6 +207,7 @@ struct rte_bus {\n> >   \tTAILQ_ENTRY(rte_bus) next;   /**< Next bus object in linked list\n> */\n> >   \tconst char *name;            /**< Name of the bus */\n> >   \trte_bus_scan_t scan;         /**< Scan for devices attached to\n> bus */\n> > +\trte_bus_scan_one_t scan_one; /**< Scan one device by devargs */\n> \n> I think you mean \"Scan one device using devargs\" rather than \"Scan one\n> device by devargs\".\n> \n> >   \trte_bus_probe_t probe;       /**< Probe devices on bus */\n> >   \trte_bus_find_device_t find_device; /**< Find a device on the bus\n> */\n> >   \trte_bus_plug_t plug;         /**< Probe single device for drivers\n> */\n> >",
        "headers": {
            "To": "Shreyansh Jain <shreyansh.jain@nxp.com>",
            "x-originating-ip": "[10.239.127.40]",
            "x-titus-metadata-40": "eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDkxOGQwZTItMzcwNi00ODMzLTljNTQtMWFhMmMzYWVlZjA0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiMDJjaVY1bWk3THJYajRxbERqK3VRN0Fza2k1Vzg1bDF5a3NFT0pqcHRSaHFHcndPUDJRZE9xeTZoV0tOQWhkKyJ9",
            "x-ctpclassification": "CTP_NT",
            "Return-Path": "<dev-bounces@dpdk.org>",
            "MIME-Version": "1.0",
            "X-MS-TNEF-Correlator": "",
            "From": "\"Zhang, Qi Z\" <qi.z.zhang@intel.com>",
            "Message-ID": "<039ED4275CED7440929022BC67E7061153237730@SHSMSX103.ccr.corp.intel.com>",
            "CC": "\"thomas@monjalon.net\" <thomas@monjalon.net>, \"Burakov, Anatoly\"\n\t<anatoly.burakov@intel.com>, \"Ananyev, Konstantin\"\n\t<konstantin.ananyev@intel.com>, \"dev@dpdk.org\" <dev@dpdk.org>,\n\t\"Richardson, Bruce\" <bruce.richardson@intel.com>, \"Yigit, Ferruh\"\n\t<ferruh.yigit@intel.com>, \"Shelton, Benjamin H\"\n\t<benjamin.h.shelton@intel.com>, \"Vangati, Narender\"\n\t<narender.vangati@intel.com>",
            "List-Unsubscribe": "<https://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
            "Accept-Language": "en-US",
            "X-MS-Has-Attach": "",
            "References": "<20180607123849.14439-1-qi.z.zhang@intel.com>\n\t<20180607123849.14439-2-qi.z.zhang@intel.com>\n\t<856a4948-756a-16e7-95c8-c61ecf52916e@nxp.com>",
            "In-Reply-To": "<856a4948-756a-16e7-95c8-c61ecf52916e@nxp.com>",
            "Delivered-To": "patchwork@dpdk.org",
            "List-Subscribe": "<https://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
            "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
            "dlp-version": "11.0.200.100",
            "X-BeenThere": "dev@dpdk.org",
            "dlp-reaction": "no-action",
            "Received": [
                "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 516F31EF83;\n\tWed, 13 Jun 2018 15:32:46 +0200 (CEST)",
                "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n\tby dpdk.org (Postfix) with ESMTP id 2E2AF1EF82\n\tfor <dev@dpdk.org>; Wed, 13 Jun 2018 15:32:43 +0200 (CEST)",
                "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t13 Jun 2018 06:32:42 -0700",
                "from fmsmsx106.amr.corp.intel.com ([10.18.124.204])\n\tby fmsmga006.fm.intel.com with ESMTP; 13 Jun 2018 06:32:42 -0700",
                "from FMSMSX110.amr.corp.intel.com (10.18.116.10) by\n\tFMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP\n\tServer (TLS) id 14.3.319.2; Wed, 13 Jun 2018 06:32:42 -0700",
                "from shsmsx152.ccr.corp.intel.com (10.239.6.52) by\n\tfmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP\n\tServer (TLS) id 14.3.319.2; Wed, 13 Jun 2018 06:32:41 -0700",
                "from shsmsx103.ccr.corp.intel.com ([169.254.4.51]) by\n\tSHSMSX152.ccr.corp.intel.com ([169.254.6.70]) with mapi id\n\t14.03.0319.002; Wed, 13 Jun 2018 21:32:39 +0800"
            ],
            "X-Original-To": "patchwork@dpdk.org",
            "Content-Type": "text/plain; charset=\"utf-8\"",
            "List-Post": "<mailto:dev@dpdk.org>",
            "X-Amp-File-Uploaded": "False",
            "Content-Transfer-Encoding": "base64",
            "Thread-Index": "AQHT/lx5gfNc+0iAakOJd02kB1Nu2qRVsFIAgAiCMHA=",
            "X-IronPort-AV": "E=Sophos;i=\"5.51,218,1526367600\"; d=\"scan'208\";a=\"237096620\"",
            "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
            "Errors-To": "dev-bounces@dpdk.org",
            "Sender": "\"dev\" <dev-bounces@dpdk.org>",
            "X-ExtLoop1": "1",
            "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
            "Date": "Wed, 13 Jun 2018 13:32:38 +0000",
            "Thread-Topic": "[dpdk-dev] [PATCH 01/22] eal: introduce one device scan",
            "dlp-product": "dlpe-windows",
            "Subject": "Re: [dpdk-dev] [PATCH 01/22] eal: introduce one device scan",
            "Precedence": "list",
            "Content-Language": "en-US",
            "X-Mailman-Version": "2.1.15",
            "X-Amp-Result": "SKIPPED(no attachment in message)"
        }
    }
]