Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/65067/?format=api
http://patches.dpdk.org/api/patches/65067/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200122182817.1667-11-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": "<20200122182817.1667-11-pbhagavatula@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200122182817.1667-11-pbhagavatula@marvell.com", "date": "2020-01-22T18:28:16", "name": "[v4,10/11] examples/l3fwd: add graceful teardown for eventdevice", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "4c85a1d22f463a4e938b7db462eb1192ed3271e3", "submitter": { "id": 1183, "url": "http://patches.dpdk.org/api/people/1183/?format=api", "name": "Pavan Nikhilesh Bhagavatula", "email": "pbhagavatula@marvell.com" }, "delegate": { "id": 310, "url": "http://patches.dpdk.org/api/users/310/?format=api", "username": "jerin", "first_name": "Jerin", "last_name": "Jacob", "email": "jerinj@marvell.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200122182817.1667-11-pbhagavatula@marvell.com/mbox/", "series": [ { "id": 8269, "url": "http://patches.dpdk.org/api/series/8269/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8269", "date": "2020-01-22T18:28:06", "name": "example/l3fwd: introduce event device support", "version": 4, "mbox": "http://patches.dpdk.org/series/8269/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/65067/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/65067/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 3CA8BA0532;\n\tWed, 22 Jan 2020 19:30:04 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id ADBD21BE9C;\n\tWed, 22 Jan 2020 19:29:08 +0100 (CET)", "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id EADC61BE83\n for <dev@dpdk.org>; Wed, 22 Jan 2020 19:29:05 +0100 (CET)", "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id\n 00MIKNYa014750; Wed, 22 Jan 2020 10:29:05 -0800", "from sc-exch04.marvell.com ([199.233.58.184])\n by mx0a-0016f401.pphosted.com with ESMTP id 2xpm901xr2-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Wed, 22 Jan 2020 10:29:05 -0800", "from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH04.marvell.com\n (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 22 Jan\n 2020 10:29:03 -0800", "from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com\n (10.93.176.81) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Wed, 22 Jan 2020 10:29:03 -0800", "from BG-LT7430.marvell.com (unknown [10.28.17.83])\n by maili.marvell.com (Postfix) with ESMTP id 81DD73F703F;\n Wed, 22 Jan 2020 10:29:00 -0800 (PST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0818;\n bh=20Qe1xCHoAdZtSLxfhssrhLY6Ysx2KwgVskZCKYcvAY=;\n b=JVFlQ+GlKotuktEDSRWnuFHaeJTBb3/wopF+GxK7jOeh5uLw4RYEpxwZfbMYdlq/rtZQ\n +OXNLbSCs/3SL0LS9YC5UmTGeKLzUf78utV65doghz3YmsyT31WSU+waNJE3VhGsB0Kb\n pFbC9SynFqg5kvb/XSf7i6+0z2kOQ21JTGVW018KH0PYfKYDg6sjVp4YohnBih38fahx\n uIw1iPK7Vgf92q8bEUCREM6dLDAP+z2e2gIUSvHns1/d2yxjpKh3+x45sz8Ypt1e6hD2\n xS1T2/Lvoga/oQ2mVky17fXF4UkidYmikZOvp8sFwlllx3praiqa7tu6SU4nnLtkfnHN WQ==", "From": "<pbhagavatula@marvell.com>", "To": "<jerinj@marvell.com>, <konstantin.ananyev@intel.com>, Marko Kovacevic\n <marko.kovacevic@intel.com>, Ori Kam <orika@mellanox.com>, Bruce Richardson\n <bruce.richardson@intel.com>, Radu Nicolau <radu.nicolau@intel.com>, \"Akhil\n Goyal\" <akhil.goyal@nxp.com>, Tomasz Kantecki <tomasz.kantecki@intel.com>,\n Sunil Kumar Kori <skori@marvell.com>, Pavan Nikhilesh\n <pbhagavatula@marvell.com>", "CC": "<dev@dpdk.org>", "Date": "Wed, 22 Jan 2020 23:58:16 +0530", "Message-ID": "<20200122182817.1667-11-pbhagavatula@marvell.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20200122182817.1667-1-pbhagavatula@marvell.com>", "References": "<20200111134730.5329-1-pbhagavatula@marvell.com>\n <20200122182817.1667-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.138, 18.0.572\n definitions=2020-01-22_08:2020-01-22,\n 2020-01-22 signatures=0", "Subject": "[dpdk-dev] [PATCH v4 10/11] examples/l3fwd: add graceful teardown\n\tfor eventdevice", "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 <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 <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 | 50 +++++++++++++++++++++++++++++--------------\n 1 file changed, 34 insertions(+), 16 deletions(-)", "diff": "diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c\nindex c95b1655e..dda430d68 100644\n--- a/examples/l3fwd/main.c\n+++ b/examples/l3fwd/main.c\n@@ -1092,8 +1092,6 @@ l3fwd_poll_resource_setup(void)\n \t\t\t\tret, portid);\n \t\t}\n \t}\n-\n-\n }\n \n static inline int\n@@ -1191,7 +1189,7 @@ main(int argc, char **argv)\n \tuint16_t queueid, portid;\n \tunsigned int lcore_id;\n \tuint8_t queue;\n-\tint ret;\n+\tint i, ret;\n \n \t/* init EAL */\n \tret = rte_eal_init(argc, argv);\n@@ -1280,21 +1278,41 @@ main(int argc, char **argv)\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 (evt_rsrc->enabled) {\n+\t\tfor (i = 0; i < evt_rsrc->rx_adptr.nb_rx_adptr; i++)\n+\t\t\trte_event_eth_rx_adapter_stop(\n+\t\t\t\t\tevt_rsrc->rx_adptr.rx_adptr[i]);\n+\t\tfor (i = 0; i < evt_rsrc->tx_adptr.nb_tx_adptr; i++)\n+\t\t\trte_event_eth_tx_adapter_stop(\n+\t\t\t\t\tevt_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(evt_rsrc->event_d_id);\n+\t\trte_event_dev_close(evt_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": [ "v4", "10/11" ] }{ "id": 65067, "url": "