Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/59442/?format=api
http://patches.dpdk.org/api/patches/59442/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190919101346.8832-10-pbhagavatula@marvell.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": "<20190919101346.8832-10-pbhagavatula@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190919101346.8832-10-pbhagavatula@marvell.com", "date": "2019-09-19T10:13:45", "name": "[v3,09/10] examples/l2fwd-event: add graceful teardown", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "37b446c6e740d7b6722f15710e91487390715d24", "submitter": { "id": 1183, "url": "http://patches.dpdk.org/api/people/1183/?format=api", "name": "Pavan Nikhilesh Bhagavatula", "email": "pbhagavatula@marvell.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190919101346.8832-10-pbhagavatula@marvell.com/mbox/", "series": [ { "id": 6448, "url": "http://patches.dpdk.org/api/series/6448/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=6448", "date": "2019-09-19T10:13:36", "name": "example/l2fwd-event: introduce l2fwd-event example", "version": 3, "mbox": "http://patches.dpdk.org/series/6448/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/59442/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/59442/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 04A611EE60;\n\tThu, 19 Sep 2019 12:14:31 +0200 (CEST)", "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n\t[67.231.148.174]) by dpdk.org (Postfix) with ESMTP id BCD461EE5F\n\tfor <dev@dpdk.org>; Thu, 19 Sep 2019 12:14:28 +0200 (CEST)", "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n\tby mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id\n\tx8JA4hWF021244; Thu, 19 Sep 2019 03:14:28 -0700", "from sc-exch01.marvell.com ([199.233.58.181])\n\tby mx0a-0016f401.pphosted.com with ESMTP id 2v3vcdtd09-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); \n\tThu, 19 Sep 2019 03:14:27 -0700", "from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH01.marvell.com\n\t(10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3;\n\tThu, 19 Sep 2019 03:14:26 -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, 19 Sep 2019 03:14:26 -0700", "from BG-LT7430.marvell.com (unknown [10.28.17.12])\n\tby maili.marvell.com (Postfix) with ESMTP id AE9253F703F;\n\tThu, 19 Sep 2019 03:14:23 -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=+fuUm98hvehvo3ycobyUySOXkKqpIfY6joFkhpel12c=;\n\tb=FyXqq49sebtnA9ZJX+5mdsdk0XIUnPnCfg2TVyNIi1vg5N02SOa5pi1xEEzWdwFy9vmb\n\tT68rZKKRNrI0knWsz7Y+zIvzRdwvWzeHkEr0kQVSKb3kqNmpr+Z6wvpR6hiu7EbITyBs\n\ttNPYx3gu3RdWltuYuWJD0qVSM90dzmfHg7SYBfSzii7v3eTwXOyouyViqGWw+b7WDgDd\n\tgsFWP2O0DUjyTSjKApPYlUZ7pW3OS52gZm5UiBPI+QKsBFOBwvrRHr4YJTfJlDNVd8gH\n\tBGrmvZTgHPuI7MoHFMn0P2e5hUh8zypsQYVs/JwefNthA7CGAdC/R2rVS1Y3TzjqNc4T\n\tUA== ", "From": "<pbhagavatula@marvell.com>", "To": "<jerinj@marvell.com>, <bruce.richardson@intel.com>, <akhil.goyal@nxp.com>,\n\tMarko Kovacevic <marko.kovacevic@intel.com>,\n\tOri Kam <orika@mellanox.com>, Radu Nicolau <radu.nicolau@intel.com>, \n\tTomasz Kantecki <tomasz.kantecki@intel.com>,\n\tSunil Kumar Kori <skori@marvell.com>, \"Pavan\n\tNikhilesh\" <pbhagavatula@marvell.com>", "CC": "<dev@dpdk.org>", "Date": "Thu, 19 Sep 2019 15:43:45 +0530", "Message-ID": "<20190919101346.8832-10-pbhagavatula@marvell.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20190919101346.8832-1-pbhagavatula@marvell.com>", "References": "<20190919092603.5485-2-pbhagavatula@marvell.com>\n\t<20190919101346.8832-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.70,1.0.8\n\tdefinitions=2019-09-19_03:2019-09-18,2019-09-19 signatures=0", "Subject": "[dpdk-dev] [PATCH v3 09/10] examples/l2fwd-event: add graceful\n\tteardown", "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/l2fwd-event/main.c | 44 +++++++++++++++++++++++++++++--------\n 1 file changed, 35 insertions(+), 9 deletions(-)", "diff": "diff --git a/examples/l2fwd-event/main.c b/examples/l2fwd-event/main.c\nindex 56487809b..057381b29 100644\n--- a/examples/l2fwd-event/main.c\n+++ b/examples/l2fwd-event/main.c\n@@ -522,7 +522,7 @@ main(int argc, char **argv)\n \tuint32_t rx_lcore_id;\n \tuint32_t nb_mbufs;\n \tuint16_t nb_ports;\n-\tint ret;\n+\tint i, ret;\n \n \t/* init EAL */\n \tret = rte_eal_init(argc, argv);\n@@ -762,15 +762,41 @@ main(int argc, char **argv)\n \t/* launch per-lcore init on every lcore */\n \trte_eal_mp_remote_launch(l2fwd_launch_one_lcore, eventdev_rsrc,\n \t\t\t\t CALL_MASTER);\n-\trte_eal_mp_wait_lcore();\n+\tif (eventdev_rsrc->enabled) {\n+\t\tfor (i = 0; i < eventdev_rsrc->rx_adptr.nb_rx_adptr; i++)\n+\t\t\trte_event_eth_rx_adapter_stop(\n+\t\t\t\teventdev_rsrc->rx_adptr.rx_adptr[i]);\n+\t\tfor (i = 0; i < eventdev_rsrc->tx_adptr.nb_tx_adptr; i++)\n+\t\t\trte_event_eth_tx_adapter_stop(\n+\t\t\t\teventdev_rsrc->tx_adptr.tx_adptr[i]);\n \n-\tRTE_ETH_FOREACH_DEV(portid) {\n-\t\tif ((l2fwd_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_ETH_FOREACH_DEV(portid) {\n+\t\t\tif ((l2fwd_enabled_port_mask & (1 << portid)) == 0)\n+\t\t\t\tcontinue;\n+\t\t\trte_eth_dev_stop(portid);\n+\t\t}\n+\n+\t\trte_eal_mp_wait_lcore();\n+\t\tRTE_ETH_FOREACH_DEV(portid) {\n+\t\t\tif ((l2fwd_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(eventdev_rsrc->event_d_id);\n+\t\trte_event_dev_close(eventdev_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 ((l2fwd_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": [ "v3", "09/10" ] }{ "id": 59442, "url": "