Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/41765/?format=api
https://patches.dpdk.org/api/patches/41765/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20180628015247.42232-14-qi.z.zhang@intel.com/", "project": { "id": 1, "url": "https://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": "<20180628015247.42232-14-qi.z.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20180628015247.42232-14-qi.z.zhang@intel.com", "date": "2018-06-28T01:52:41", "name": "[v6,13/19] net/octeontx: enable port detach on secondary process", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "b2b8b117dff1549a9016fbcb50faf4a0b27c7ce6", "submitter": { "id": 504, "url": "https://patches.dpdk.org/api/people/504/?format=api", "name": "Qi Zhang", "email": "qi.z.zhang@intel.com" }, "delegate": { "id": 1, "url": "https://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20180628015247.42232-14-qi.z.zhang@intel.com/mbox/", "series": [ { "id": 278, "url": "https://patches.dpdk.org/api/series/278/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=278", "date": "2018-06-28T01:52:28", "name": "enable hotplug on multi-process", "version": 6, "mbox": "https://patches.dpdk.org/series/278/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/41765/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/41765/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 AE3A41B439;\n\tThu, 28 Jun 2018 03:53:07 +0200 (CEST)", "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby dpdk.org (Postfix) with ESMTP id 5417B1B3AE\n\tfor <dev@dpdk.org>; Thu, 28 Jun 2018 03:52:45 +0200 (CEST)", "from orsmga008.jf.intel.com ([10.7.209.65])\n\tby fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t27 Jun 2018 18:52:43 -0700", "from dpdk51.sh.intel.com ([10.67.110.190])\n\tby orsmga008.jf.intel.com with ESMTP; 27 Jun 2018 18:52:39 -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,281,1526367600\"; d=\"scan'208\";a=\"52818222\"", "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": "Thu, 28 Jun 2018 09:52:41 +0800", "Message-Id": "<20180628015247.42232-14-qi.z.zhang@intel.com>", "X-Mailer": "git-send-email 2.13.6", "In-Reply-To": "<20180628015247.42232-1-qi.z.zhang@intel.com>", "References": "<20180607123849.14439-1-qi.z.zhang@intel.com>\n\t<20180628015247.42232-1-qi.z.zhang@intel.com>", "Subject": "[dpdk-dev] [PATCH v6 13/19] net/octeontx: 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 secondary process will mess primary\nprocess and cause same device can't be attached again, by take\nadvantage of rte_eth_release_port_private, we can support this\nwith minor change.\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n drivers/net/octeontx/octeontx_ethdev.c | 16 ++++++++++++++++\n 1 file changed, 16 insertions(+)", "diff": "diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c\nindex 1eb453b21..497bacdc6 100644\n--- a/drivers/net/octeontx/octeontx_ethdev.c\n+++ b/drivers/net/octeontx/octeontx_ethdev.c\n@@ -1016,6 +1016,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,\n \n \t\teth_dev->tx_pkt_burst = octeontx_xmit_pkts;\n \t\teth_dev->rx_pkt_burst = octeontx_recv_pkts;\n+\t\teth_dev->device = &dev->device;\n \t\trte_eth_dev_probing_finish(eth_dev);\n \t\treturn 0;\n \t}\n@@ -1138,6 +1139,18 @@ octeontx_remove(struct rte_vdev_device *dev)\n \t\tif (eth_dev == NULL)\n \t\t\treturn -ENODEV;\n \n+\t\tif (rte_eal_process_type() != RTE_PROC_PRIMARY) {\n+\t\t\t/* detach device on local pprocess only */\n+\t\t\tif (strlen(rte_vdev_device_args(dev)) == 0) {\n+\t\t\t\trte_eth_dev_release_port_private(eth_dev);\n+\t\t\t\tcontinue;\n+\t\t\t}\n+\t\t\t/**\n+\t\t\t * else this is a private device for current process\n+\t\t\t * so continue with normal detach scenario\n+\t\t\t */\n+\t\t}\n+\n \t\tnic = octeontx_pmd_priv(eth_dev);\n \t\trte_event_dev_stop(nic->evdev);\n \t\tPMD_INIT_LOG(INFO, \"Closing octeontx device %s\", octtx_name);\n@@ -1148,6 +1161,9 @@ octeontx_remove(struct rte_vdev_device *dev)\n \t\trte_event_dev_close(nic->evdev);\n \t}\n \n+\tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n+\t\treturn 0;\n+\n \t/* Free FC resource */\n \tocteontx_pko_fc_free();\n \n", "prefixes": [ "v6", "13/19" ] }{ "id": 41765, "url": "