Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/42533/?format=api
http://patches.dpdk.org/api/patches/42533/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180706141826.204044-17-qi.z.zhang@intel.com/", "project": { "id": 1, "url": "http://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": "<20180706141826.204044-17-qi.z.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20180706141826.204044-17-qi.z.zhang@intel.com", "date": "2018-07-06T14:18:23", "name": "[v9,16/19] net/tap: enable port detach on secondary process", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "fbc987744dfc6eab1702ba8e2fbd4bd8eb995dba", "submitter": { "id": 504, "url": "http://patches.dpdk.org/api/people/504/?format=api", "name": "Qi Zhang", "email": "qi.z.zhang@intel.com" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180706141826.204044-17-qi.z.zhang@intel.com/mbox/", "series": [ { "id": 457, "url": "http://patches.dpdk.org/api/series/457/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=457", "date": "2018-07-06T14:18:07", "name": "enable hotplug on multi-process", "version": 9, "mbox": "http://patches.dpdk.org/series/457/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/42533/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/42533/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 3A1501BF86;\n\tFri, 6 Jul 2018 16:18:49 +0200 (CEST)", "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby dpdk.org (Postfix) with ESMTP id 7A81D1BED5\n\tfor <dev@dpdk.org>; Fri, 6 Jul 2018 16:18:28 +0200 (CEST)", "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t06 Jul 2018 07:18:27 -0700", "from dpdk51.sh.intel.com ([10.67.110.190])\n\tby fmsmga006.fm.intel.com with ESMTP; 06 Jul 2018 07:18:14 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.51,316,1526367600\"; d=\"scan'208\";a=\"243511389\"", "From": "Qi Zhang <qi.z.zhang@intel.com>", "To": "thomas@monjalon.net,\n\tanatoly.burakov@intel.com", "Cc": "konstantin.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, Qi Zhang <qi.z.zhang@intel.com>", "Date": "Fri, 6 Jul 2018 22:18:23 +0800", "Message-Id": "<20180706141826.204044-17-qi.z.zhang@intel.com>", "X-Mailer": "git-send-email 2.13.6", "In-Reply-To": "<20180706141826.204044-1-qi.z.zhang@intel.com>", "References": "<20180607123849.14439-1-qi.z.zhang@intel.com>\n\t<20180706141826.204044-1-qi.z.zhang@intel.com>", "Subject": "[dpdk-dev] [PATCH v9 16/19] net/tap: enable port detach on\n\tsecondary process", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Previously, detach port on a secondary process will mess primary\nprocess and cause the same device can't be attached back again.\nA secondary process should use rte_eth_release_port_private to\nrelease a port.\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\nAcked-by: Keith Wiles <keith.wiles@intel.com>\n---\n drivers/net/tap/rte_eth_tap.c | 17 +++++++++++++++--\n 1 file changed, 15 insertions(+), 2 deletions(-)", "diff": "diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c\nindex df396bfde..bb5f20b01 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+\t\tif (strlen(rte_vdev_device_args(dev)) == 0)\n+\t\t\treturn rte_eth_dev_release_port_private(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", "prefixes": [ "v9", "16/19" ] }{ "id": 42533, "url": "