Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/80915/?format=api
https://patches.dpdk.org/api/patches/80915/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1602768646-13142-5-git-send-email-arybchenko@solarflare.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": "<1602768646-13142-5-git-send-email-arybchenko@solarflare.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1602768646-13142-5-git-send-email-arybchenko@solarflare.com", "date": "2020-10-15T13:30:38", "name": "[v2,04/11] examples: check eth dev stop status", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "3c855650b9a04bae3b9fddba89aafd5a857988ca", "submitter": { "id": 607, "url": "https://patches.dpdk.org/api/people/607/?format=api", "name": "Andrew Rybchenko", "email": "arybchenko@solarflare.com" }, "delegate": { "id": 319, "url": "https://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1602768646-13142-5-git-send-email-arybchenko@solarflare.com/mbox/", "series": [ { "id": 13012, "url": "https://patches.dpdk.org/api/series/13012/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=13012", "date": "2020-10-15T13:30:34", "name": "ethdev: change device stop to return status", "version": 2, "mbox": "https://patches.dpdk.org/series/13012/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/80915/comments/", "check": "warning", "checks": "https://patches.dpdk.org/api/patches/80915/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 432D7A04DB;\n\tThu, 15 Oct 2020 15:32:01 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 640171E941;\n\tThu, 15 Oct 2020 15:31:21 +0200 (CEST)", "from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com\n [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 559831DDC3\n for <dev@dpdk.org>; Thu, 15 Oct 2020 15:31:16 +0200 (CEST)", "from mx1-us1.ppe-hosted.com (unknown [10.7.65.60])\n by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id\n CE80E60163; Thu, 15 Oct 2020 13:31:14 +0000 (UTC)", "from us4-mdac16-66.ut7.mdlocal (unknown [10.7.64.78])\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id CA9E4200A3;\n Thu, 15 Oct 2020 13:31:14 +0000 (UTC)", "from mx1-us1.ppe-hosted.com (unknown [10.7.65.174])\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id\n 22A4C1C0057;\n Thu, 15 Oct 2020 13:31:14 +0000 (UTC)", "from webmail.solarflare.com (uk.solarflare.com [193.34.186.16])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits))\n (No client certificate requested)\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id\n C4ACF1C00A2;\n Thu, 15 Oct 2020 13:31:13 +0000 (UTC)", "from ukex01.SolarFlarecom.com (10.17.10.4) by\n ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id\n 15.0.1497.2; Thu, 15 Oct 2020 14:31:10 +0100", "from opal.uk.solarflarecom.com (10.17.10.1) by\n ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server id\n 15.0.1497.2 via Frontend Transport; Thu, 15 Oct 2020 14:31:10 +0100", "from ukv-loginhost.uk.solarflarecom.com\n (ukv-loginhost.uk.solarflarecom.com [10.17.10.39])\n by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id 09FDVASV025329;\n Thu, 15 Oct 2020 14:31:10 +0100", "from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1])\n by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 854A81613AB;\n Thu, 15 Oct 2020 14:31:10 +0100 (BST)" ], "X-Virus-Scanned": "Proofpoint Essentials engine", "From": "Andrew Rybchenko <arybchenko@solarflare.com>", "To": "Harry van Haaren <harry.van.haaren@intel.com>, Ori Kam <orika@nvidia.com>,\n Bruce Richardson <bruce.richardson@intel.com>, Radu Nicolau\n <radu.nicolau@intel.com>, Akhil Goyal <akhil.goyal@nxp.com>, Ferruh Yigit\n <ferruh.yigit@intel.com>, Sunil Kumar Kori <skori@marvell.com>, \"Pavan\n Nikhilesh\" <pbhagavatula@marvell.com>, Jerin Jacob <jerinj@marvell.com>,\n Kiran Kumar K <kirankumark@marvell.com>, Nithin Dabilpuram\n <ndabilpuram@marvell.com>, David Hunt <david.hunt@intel.com>", "CC": "<dev@dpdk.org>, Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>", "Date": "Thu, 15 Oct 2020 14:30:38 +0100", "Message-ID": "<1602768646-13142-5-git-send-email-arybchenko@solarflare.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1602768646-13142-1-git-send-email-arybchenko@solarflare.com>", "References": "<1602682146-4722-1-git-send-email-arybchenko@solarflare.com>\n <1602768646-13142-1-git-send-email-arybchenko@solarflare.com>", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-TM-AS-Product-Ver": "SMEX-12.5.0.1300-8.6.1012-25726.003", "X-TM-AS-Result": "No-2.300100-8.000000-10", "X-TMASE-MatchedRID": "7SLQpEcfW2LRlxaUc/KTYX4neC0h7SAD3V4UShoTXad+SLLtNOiBhhOv\n qWE4CGBUQ0ew+orY3L24HGCfl+dhoCHhSBQfglfsA9lly13c/gHpVMb1xnESMqzk9k6NqjPuokW\n ZuZ853DcpVsEDak15htyo1A7d4w060X+0CFhNLNf9tX9U6GuaihfbPFE2GHrVVWQnHKxp38heUN\n p8uxj+xJv95NYHIKAjkth3obE9lGBZT98H9cWYnFVeGWZmxN2MBGvINcfHqhcRQQ4kFqjjJCOGa\n xJXnUqc4u2WwMxMdpLvK3TBvg+vxe1KuqFSI2KuTauf2PrRb1vdYVrFVbszaGz3xnx8b/qRcHKR\n PTYj/V07OJE/RLyfLuXcvHH+KGk9Q9tg+p38ZonHmyDJSEsI25yqUJ2uHKFAKBVvFbsUM5WX35n\n GkdKgi+LzNWBegCW2wgn7iDBesS0nRE+fI6etkgnsbzHpYjvhuxpkqxafWL5EBS3KcDyYkcVQU8\n YbML/FtmFdb/3pS0HeQgfNIzFT9RMvyGZyKSqgt62H/TaJzn1dkhglm41jPL1NuKS30BZnQIFIZ\n LtsgG0DUH+nVLNyiCsqIP9TxvtJMb6p570ilnc=", "X-TM-AS-User-Approved-Sender": "Yes", "X-TM-AS-User-Blocked-Sender": "No", "X-TMASE-Result": "10--2.300100-8.000000", "X-TMASE-Version": "SMEX-12.5.0.1300-8.6.1012-25726.003", "X-MDID": "1602768674-uvrqOX5CJeQA", "X-PPE-DISP": "1602768674;uvrqOX5CJeQA", "Subject": "[dpdk-dev] [PATCH v2 04/11] examples: check eth dev stop status", "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: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>\n\nrte_eth_dev_stop() return value was changed from void to int,\nso this patch modify usage of this function across examples\naccording to new return type.\n\nSigned-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>\nSigned-off-by: Andrew Rybchenko <arybchenko@solarflare.com>\n---\n examples/ethtool/lib/rte_ethtool.c | 15 ++++++++------\n examples/eventdev_pipeline/main.c | 3 ++-\n examples/flow_filtering/main.c | 13 +++++++-----\n examples/ioat/ioatfwd.c | 6 +++++-\n examples/ipsec-secgw/event_helper.c | 7 ++++++-\n examples/ipsec-secgw/ipsec-secgw.c | 7 ++++++-\n examples/kni/main.c | 32 ++++++++++++++++++++++++-----\n examples/l2fwd-event/main.c | 10 +++++++--\n examples/l2fwd/main.c | 5 ++++-\n examples/l3fwd-graph/main.c | 5 ++++-\n examples/l3fwd-power/main.c | 6 +++++-\n examples/l3fwd/main.c | 10 +++++++--\n 12 files changed, 92 insertions(+), 27 deletions(-)", "diff": "diff --git a/examples/ethtool/lib/rte_ethtool.c b/examples/ethtool/lib/rte_ethtool.c\nindex db8150efd5..86e3de078c 100644\n--- a/examples/ethtool/lib/rte_ethtool.c\n+++ b/examples/ethtool/lib/rte_ethtool.c\n@@ -297,7 +297,11 @@ rte_ethtool_set_pauseparam(uint16_t port_id,\n int\n rte_ethtool_net_open(uint16_t port_id)\n {\n-\trte_eth_dev_stop(port_id);\n+\tint ret;\n+\n+\tret = rte_eth_dev_stop(port_id);\n+\tif (ret != 0)\n+\t\treturn ret;\n \n \treturn rte_eth_dev_start(port_id);\n }\n@@ -305,10 +309,7 @@ rte_ethtool_net_open(uint16_t port_id)\n int\n rte_ethtool_net_stop(uint16_t port_id)\n {\n-\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n-\trte_eth_dev_stop(port_id);\n-\n-\treturn 0;\n+\treturn rte_eth_dev_stop(port_id);\n }\n \n int\n@@ -459,7 +460,9 @@ rte_ethtool_set_ringparam(uint16_t port_id,\n \tif (stat != 0)\n \t\treturn stat;\n \n-\trte_eth_dev_stop(port_id);\n+\tstat = rte_eth_dev_stop(port_id);\n+\tif (stat != 0)\n+\t\treturn stat;\n \n \tstat = rte_eth_tx_queue_setup(port_id, 0, ring_param->tx_pending,\n \t\trte_socket_id(), NULL);\ndiff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c\nindex 4ac5821539..597540c3d6 100644\n--- a/examples/eventdev_pipeline/main.c\n+++ b/examples/eventdev_pipeline/main.c\n@@ -296,7 +296,8 @@ signal_handler(int signum)\n \t\tRTE_ETH_FOREACH_DEV(portid) {\n \t\t\trte_event_eth_rx_adapter_stop(portid);\n \t\t\trte_event_eth_tx_adapter_stop(portid);\n-\t\t\trte_eth_dev_stop(portid);\n+\t\t\tif (rte_eth_dev_stop(portid) < 0)\n+\t\t\t\tprintf(\"Failed to stop port %u\", portid);\n \t\t}\n \n \t\trte_eal_mp_wait_lcore();\ndiff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c\nindex cc9e7e7808..93523d625b 100644\n--- a/examples/flow_filtering/main.c\n+++ b/examples/flow_filtering/main.c\n@@ -52,7 +52,7 @@ print_ether_addr(const char *what, struct rte_ether_addr *eth_addr)\n \tprintf(\"%s%s\", what, buf);\n }\n \n-static void\n+static int\n main_loop(void)\n {\n \tstruct rte_mbuf *mbufs[32];\n@@ -61,6 +61,7 @@ main_loop(void)\n \tuint16_t nb_rx;\n \tuint16_t i;\n \tuint16_t j;\n+\tint ret;\n \n \twhile (!force_quit) {\n \t\tfor (i = 0; i < nr_queues; i++) {\n@@ -88,8 +89,12 @@ main_loop(void)\n \n \t/* closing and releasing resources */\n \trte_flow_flush(port_id, &error);\n-\trte_eth_dev_stop(port_id);\n+\tret = rte_eth_dev_stop(port_id);\n+\tif (ret < 0)\n+\t\tprintf(\"Failed to stop port %u: %s\",\n+\t\t port_id, rte_strerror(-ret));\n \trte_eth_dev_close(port_id);\n+\treturn ret;\n }\n \n #define CHECK_INTERVAL 1000 /* 100ms */\n@@ -254,7 +259,5 @@ main(int argc, char **argv)\n \t\trte_exit(EXIT_FAILURE, \"error in creating flow\");\n \t}\n \n-\tmain_loop();\n-\n-\treturn 0;\n+\treturn main_loop();\n }\ndiff --git a/examples/ioat/ioatfwd.c b/examples/ioat/ioatfwd.c\nindex 8cf606e25b..dc1ef951c1 100644\n--- a/examples/ioat/ioatfwd.c\n+++ b/examples/ioat/ioatfwd.c\n@@ -995,7 +995,11 @@ main(int argc, char **argv)\n \tuint32_t j;\n \tfor (i = 0; i < cfg.nb_ports; i++) {\n \t\tprintf(\"Closing port %d\\n\", cfg.ports[i].rxtx_port);\n-\t\trte_eth_dev_stop(cfg.ports[i].rxtx_port);\n+\t\tret = rte_eth_dev_stop(cfg.ports[i].rxtx_port);\n+\t\tif (ret != 0)\n+\t\t\tRTE_LOG(ERR, IOAT, \"rte_eth_dev_stop: err=%s, port=%u\\n\",\n+\t\t\t\trte_strerror(-ret), cfg.ports[i].rxtx_port);\n+\n \t\trte_eth_dev_close(cfg.ports[i].rxtx_port);\n \t\tif (copy_mode == COPY_MODE_IOAT_NUM) {\n \t\t\tfor (j = 0; j < cfg.ports[i].nb_queues; j++) {\ndiff --git a/examples/ipsec-secgw/event_helper.c b/examples/ipsec-secgw/event_helper.c\nindex 865dc911b8..ce4dbdc085 100644\n--- a/examples/ipsec-secgw/event_helper.c\n+++ b/examples/ipsec-secgw/event_helper.c\n@@ -1583,7 +1583,12 @@ eh_devs_init(struct eh_conf *conf)\n \t\tif ((conf->eth_portmask & (1 << port_id)) == 0)\n \t\t\tcontinue;\n \n-\t\trte_eth_dev_stop(port_id);\n+\t\tret = rte_eth_dev_stop(port_id);\n+\t\tif (ret != 0) {\n+\t\t\tEH_LOG_ERR(\"Failed to stop port %u, err: %d\",\n+\t\t\t\t\tport_id, ret);\n+\t\t\treturn ret;\n+\t\t}\n \t}\n \n \t/* Setup eventdev */\ndiff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c\nindex 60132c4bd7..58ecfd6f76 100644\n--- a/examples/ipsec-secgw/ipsec-secgw.c\n+++ b/examples/ipsec-secgw/ipsec-secgw.c\n@@ -3032,7 +3032,12 @@ main(int32_t argc, char **argv)\n \t\t\t\t\t\" for port %u, err msg: %s\\n\", portid,\n \t\t\t\t\terr.message);\n \t\t}\n-\t\trte_eth_dev_stop(portid);\n+\t\tret = rte_eth_dev_stop(portid);\n+\t\tif (ret != 0)\n+\t\t\tRTE_LOG(ERR, IPSEC,\n+\t\t\t\t\"rte_eth_dev_stop: err=%s, port=%u\\n\",\n+\t\t\t\trte_strerror(-ret), portid);\n+\n \t\trte_eth_dev_close(portid);\n \t\tprintf(\" Done\\n\");\n \t}\ndiff --git a/examples/kni/main.c b/examples/kni/main.c\nindex 2223bd367d..ac6309e072 100644\n--- a/examples/kni/main.c\n+++ b/examples/kni/main.c\n@@ -782,7 +782,12 @@ kni_change_mtu_(uint16_t port_id, unsigned int new_mtu)\n \tRTE_LOG(INFO, APP, \"Change MTU of port %d to %u\\n\", port_id, new_mtu);\n \n \t/* Stop specific port */\n-\trte_eth_dev_stop(port_id);\n+\tret = rte_eth_dev_stop(port_id);\n+\tif (ret != 0) {\n+\t\tRTE_LOG(ERR, APP, \"Failed to stop port %d: %s\\n\",\n+\t\t\tport_id, rte_strerror(-ret));\n+\t\treturn ret;\n+\t}\n \n \tmemcpy(&conf, &port_conf, sizeof(conf));\n \t/* Set new MTU */\n@@ -875,10 +880,23 @@ kni_config_network_interface(uint16_t port_id, uint8_t if_up)\n \trte_atomic32_inc(&kni_pause);\n \n \tif (if_up != 0) { /* Configure network interface up */\n-\t\trte_eth_dev_stop(port_id);\n+\t\tret = rte_eth_dev_stop(port_id);\n+\t\tif (ret != 0) {\n+\t\t\tRTE_LOG(ERR, APP, \"Failed to stop port %d: %s\\n\",\n+\t\t\t\tport_id, rte_strerror(-ret));\n+\t\t\trte_atomic32_dec(&kni_pause);\n+\t\t\treturn ret;\n+\t\t}\n \t\tret = rte_eth_dev_start(port_id);\n-\t} else /* Configure network interface down */\n-\t\trte_eth_dev_stop(port_id);\n+\t} else { /* Configure network interface down */\n+\t\tret = rte_eth_dev_stop(port_id);\n+\t\tif (ret != 0) {\n+\t\t\tRTE_LOG(ERR, APP, \"Failed to stop port %d: %s\\n\",\n+\t\t\t\tport_id, rte_strerror(-ret));\n+\t\t\trte_atomic32_dec(&kni_pause);\n+\t\t\treturn ret;\n+\t\t}\n+\t}\n \n \trte_atomic32_dec(&kni_pause);\n \n@@ -998,6 +1016,7 @@ static int\n kni_free_kni(uint16_t port_id)\n {\n \tuint8_t i;\n+\tint ret;\n \tstruct kni_port_params **p = kni_port_params_array;\n \n \tif (port_id >= RTE_MAX_ETHPORTS || !p[port_id])\n@@ -1008,7 +1027,10 @@ kni_free_kni(uint16_t port_id)\n \t\t\tprintf(\"Fail to release kni\\n\");\n \t\tp[port_id]->kni[i] = NULL;\n \t}\n-\trte_eth_dev_stop(port_id);\n+\tret = rte_eth_dev_stop(port_id);\n+\tif (ret != 0)\n+\t\tRTE_LOG(ERR, APP, \"Failed to stop port %d: %s\\n\",\n+\t\t\tport_id, rte_strerror(-ret));\n \n \treturn 0;\n }\ndiff --git a/examples/l2fwd-event/main.c b/examples/l2fwd-event/main.c\nindex 9f831b1266..b48794d6bc 100644\n--- a/examples/l2fwd-event/main.c\n+++ b/examples/l2fwd-event/main.c\n@@ -683,7 +683,10 @@ main(int argc, char **argv)\n \t\t\tif ((rsrc->enabled_port_mask &\n \t\t\t\t\t\t\t(1 << port_id)) == 0)\n \t\t\t\tcontinue;\n-\t\t\trte_eth_dev_stop(port_id);\n+\t\t\tret = rte_eth_dev_stop(port_id);\n+\t\t\tif (ret < 0)\n+\t\t\t\tprintf(\"rte_eth_dev_stop:err=%d, port=%u\\n\",\n+\t\t\t\t ret, port_id);\n \t\t}\n \n \t\trte_eal_mp_wait_lcore();\n@@ -705,7 +708,10 @@ main(int argc, char **argv)\n \t\t\t\t\t\t\t(1 << port_id)) == 0)\n \t\t\t\tcontinue;\n \t\t\tprintf(\"Closing port %d...\", port_id);\n-\t\t\trte_eth_dev_stop(port_id);\n+\t\t\tret = rte_eth_dev_stop(port_id);\n+\t\t\tif (ret < 0)\n+\t\t\t\tprintf(\"rte_eth_dev_stop:err=%d, port=%u\\n\",\n+\t\t\t\t ret, port_id);\n \t\t\trte_eth_dev_close(port_id);\n \t\t\tprintf(\" Done\\n\");\n \t\t}\ndiff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c\nindex 7e3078788e..7d1b08a8f7 100644\n--- a/examples/l2fwd/main.c\n+++ b/examples/l2fwd/main.c\n@@ -896,7 +896,10 @@ main(int argc, char **argv)\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\tret = rte_eth_dev_stop(portid);\n+\t\tif (ret != 0)\n+\t\t\tprintf(\"rte_eth_dev_stop: err=%d, port=%d\\n\",\n+\t\t\t ret, portid);\n \t\trte_eth_dev_close(portid);\n \t\tprintf(\" Done\\n\");\n \t}\ndiff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c\nindex 2306ba9b07..2fd536e592 100644\n--- a/examples/l3fwd-graph/main.c\n+++ b/examples/l3fwd-graph/main.c\n@@ -1116,7 +1116,10 @@ main(int argc, char **argv)\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\tret = rte_eth_dev_stop(portid);\n+\t\tif (ret != 0)\n+\t\t\tprintf(\"Failed to stop port %u: %s\\n\",\n+\t\t\t portid, rte_strerror(-ret));\n \t\trte_eth_dev_close(portid);\n \t\tprintf(\" Done\\n\");\n \t}\ndiff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c\nindex d0e6c9bd77..b1535b2749 100644\n--- a/examples/l3fwd-power/main.c\n+++ b/examples/l3fwd-power/main.c\n@@ -2805,7 +2805,11 @@ main(int argc, char **argv)\n \t\tif ((enabled_port_mask & (1 << portid)) == 0)\n \t\t\tcontinue;\n \n-\t\trte_eth_dev_stop(portid);\n+\t\tret = rte_eth_dev_stop(portid);\n+\t\tif (ret != 0)\n+\t\t\tRTE_LOG(ERR, L3FWD_POWER, \"rte_eth_dev_stop: err=%d, port=%u\\n\",\n+\t\t\t\tret, portid);\n+\n \t\trte_eth_dev_close(portid);\n \t}\n \ndiff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c\nindex 80f3434ec2..3811a1efbf 100644\n--- a/examples/l3fwd/main.c\n+++ b/examples/l3fwd/main.c\n@@ -1284,7 +1284,10 @@ main(int argc, char **argv)\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\tret = rte_eth_dev_stop(portid);\n+\t\t\tif (ret != 0)\n+\t\t\t\tprintf(\"rte_eth_dev_stop: err=%d, port=%u\\n\",\n+\t\t\t\t ret, portid);\n \t\t}\n \n \t\trte_eal_mp_wait_lcore();\n@@ -1304,7 +1307,10 @@ main(int argc, char **argv)\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\tret = rte_eth_dev_stop(portid);\n+\t\t\tif (ret != 0)\n+\t\t\t\tprintf(\"rte_eth_dev_stop: err=%d, port=%u\\n\",\n+\t\t\t\t ret, portid);\n \t\t\trte_eth_dev_close(portid);\n \t\t\tprintf(\" Done\\n\");\n \t\t}\n", "prefixes": [ "v2", "04/11" ] }{ "id": 80915, "url": "