List comments

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

[
    {
        "id": 81961,
        "web_url": "http://patches.dpdk.org/comment/81961/",
        "msgid": "<66AC0AE4-15C7-4DEF-B971-714C3C80CCE8@intel.com>",
        "date": "2018-06-07T19:01:09",
        "subject": "Re: [dpdk-dev] [PATCH 20/22] net/tap: enable port detach on\n\tsecondary\tprocess",
        "submitter": {
            "id": 166,
            "url": "http://patches.dpdk.org/api/people/166/",
            "name": "Wiles, Keith",
            "email": "keith.wiles@intel.com"
        },
        "content": "> On Jun 7, 2018, at 5:38 AM, Qi Zhang <qi.z.zhang@intel.com> wrote:\n> \n> Previously, detach port on secondary process will mess primary\n> process and cause same device can't be attached again, by take\n> advantage of rte_eth_release_port_local, we can support this with\n> minor change.\n\nPreviously, detach ports on secondary process will mess with the primary\nprocess and cause the device to be not able to attach again. Taking\nadvantage of the rte_eth_release_port_local call we can fix the problem\nwith minor changes.\n\n> \n> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>\n> ---\n> drivers/net/tap/rte_eth_tap.c | 17 +++++++++++++++--\n> 1 file changed, 15 insertions(+), 2 deletions(-)\n> \n> diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c\n> index 5531fe9d9..56d3b6cc9 100644\n> --- a/drivers/net/tap/rte_eth_tap.c\n> +++ b/drivers/net/tap/rte_eth_tap.c\n> @@ -1759,6 +1759,7 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)\n> \t\t}\n> \t\t/* TODO: request info from primary to set up Rx and Tx */\n> \t\teth_dev->dev_ops = &ops;\n> +\t\teth_dev->device = &dev->device;\n> \t\trte_eth_dev_probing_finish(eth_dev);\n> \t\treturn 0;\n> \t}\n> @@ -1827,12 +1828,24 @@ rte_pmd_tap_remove(struct rte_vdev_device *dev)\n> {\n> \tstruct rte_eth_dev *eth_dev = NULL;\n> \tstruct pmd_internals *internals;\n> +\tconst char *name;\n> \tint i;\n> \n> +\tname = rte_vdev_device_name(dev);\n> \t/* find the ethdev entry */\n> -\teth_dev = rte_eth_dev_allocated(rte_vdev_device_name(dev));\n> +\teth_dev = rte_eth_dev_allocated(name);\n> \tif (!eth_dev)\n> -\t\treturn 0;\n> +\t\treturn -ENODEV;\n> +\n> +\tif (rte_eal_process_type() != RTE_PROC_PRIMARY) {\n> +\t\t/* detach device on local pprocess only */\n\n/pprocess/process/\n> +\t\tif (strlen(rte_vdev_device_args(dev)) == 0)\n\nWhat does strlen() do with a null string returned by rte_vdev_device_args(), I believe it just returns with zero, but we need to make sure. If it does not then we must protect strlen().\n\n> +\t\t\treturn rte_eth_dev_release_port_local(eth_dev);\n> +\t\t/**\n> +\t\t * else this is a private device for current process\n> +\t\t * so continue with normal detach scenario\n> +\t\t */\n> +\t}\n> \n> \tinternals = eth_dev->data->dev_private;\n> \n> -- \n> 2.13.6\n> \n\nRegards,\nKeith",
        "headers": {
            "List-Subscribe": "<https://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
            "Accept-Language": "en-US",
            "X-IronPort-AV": "E=Sophos;i=\"5.49,487,1520924400\"; d=\"scan'208\";a=\"48140195\"",
            "Thread-Index": "AQHT/lz5bpcxzHmBrE6HzqkdncPywaRVnGcA",
            "CC": "Thomas Monjalon <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>",
            "X-Amp-File-Uploaded": "False",
            "Precedence": "list",
            "Thread-Topic": "[dpdk-dev] [PATCH 20/22] net/tap: enable port detach on\n\tsecondary\tprocess",
            "List-Post": "<mailto:dev@dpdk.org>",
            "X-Original-To": "patchwork@dpdk.org",
            "Sender": "\"dev\" <dev-bounces@dpdk.org>",
            "X-Mailman-Version": "2.1.15",
            "MIME-Version": "1.0",
            "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
            "X-MS-TNEF-Correlator": "",
            "References": "<20180607123849.14439-1-qi.z.zhang@intel.com>\n\t<20180607123849.14439-21-qi.z.zhang@intel.com>",
            "Subject": "Re: [dpdk-dev] [PATCH 20/22] net/tap: enable port detach on\n\tsecondary\tprocess",
            "Content-Type": "text/plain; charset=\"us-ascii\"",
            "Delivered-To": "patchwork@dpdk.org",
            "Received": [
                "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 46D20F984;\n\tThu,  7 Jun 2018 21:01:13 +0200 (CEST)",
                "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id BB1E77EB0\n\tfor <dev@dpdk.org>; Thu,  7 Jun 2018 21:01:11 +0200 (CEST)",
                "from orsmga006.jf.intel.com ([10.7.209.51])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t07 Jun 2018 12:01:10 -0700",
                "from fmsmsx104.amr.corp.intel.com ([10.18.124.202])\n\tby orsmga006.jf.intel.com with ESMTP; 07 Jun 2018 12:01:10 -0700",
                "from fmsmsx112.amr.corp.intel.com (10.18.116.6) by\n\tfmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP\n\tServer (TLS) id 14.3.319.2; Thu, 7 Jun 2018 12:01:09 -0700",
                "from fmsmsx117.amr.corp.intel.com ([169.254.3.220]) by\n\tFMSMSX112.amr.corp.intel.com ([169.254.5.199]) with mapi id\n\t14.03.0319.002; Thu, 7 Jun 2018 12:01:09 -0700"
            ],
            "x-originating-ip": "[10.252.143.59]",
            "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
            "X-Amp-Result": "SKIPPED(no attachment in message)",
            "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
            "X-BeenThere": "dev@dpdk.org",
            "List-Unsubscribe": "<https://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
            "X-ExtLoop1": "1",
            "Message-ID": "<66AC0AE4-15C7-4DEF-B971-714C3C80CCE8@intel.com>",
            "Date": "Thu, 7 Jun 2018 19:01:09 +0000",
            "Content-Transfer-Encoding": "quoted-printable",
            "To": "\"Zhang, Qi Z\" <qi.z.zhang@intel.com>",
            "X-MS-Has-Attach": "",
            "From": "\"Wiles, Keith\" <keith.wiles@intel.com>",
            "Content-ID": "<C66B68BF856C7645B7393E73C954ADC8@intel.com>",
            "In-Reply-To": "<20180607123849.14439-21-qi.z.zhang@intel.com>",
            "Return-Path": "<dev-bounces@dpdk.org>",
            "Errors-To": "dev-bounces@dpdk.org",
            "Content-Language": "en-US"
        }
    }
]