get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/80728/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 80728,
    "url": "http://patches.dpdk.org/api/patches/80728/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1602682146-4722-5-git-send-email-arybchenko@solarflare.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": "<1602682146-4722-5-git-send-email-arybchenko@solarflare.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1602682146-4722-5-git-send-email-arybchenko@solarflare.com",
    "date": "2020-10-14T13:28:59",
    "name": "[04/11] examples: check eth dev stop status",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "0cd65c6bc65aa97a1293fc037a8a4729782e2181",
    "submitter": {
        "id": 607,
        "url": "http://patches.dpdk.org/api/people/607/?format=api",
        "name": "Andrew Rybchenko",
        "email": "arybchenko@solarflare.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1602682146-4722-5-git-send-email-arybchenko@solarflare.com/mbox/",
    "series": [
        {
            "id": 12958,
            "url": "http://patches.dpdk.org/api/series/12958/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12958",
            "date": "2020-10-14T13:28:55",
            "name": "ethdev: change device stop to return status",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/12958/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/80728/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/80728/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 1146AA04B7;\n\tWed, 14 Oct 2020 15:30:46 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 17B881DDFE;\n\tWed, 14 Oct 2020 15:29:25 +0200 (CEST)",
            "from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com\n [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id B92431DDB3\n for <dev@dpdk.org>; Wed, 14 Oct 2020 15:29:17 +0200 (CEST)",
            "from mx1-us1.ppe-hosted.com (unknown [10.110.50.150])\n by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id\n 5A101200AE; Wed, 14 Oct 2020 13:29:16 +0000 (UTC)",
            "from us4-mdac16-3.at1.mdlocal (unknown [10.110.49.149])\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 576A6800AD;\n Wed, 14 Oct 2020 13:29:16 +0000 (UTC)",
            "from mx1-us1.ppe-hosted.com (unknown [10.110.49.103])\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id\n B0F8A100071;\n Wed, 14 Oct 2020 13:29:15 +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 729F8980079;\n Wed, 14 Oct 2020 13:29:15 +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; Wed, 14 Oct 2020 14:29:12 +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; Wed, 14 Oct 2020 14:29:12 +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 09EDTB6C009143;\n Wed, 14 Oct 2020 14:29:12 +0100",
            "from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1])\n by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 68F1B1613AB;\n Wed, 14 Oct 2020 14:29:12 +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": "Wed, 14 Oct 2020 14:28:59 +0100",
        "Message-ID": "<1602682146-4722-5-git-send-email-arybchenko@solarflare.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1602682146-4722-1-git-send-email-arybchenko@solarflare.com>",
        "References": "<1602682146-4722-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-25724.003",
        "X-TM-AS-Result": "No-1.587400-8.000000-10",
        "X-TMASE-MatchedRID": "tSbNnqEiYYHRlxaUc/KTYX4neC0h7SAD3V4UShoTXad+SLLtNOiBhhOv\n qWE4CGBUQ0ew+orY3L24HGCfl+dhoCHhSBQfglfsA9lly13c/gHpVMb1xnESMsnZhDdFIXZEOho\n 7xiBfL+dWqgnWQ924PCyCUGDXD74mbwFT1cZHxCHBe89zsi5D0NnLANiJ9J62T7zqZowzdpLSJJ\n cbp1Y+W8zub46theXNlup21Q6iopbcQUtYchmLP3V7tdtvoibawuIWIvQEbW7fc2Xd6VJ+ykTq5\n x6JKmWROV0mD06qoXzvK3TBvg+vxe1KuqFSI2Ku+CjwEqX1p7kx/k92L7R8tkoPLn6eZ90+jG76\n DvZqHwE7OJE/RLyfLuXcvHH+KGk9Q9tg+p38ZonHmyDJSEsI25yqUJ2uHKFAKBVvFbsUM5WSDdw\n 9v34fhC5Oh8YnEjIhgDLqnrRlXrZ8nn9tnqel2MZW5ai5WKlykrMXDgtoYrdRTufIbxRU/jhruI\n tukMy/TWkuGEI2K2m50N7mpEhr6SVF9Qp6e+qgwp07mfZ1DXpDtnTUorEyNAdh57FSns3r8Oycc\n FNBL2TKhETi2//sjuP9Cb59K8ACZrS+A8PszW/U9h9N881NSQ==",
        "X-TM-AS-User-Approved-Sender": "Yes",
        "X-TM-AS-User-Blocked-Sender": "No",
        "X-TMASE-Result": "10--1.587400-8.000000",
        "X-TMASE-Version": "SMEX-12.5.0.1300-8.6.1012-25724.003",
        "X-MDID": "1602682156-0Gbl6edffxuP",
        "X-PPE-DISP": "1602682156;0Gbl6edffxuP",
        "Subject": "[dpdk-dev] [PATCH 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  | 17 ++++++++++-------\n examples/eventdev_pipeline/main.c   |  3 ++-\n examples/flow_filtering/main.c      | 12 +++++++-----\n examples/ioat/ioatfwd.c             |  5 ++++-\n examples/ipsec-secgw/event_helper.c |  7 ++++++-\n examples/ipsec-secgw/ipsec-secgw.c  |  6 +++++-\n examples/kni/main.c                 | 28 +++++++++++++++++++++++-----\n examples/l2fwd-event/main.c         | 10 ++++++++--\n examples/l2fwd/main.c               |  5 ++++-\n examples/l3fwd-graph/main.c         |  6 +++++-\n examples/l3fwd-power/main.c         |  6 +++++-\n examples/l3fwd/main.c               | 10 ++++++++--\n 12 files changed, 87 insertions(+), 28 deletions(-)",
    "diff": "diff --git a/examples/ethtool/lib/rte_ethtool.c b/examples/ethtool/lib/rte_ethtool.c\nindex db8150efd5..78321b32ee 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@@ -450,7 +451,7 @@ rte_ethtool_set_ringparam(uint16_t port_id,\n \tstruct ethtool_ringparam *ring_param)\n {\n \tstruct rte_eth_rxq_info rx_qinfo;\n-\tint stat;\n+\tint stat, ret;\n \n \tif (ring_param == NULL)\n \t\treturn -EINVAL;\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+\tret = rte_eth_dev_stop(port_id);\n+\tif (ret != 0)\n+\t\treturn ret;\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..a92a4aa04e 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,11 @@ 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\", port_id);\n \trte_eth_dev_close(port_id);\n+\treturn ret;\n }\n \n #define CHECK_INTERVAL 1000  /* 100ms */\n@@ -254,7 +258,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..73edb5da27 100644\n--- a/examples/ioat/ioatfwd.c\n+++ b/examples/ioat/ioatfwd.c\n@@ -995,7 +995,10 @@ 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_exit(EXIT_FAILURE, \"rte_eth_dev_stop: err=%s, port=%d\\n\",\n+\t\t\t\trte_strerror(-ret), cfg.ports[i].rxtx_port);\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..d83d9d8d5d 100644\n--- a/examples/ipsec-secgw/ipsec-secgw.c\n+++ b/examples/ipsec-secgw/ipsec-secgw.c\n@@ -3032,7 +3032,11 @@ 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_exit(EXIT_FAILURE, \"rte_eth_dev_stop: err=%s, port=%d\\n\",\n+\t\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..4998111d2c 100644\n--- a/examples/kni/main.c\n+++ b/examples/kni/main.c\n@@ -782,7 +782,11 @@ 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\\n\", port_id);\n+\t\treturn ret;\n+\t}\n \n \tmemcpy(&conf, &port_conf, sizeof(conf));\n \t/* Set new MTU */\n@@ -875,10 +879,19 @@ 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\\n\", port_id);\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\\n\", port_id);\n+\t\t\treturn ret;\n+\t\t}\n+\t}\n \n \trte_atomic32_dec(&kni_pause);\n \n@@ -998,6 +1011,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 +1022,11 @@ 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\\n\", port_id);\n+\t\treturn ret;\n+\t}\n \n \treturn 0;\n }\ndiff --git a/examples/l2fwd-event/main.c b/examples/l2fwd-event/main.c\nindex 9f831b1266..ed60240083 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\trte_panic(\"rte_eth_dev_stop:err=%d, port=%u\\n\",\n+\t\t\t\t\t\tret, 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\trte_panic(\"rte_eth_dev_stop:err=%d, port=%u\\n\",\n+\t\t\t\t\t\tret, 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..8d6c7ec237 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\trte_exit(EXIT_FAILURE, \"rte_eth_dev_stop: err=%d, port=%d\\n\",\n+\t\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..fbe680aa5d 100644\n--- a/examples/l3fwd-graph/main.c\n+++ b/examples/l3fwd-graph/main.c\n@@ -1116,7 +1116,11 @@ 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\t}\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..9094cbc4e2 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\tret, 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\tret, portid);\n \t\t\trte_eth_dev_close(portid);\n \t\t\tprintf(\" Done\\n\");\n \t\t}\n",
    "prefixes": [
        "04/11"
    ]
}