Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/59848/?format=api
http://patchwork.dpdk.org/api/patches/59848/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20190926100558.24348-11-pbhagavatula@marvell.com/", "project": { "id": 1, "url": "http://patchwork.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": "<20190926100558.24348-11-pbhagavatula@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190926100558.24348-11-pbhagavatula@marvell.com", "date": "2019-09-26T10:05:57", "name": "[10/11] examples/l3fwd: add graceful teardown for eventdevice", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "ccbaf604f7eaa7cfa862bc7632c64b07171002dd", "submitter": { "id": 1183, "url": "http://patchwork.dpdk.org/api/people/1183/?format=api", "name": "Pavan Nikhilesh Bhagavatula", "email": "pbhagavatula@marvell.com" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20190926100558.24348-11-pbhagavatula@marvell.com/mbox/", "series": [ { "id": 6542, "url": "http://patchwork.dpdk.org/api/series/6542/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=6542", "date": "2019-09-26T10:05:47", "name": "example/l3fwd: introduce event device support", "version": 1, "mbox": "http://patchwork.dpdk.org/series/6542/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/59848/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/59848/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 AA0D31BFB4;\n\tThu, 26 Sep 2019 12:06:45 +0200 (CEST)", "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n\t[67.231.156.173]) by dpdk.org (Postfix) with ESMTP id CE4221BFAB\n\tfor <dev@dpdk.org>; Thu, 26 Sep 2019 12:06:42 +0200 (CEST)", "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n\tby mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id\n\tx8QA4gPh032601; Thu, 26 Sep 2019 03:06:42 -0700", "from sc-exch04.marvell.com ([199.233.58.184])\n\tby mx0b-0016f401.pphosted.com with ESMTP id 2v8u5dr1c7-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); \n\tThu, 26 Sep 2019 03:06:42 -0700", "from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH04.marvell.com\n\t(10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3;\n\tThu, 26 Sep 2019 03:06:40 -0700", "from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com\n\t(10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend\n\tTransport; Thu, 26 Sep 2019 03:06:40 -0700", "from BG-LT7430.marvell.com (unknown [10.28.17.15])\n\tby maili.marvell.com (Postfix) with ESMTP id 91C0A3F703F;\n\tThu, 26 Sep 2019 03:06:37 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n\th=from : to : cc :\n\tsubject : date : message-id : in-reply-to : references : mime-version\n\t: content-transfer-encoding : content-type; s=pfpt0818;\n\tbh=5IGMOTkw+GFreDBssguXk0sm+1M8SrancnXRuY0a0Eg=;\n\tb=jtOxfJQl/6LkIDOg5Tj5Kxm7QuOKS0SrC5LObqStLxlYI4t5Or2fl/Gvv0KMbO9itfvi\n\te/nXPdygPntWOqgDUMtbBAgJrtvc7Mqbjh71EMId5kDbR+KvHOnllK++No1O1pHJnL8R\n\tONb+YYuT9zw2Lhyhs8q4nURULjQ5eW28BMNA9SUD3W17Oew1Lzlm73AudxkWe2cZ5Gif\n\tJeyoT9gmB1Q3yyk79kd5prozZtdQwY9Idya9lhiBl0q9g0ZVRVUrwgc8lc45cu32gpBl\n\t4DWcizvpwILdK6CGnHcb0EFmtRAGbFWKrAc2xRr77pbq/oP810diEfnVmsqD5WsbXEfz\n\tuQ== ", "From": "<pbhagavatula@marvell.com>", "To": "<jerinj@marvell.com>, <akhil.goyal@nxp.com>, Marko Kovacevic\n\t<marko.kovacevic@intel.com>, Ori Kam <orika@mellanox.com>,\n\tBruce Richardson\n\t<bruce.richardson@intel.com>, Radu Nicolau <radu.nicolau@intel.com>, \n\t\"Tomasz Kantecki\" <tomasz.kantecki@intel.com>", "CC": "<dev@dpdk.org>, Pavan Nikhilesh <pbhagavatula@marvell.com>", "Date": "Thu, 26 Sep 2019 15:35:57 +0530", "Message-ID": "<20190926100558.24348-11-pbhagavatula@marvell.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20190926100558.24348-1-pbhagavatula@marvell.com>", "References": "<20190926100558.24348-1-pbhagavatula@marvell.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.95,1.0.8\n\tdefinitions=2019-09-26_04:2019-09-25,2019-09-26 signatures=0", "Subject": "[dpdk-dev] [PATCH 10/11] examples/l3fwd: add graceful teardown for\n\teventdevice", "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": "From: Pavan Nikhilesh <pbhagavatula@marvell.com>\n\nAdd graceful teardown that addresses both event mode and poll mode.\n\nSigned-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>\n---\n examples/l3fwd/main.c | 49 ++++++++++++++++++++++++++++++-------------\n 1 file changed, 34 insertions(+), 15 deletions(-)", "diff": "diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c\nindex e31afe045..d7b7fc287 100644\n--- a/examples/l3fwd/main.c\n+++ b/examples/l3fwd/main.c\n@@ -911,7 +911,7 @@ main(int argc, char **argv)\n \tstruct lcore_conf *qconf;\n \tstruct rte_eth_dev_info dev_info;\n \tstruct rte_eth_txconf *txconf;\n-\tint ret;\n+\tint i, ret;\n \tunsigned nb_ports;\n \tuint16_t queueid, portid;\n \tunsigned lcore_id;\n@@ -1166,27 +1166,46 @@ main(int argc, char **argv)\n \t\t}\n \t}\n \n-\n \tcheck_all_ports_link_status(enabled_port_mask);\n \n \tret = 0;\n \t/* launch per-lcore init on every lcore */\n \trte_eal_mp_remote_launch(l3fwd_lkp.main_loop, NULL, CALL_MASTER);\n-\tRTE_LCORE_FOREACH_SLAVE(lcore_id) {\n-\t\tif (rte_eal_wait_lcore(lcore_id) < 0) {\n-\t\t\tret = -1;\n-\t\t\tbreak;\n+\tif (evdev_rsrc->enabled) {\n+\t\tfor (i = 0; i < evdev_rsrc->rx_adptr.nb_rx_adptr; i++)\n+\t\t\trte_event_eth_rx_adapter_stop(\n+\t\t\t\t\tevdev_rsrc->rx_adptr.rx_adptr[i]);\n+\t\tfor (i = 0; i < evdev_rsrc->tx_adptr.nb_tx_adptr; i++)\n+\t\t\trte_event_eth_tx_adapter_stop(\n+\t\t\t\t\tevdev_rsrc->tx_adptr.tx_adptr[i]);\n+\n+\t\tRTE_ETH_FOREACH_DEV(portid) {\n+\t\t\tif ((enabled_port_mask & (1 << portid)) == 0)\n+\t\t\t\tcontinue;\n+\t\t\trte_eth_dev_stop(portid);\n \t\t}\n-\t}\n \n-\t/* stop ports */\n-\tRTE_ETH_FOREACH_DEV(portid) {\n-\t\tif ((enabled_port_mask & (1 << portid)) == 0)\n-\t\t\tcontinue;\n-\t\tprintf(\"Closing port %d...\", portid);\n-\t\trte_eth_dev_stop(portid);\n-\t\trte_eth_dev_close(portid);\n-\t\tprintf(\" Done\\n\");\n+\t\trte_eal_mp_wait_lcore();\n+\t\tRTE_ETH_FOREACH_DEV(portid) {\n+\t\t\tif ((enabled_port_mask & (1 << portid)) == 0)\n+\t\t\t\tcontinue;\n+\t\t\trte_eth_dev_close(portid);\n+\t\t}\n+\n+\t\trte_event_dev_stop(evdev_rsrc->event_d_id);\n+\t\trte_event_dev_close(evdev_rsrc->event_d_id);\n+\n+\t} else {\n+\t\trte_eal_mp_wait_lcore();\n+\n+\t\tRTE_ETH_FOREACH_DEV(portid) {\n+\t\t\tif ((enabled_port_mask & (1 << portid)) == 0)\n+\t\t\t\tcontinue;\n+\t\t\tprintf(\"Closing port %d...\", portid);\n+\t\t\trte_eth_dev_stop(portid);\n+\t\t\trte_eth_dev_close(portid);\n+\t\t\tprintf(\" Done\\n\");\n+\t\t}\n \t}\n \tprintf(\"Bye...\\n\");\n \n", "prefixes": [ "10/11" ] }{ "id": 59848, "url": "