get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 597,
    "url": "http://patchwork.dpdk.org/api/patches/597/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1411734684-13965-1-git-send-email-thomas.monjalon@6wind.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": "<1411734684-13965-1-git-send-email-thomas.monjalon@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1411734684-13965-1-git-send-email-thomas.monjalon@6wind.com",
    "date": "2014-09-26T12:31:24",
    "name": "[dpdk-dev] examples: do not probe pci twice",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "9f9f10a517a22df6cc089287e1a0021a9a506ca1",
    "submitter": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/people/1/?format=api",
        "name": "Thomas Monjalon",
        "email": "thomas.monjalon@6wind.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1411734684-13965-1-git-send-email-thomas.monjalon@6wind.com/mbox/",
    "series": [],
    "comments": "http://patchwork.dpdk.org/api/patches/597/comments/",
    "check": "pending",
    "checks": "http://patchwork.dpdk.org/api/patches/597/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 9383A7DF0;\n\tFri, 26 Sep 2014 14:25:35 +0200 (CEST)",
            "from mail-we0-f170.google.com (mail-we0-f170.google.com\n\t[74.125.82.170]) by dpdk.org (Postfix) with ESMTP id D20577DEB\n\tfor <dev@dpdk.org>; Fri, 26 Sep 2014 14:25:33 +0200 (CEST)",
            "by mail-we0-f170.google.com with SMTP id q58so94398wes.15\n\tfor <dev@dpdk.org>; Fri, 26 Sep 2014 05:31:55 -0700 (PDT)",
            "from localhost.localdomain (136-92-190-109.dsl.ovh.fr.\n\t[109.190.92.136]) by mx.google.com with ESMTPSA id\n\tet1sm6014218wjd.11.2014.09.26.05.31.47 for <dev@dpdk.org>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tFri, 26 Sep 2014 05:31:49 -0700 (PDT)"
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:subject:date:message-id;\n\tbh=Ikbn15o+72LzR3co3ikOx22u2osL4e6mawxdrZXRQgQ=;\n\tb=hnFGYdZjmKf1iAp7vU7lTyIciKeevwPtMuLSEB/heWftGBOozpGxXbMSpnNxL9mGoA\n\tvr07Z9RJgo/uwpEyAmUyFF6gpzMlo7TTsSN4kJ9Wne7fv+1eEPzc/wJD6zs7szuC3t76\n\t94rjYn2fYMtMyvGkbZb0KPjPqLFC71YS3hZ3oiYOz+1Ff0sFQjbsXvBiVgio+8gkipu9\n\tyXz1sq/Mb4h6nicu4dYvQD+KQ7mNgkOAyv3xX3lI3nHF0LXqUqIOtAbccXlAcRA67lCD\n\t9OezbfY7s5rqd4Q2MwZQkAi20RgZrFElxFvQLsa6Xv6n+urItiUhoUzrrePUzh4i5EbC\n\t79ew==",
        "X-Gm-Message-State": "ALoCoQl4C50BS2dhQw3FYjmPZJI6oWX5Ft4l5i9E5CfYbAMVL6xaIvH8URFVZPh2MCebhT/cJQx9",
        "X-Received": "by 10.194.238.98 with SMTP id vj2mr15384866wjc.41.1411734715883; \n\tFri, 26 Sep 2014 05:31:55 -0700 (PDT)",
        "From": "Thomas Monjalon <thomas.monjalon@6wind.com>",
        "To": "dev@dpdk.org",
        "Date": "Fri, 26 Sep 2014 14:31:24 +0200",
        "Message-Id": "<1411734684-13965-1-git-send-email-thomas.monjalon@6wind.com>",
        "X-Mailer": "git-send-email 2.0.4",
        "Subject": "[dpdk-dev] [PATCH] examples: do not probe pci twice",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Since commit a155d430119 (\"support link bonding device initialization\"),\nrte_eal_pci_probe() is called in rte_eal_init().\nSo it doesn't have to be called by application anymore.\nIt has been fixed for testpmd in commit 2950a769315,\nand this patch remove it from other applications.\n\nSigned-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>\n---\n app/test-pipeline/init.c                           |  5 ---\n app/test/test_kni.c                                |  5 ---\n examples/dpdk_qat/main.c                           |  3 --\n examples/exception_path/main.c                     |  5 ---\n examples/ip_fragmentation/main.c                   |  3 --\n examples/ip_pipeline/init.c                        |  5 ---\n examples/ip_reassembly/main.c                      |  3 --\n examples/ipv4_multicast/main.c                     |  3 --\n examples/kni/main.c                                |  5 ---\n examples/l2fwd-ivshmem/host/host.c                 |  3 --\n examples/l2fwd/main.c                              |  3 --\n examples/l3fwd-acl/main.c                          |  3 --\n examples/l3fwd-power/main.c                        |  3 --\n examples/l3fwd-vf/main.c                           |  3 --\n examples/l3fwd/main.c                              |  4 --\n examples/link_status_interrupt/main.c              |  3 --\n examples/load_balancer/init.c                      |  4 --\n .../client_server_mp/mp_client/client.c            |  3 --\n .../client_server_mp/mp_server/init.c              |  6 ---\n .../client_server_mp/shared/init_drivers.h         | 49 ----------------------\n examples/multi_process/l2fwd_fork/main.c           |  3 --\n examples/multi_process/symmetric_mp/main.c         |  6 +--\n examples/netmap_compat/bridge/bridge.c             |  4 --\n examples/qos_meter/main.c                          |  3 --\n examples/qos_sched/init.c                          |  3 --\n examples/quota_watermark/qw/init.c                 |  7 ----\n examples/vhost/main.c                              |  3 --\n examples/vhost_xen/main.c                          |  3 --\n examples/vmdq/main.c                               |  3 --\n 29 files changed, 2 insertions(+), 154 deletions(-)\n delete mode 100644 examples/multi_process/client_server_mp/shared/init_drivers.h",
    "diff": "diff --git a/app/test-pipeline/init.c b/app/test-pipeline/init.c\nindex a4337d0..17b6d23 100644\n--- a/app/test-pipeline/init.c\n+++ b/app/test-pipeline/init.c\n@@ -228,11 +228,6 @@ app_init_ports(void)\n {\n \tuint32_t i;\n \n-\t/* Init driver */\n-\tRTE_LOG(INFO, USER1, \"Initializing the PMD driver ...\\n\");\n-\tif (rte_eal_pci_probe() < 0)\n-\t\trte_panic(\"Cannot probe PCI\\n\");\n-\n \t/* Init NIC ports, then start the ports */\n \tfor (i = 0; i < app.n_ports; i++) {\n \t\tuint8_t port;\ndiff --git a/app/test/test_kni.c b/app/test/test_kni.c\nindex 2860bf3..1081131 100644\n--- a/app/test/test_kni.c\n+++ b/app/test/test_kni.c\n@@ -508,11 +508,6 @@ test_kni(void)\n \t\tprintf(\"fail to create mempool for kni\\n\");\n \t\treturn -1;\n \t}\n-\tret = rte_eal_pci_probe();\n-\tif (ret < 0) {\n-\t\tprintf(\"fail to probe PCI devices\\n\");\n-\t\treturn -1;\n-\t}\n \n \tnb_ports = rte_eth_dev_count();\n \tif (nb_ports == 0) {\ndiff --git a/examples/dpdk_qat/main.c b/examples/dpdk_qat/main.c\nindex 1599a0a..c130ea3 100644\n--- a/examples/dpdk_qat/main.c\n+++ b/examples/dpdk_qat/main.c\n@@ -696,9 +696,6 @@ MAIN(int argc, char **argv)\n \tif (ret < 0)\n \t\treturn -1;\n \n-\tif (rte_eal_pci_probe() < 0)\n-\t\trte_panic(\"Cannot probe PCI\\n\");\n-\n \tif (check_lcore_params() < 0)\n \t\trte_panic(\"check_lcore_params failed\\n\");\n \ndiff --git a/examples/exception_path/main.c b/examples/exception_path/main.c\nindex f286bf2..b485976 100644\n--- a/examples/exception_path/main.c\n+++ b/examples/exception_path/main.c\n@@ -567,11 +567,6 @@ main(int argc, char** argv)\n \t\treturn -1;\n \t}\n \n-\t/* Scan PCI bus for recognised devices */\n-\tret = rte_eal_pci_probe();\n-\tif (ret < 0)\n-\t\tFATAL_ERROR(\"Could not probe PCI (%d)\", ret);\n-\n \t/* Get number of ports found in scan */\n \tnb_sys_ports = rte_eth_dev_count();\n \tif (nb_sys_ports == 0)\ndiff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c\nindex 6d309b5..75028ac 100644\n--- a/examples/ip_fragmentation/main.c\n+++ b/examples/ip_fragmentation/main.c\n@@ -871,9 +871,6 @@ MAIN(int argc, char **argv)\n \tif (ret < 0)\n \t\trte_exit(EXIT_FAILURE, \"Invalid arguments\");\n \n-\tif (rte_eal_pci_probe() < 0)\n-\t\trte_panic(\"Cannot probe PCI\\n\");\n-\n \tnb_ports = rte_eth_dev_count();\n \tif (nb_ports > RTE_MAX_ETHPORTS)\n \t\tnb_ports = RTE_MAX_ETHPORTS;\ndiff --git a/examples/ip_pipeline/init.c b/examples/ip_pipeline/init.c\nindex e3ebd46..cb7568b 100644\n--- a/examples/ip_pipeline/init.c\n+++ b/examples/ip_pipeline/init.c\n@@ -474,11 +474,6 @@ app_init_ports(void)\n {\n \tuint32_t i;\n \n-\t/* Init driver */\n-\tRTE_LOG(INFO, USER1, \"Initializing the PMD driver ...\\n\");\n-\tif (rte_eal_pci_probe() < 0)\n-\t\trte_panic(\"Cannot probe PCI\\n\");\n-\n \t/* Init NIC ports, then start the ports */\n \tfor (i = 0; i < app.n_ports; i++) {\n \t\tuint32_t port;\ndiff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c\nindex b6b4f59..9ba3f0a 100644\n--- a/examples/ip_reassembly/main.c\n+++ b/examples/ip_reassembly/main.c\n@@ -1078,9 +1078,6 @@ MAIN(int argc, char **argv)\n \tif (ret < 0)\n \t\trte_exit(EXIT_FAILURE, \"Invalid IP reassembly parameters\\n\");\n \n-\tif (rte_eal_pci_probe() < 0)\n-\t\trte_exit(EXIT_FAILURE, \"Cannot probe PCI\\n\");\n-\n \tnb_ports = rte_eth_dev_count();\n \tif (nb_ports > RTE_MAX_ETHPORTS)\n \t\tnb_ports = RTE_MAX_ETHPORTS;\ndiff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c\nindex 35bd842..5c2ab86 100644\n--- a/examples/ipv4_multicast/main.c\n+++ b/examples/ipv4_multicast/main.c\n@@ -754,9 +754,6 @@ MAIN(int argc, char **argv)\n \tif (clone_pool == NULL)\n \t\trte_exit(EXIT_FAILURE, \"Cannot init clone mbuf pool\\n\");\n \n-\tif (rte_eal_pci_probe() < 0)\n-\t\trte_exit(EXIT_FAILURE, \"Cannot probe PCI\\n\");\n-\n \tnb_ports = rte_eth_dev_count();\n \tif (nb_ports == 0)\n \t\trte_exit(EXIT_FAILURE, \"No physical ports!\\n\");\ndiff --git a/examples/kni/main.c b/examples/kni/main.c\nindex 7df1b36..69d1ef2 100644\n--- a/examples/kni/main.c\n+++ b/examples/kni/main.c\n@@ -889,11 +889,6 @@ main(int argc, char** argv)\n \t\treturn -1;\n \t}\n \n-\t/* Scan PCI bus for recognised devices */\n-\tret = rte_eal_pci_probe();\n-\tif (ret < 0)\n-\t\trte_exit(EXIT_FAILURE, \"Could not probe PCI (%d)\\n\", ret);\n-\n \t/* Get number of ports found in scan */\n \tnb_sys_ports = rte_eth_dev_count();\n \tif (nb_sys_ports == 0)\ndiff --git a/examples/l2fwd-ivshmem/host/host.c b/examples/l2fwd-ivshmem/host/host.c\nindex 02e65b9..1800b3a 100644\n--- a/examples/l2fwd-ivshmem/host/host.c\n+++ b/examples/l2fwd-ivshmem/host/host.c\n@@ -716,9 +716,6 @@ int main(int argc, char **argv)\n \tif (l2fwd_ivshmem_pktmbuf_pool == NULL)\n \t\trte_exit(EXIT_FAILURE, \"Cannot init mbuf pool\\n\");\n \n-\tif (rte_eal_pci_probe() < 0)\n-\t\trte_exit(EXIT_FAILURE, \"Cannot probe PCI\\n\");\n-\n \tnb_ports = rte_eth_dev_count();\n \tif (nb_ports == 0)\n \t\trte_exit(EXIT_FAILURE, \"No Ethernet ports - bye\\n\");\ndiff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c\nindex 4069d7c..e16c914 100644\n--- a/examples/l2fwd/main.c\n+++ b/examples/l2fwd/main.c\n@@ -615,9 +615,6 @@ MAIN(int argc, char **argv)\n \tif (l2fwd_pktmbuf_pool == NULL)\n \t\trte_exit(EXIT_FAILURE, \"Cannot init mbuf pool\\n\");\n \n-\tif (rte_eal_pci_probe() < 0)\n-\t\trte_exit(EXIT_FAILURE, \"Cannot probe PCI\\n\");\n-\n \tnb_ports = rte_eth_dev_count();\n \tif (nb_ports == 0)\n \t\trte_exit(EXIT_FAILURE, \"No Ethernet ports - bye\\n\");\ndiff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c\nindex bafd26a..4dd6b34 100644\n--- a/examples/l3fwd-acl/main.c\n+++ b/examples/l3fwd-acl/main.c\n@@ -1995,9 +1995,6 @@ MAIN(int argc, char **argv)\n \tif (ret < 0)\n \t\trte_exit(EXIT_FAILURE, \"init_lcore_rx_queues failed\\n\");\n \n-\tif (rte_eal_pci_probe() < 0)\n-\t\trte_exit(EXIT_FAILURE, \"Cannot probe PCI\\n\");\n-\n \tnb_ports = rte_eth_dev_count();\n \tif (nb_ports > RTE_MAX_ETHPORTS)\n \t\tnb_ports = RTE_MAX_ETHPORTS;\ndiff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c\nindex a9d5c80..3bf63ff 100644\n--- a/examples/l3fwd-power/main.c\n+++ b/examples/l3fwd-power/main.c\n@@ -1547,9 +1547,6 @@ MAIN(int argc, char **argv)\n \t\trte_exit(EXIT_FAILURE, \"init_lcore_rx_queues failed\\n\");\n \n \n-\tif (rte_eal_pci_probe() < 0)\n-\t\trte_exit(EXIT_FAILURE, \"Cannot probe PCI\\n\");\n-\n \tnb_ports = rte_eth_dev_count();\n \tif (nb_ports > RTE_MAX_ETHPORTS)\n \t\tnb_ports = RTE_MAX_ETHPORTS;\ndiff --git a/examples/l3fwd-vf/main.c b/examples/l3fwd-vf/main.c\nindex 7b1e08a..f567aa8 100644\n--- a/examples/l3fwd-vf/main.c\n+++ b/examples/l3fwd-vf/main.c\n@@ -1007,9 +1007,6 @@ MAIN(int argc, char **argv)\n \tif (ret < 0)\n \t\trte_exit(EXIT_FAILURE, \"init_lcore_rx_queues failed\\n\");\n \n-\tif (rte_eal_pci_probe() < 0)\n-\t\trte_exit(EXIT_FAILURE, \"Cannot probe PCI\\n\");\n-\n \tnb_ports = rte_eth_dev_count();\n \tif (nb_ports > RTE_MAX_ETHPORTS)\n \t\tnb_ports = RTE_MAX_ETHPORTS;\ndiff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c\nindex e3e3463..01220e3 100644\n--- a/examples/l3fwd/main.c\n+++ b/examples/l3fwd/main.c\n@@ -2474,10 +2474,6 @@ MAIN(int argc, char **argv)\n \tif (ret < 0)\n \t\trte_exit(EXIT_FAILURE, \"init_lcore_rx_queues failed\\n\");\n \n-\n-\tif (rte_eal_pci_probe() < 0)\n-\t\trte_exit(EXIT_FAILURE, \"Cannot probe PCI\\n\");\n-\n \tnb_ports = rte_eth_dev_count();\n \tif (nb_ports > RTE_MAX_ETHPORTS)\n \t\tnb_ports = RTE_MAX_ETHPORTS;\ndiff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c\nindex 1a87551..b8b7571 100644\n--- a/examples/link_status_interrupt/main.c\n+++ b/examples/link_status_interrupt/main.c\n@@ -663,9 +663,6 @@ MAIN(int argc, char **argv)\n \tif (lsi_pktmbuf_pool == NULL)\n \t\trte_panic(\"Cannot init mbuf pool\\n\");\n \n-\tif (rte_eal_pci_probe() < 0)\n-\t\trte_panic(\"Cannot probe PCI\\n\");\n-\n \tnb_ports = rte_eth_dev_count();\n \tif (nb_ports == 0)\n \t\trte_panic(\"No Ethernet port - bye\\n\");\ndiff --git a/examples/load_balancer/init.c b/examples/load_balancer/init.c\nindex 2f00a70..a300706 100644\n--- a/examples/load_balancer/init.c\n+++ b/examples/load_balancer/init.c\n@@ -450,10 +450,6 @@ app_init_nics(void)\n \tint ret;\n \tuint32_t n_rx_queues, n_tx_queues;\n \n-\tif (rte_eal_pci_probe() < 0) {\n-\t\trte_panic(\"Cannot probe PCI\\n\");\n-\t}\n-\n \t/* Init NIC ports and queues, then start the ports */\n \tfor (port = 0; port < APP_MAX_NIC_PORTS; port ++) {\n \t\tstruct rte_mempool *pool;\ndiff --git a/examples/multi_process/client_server_mp/mp_client/client.c b/examples/multi_process/client_server_mp/mp_client/client.c\nindex ee2338c..af8f819 100644\n--- a/examples/multi_process/client_server_mp/mp_client/client.c\n+++ b/examples/multi_process/client_server_mp/mp_client/client.c\n@@ -65,7 +65,6 @@\n #include <rte_string_fns.h>\n \n #include \"common.h\"\n-#include \"init_drivers.h\"\n \n /* Number of packets to attempt to read from queue */\n #define PKT_READ_SIZE  ((uint16_t)32)\n@@ -240,8 +239,6 @@ main(int argc, char *argv[])\n \tif (parse_app_args(argc, argv) < 0)\n \t\trte_exit(EXIT_FAILURE, \"Invalid command-line arguments\\n\");\n \n-\tif (init_drivers() < 0)\n-\t\trte_exit(EXIT_FAILURE, \"Cannot get NIC ports\\n\");\n \tif (rte_eth_dev_count() == 0)\n \t\trte_exit(EXIT_FAILURE, \"No Ethernet ports - bye\\n\");\n \ndiff --git a/examples/multi_process/client_server_mp/mp_server/init.c b/examples/multi_process/client_server_mp/mp_server/init.c\nindex a84d1ee..30518c0 100644\n--- a/examples/multi_process/client_server_mp/mp_server/init.c\n+++ b/examples/multi_process/client_server_mp/mp_server/init.c\n@@ -66,7 +66,6 @@\n #include <rte_cycles.h>\n \n #include \"common.h\"\n-#include \"init_drivers.h\"\n #include \"args.h\"\n #include \"init.h\"\n #include \"main.h\"\n@@ -308,11 +307,6 @@ init(int argc, char *argv[])\n \targc -= retval;\n \targv += retval;\n \n-\t/* initialise the nic drivers */\n-\tretval = init_drivers();\n-\tif (retval != 0)\n-\t\trte_exit(EXIT_FAILURE, \"Cannot initialise drivers\\n\");\n-\n \t/* get total number of ports */\n \ttotal_ports = rte_eth_dev_count();\n \ndiff --git a/examples/multi_process/client_server_mp/shared/init_drivers.h b/examples/multi_process/client_server_mp/shared/init_drivers.h\ndeleted file mode 100644\nindex 3c9881f..0000000\n--- a/examples/multi_process/client_server_mp/shared/init_drivers.h\n+++ /dev/null\n@@ -1,49 +0,0 @@\n-/*-\n- *   BSD LICENSE\n- *\n- *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n- *   All rights reserved.\n- *\n- *   Redistribution and use in source and binary forms, with or without\n- *   modification, are permitted provided that the following conditions\n- *   are met:\n- *\n- *     * Redistributions of source code must retain the above copyright\n- *       notice, this list of conditions and the following disclaimer.\n- *     * Redistributions in binary form must reproduce the above copyright\n- *       notice, this list of conditions and the following disclaimer in\n- *       the documentation and/or other materials provided with the\n- *       distribution.\n- *     * Neither the name of Intel Corporation nor the names of its\n- *       contributors may be used to endorse or promote products derived\n- *       from this software without specific prior written permission.\n- *\n- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n- *   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n- */\n-\n-#ifndef _INIT_DRIVERS_H_\n-#define _INIT_DRIVERS_H_\n-\n-/**\n- * Initialise all 1G and 10G NICs available\n- */\n-static inline int\n-init_drivers(void)\n-{\n-\tif (rte_eal_pci_probe() < 0)\n-\t\treturn -1;\n-\n-\treturn 0;\n-}\n-\n-#endif\ndiff --git a/examples/multi_process/l2fwd_fork/main.c b/examples/multi_process/l2fwd_fork/main.c\nindex 03fba55..c887b63 100644\n--- a/examples/multi_process/l2fwd_fork/main.c\n+++ b/examples/multi_process/l2fwd_fork/main.c\n@@ -1050,9 +1050,6 @@ MAIN(int argc, char **argv)\n \tfor (i = 0; i < RTE_MAX_LCORE; i++)\n \t\tlcore_resource[i].lcore_id = i;\n \n-\tif (rte_eal_pci_probe() < 0)\n-\t\trte_exit(EXIT_FAILURE, \"Cannot probe PCI\\n\");\n-\n \tnb_ports = rte_eth_dev_count();\n \tif (nb_ports == 0)\n \t\trte_exit(EXIT_FAILURE, \"No Ethernet ports - bye\\n\");\ndiff --git a/examples/multi_process/symmetric_mp/main.c b/examples/multi_process/symmetric_mp/main.c\nindex b8f31b3..504a27a 100644\n--- a/examples/multi_process/symmetric_mp/main.c\n+++ b/examples/multi_process/symmetric_mp/main.c\n@@ -461,16 +461,14 @@ main(int argc, char **argv)\n \targc -= ret;\n \targv += ret;\n \n-\t/* probe to determine the NIC devices available */\n-\tproc_type = rte_eal_process_type();\n-\tif (rte_eal_pci_probe() < 0)\n-\t\trte_exit(EXIT_FAILURE, \"Cannot probe PCI\\n\");\n+\t/* determine the NIC devices available */\n \tif (rte_eth_dev_count() == 0)\n \t\trte_exit(EXIT_FAILURE, \"No Ethernet ports - bye\\n\");\n \n \t/* parse application arguments (those after the EAL ones) */\n \tsmp_parse_args(argc, argv);\n \n+\tproc_type = rte_eal_process_type();\n \tmp = (proc_type == RTE_PROC_SECONDARY) ?\n \t\t\trte_mempool_lookup(_SMP_MBUF_POOL) :\n \t\t\trte_mempool_create(_SMP_MBUF_POOL, NB_MBUFS, MBUF_SIZE,\ndiff --git a/examples/netmap_compat/bridge/bridge.c b/examples/netmap_compat/bridge/bridge.c\nindex 898277e..d9ceb42 100644\n--- a/examples/netmap_compat/bridge/bridge.c\n+++ b/examples/netmap_compat/bridge/bridge.c\n@@ -294,10 +294,6 @@ int main(int argc, char *argv[])\n \tif (ports.num == 0)\n \t\trte_exit(EXIT_FAILURE, \"no ports specified\\n\");\n \n-\terr = rte_eal_pci_probe();\n-\tif (err < 0)\n-\t\trte_exit(EXIT_FAILURE, \"rte_eal_pci_probe(): error %d\\n\", err);\n-\n \tif (rte_eth_dev_count() < 1)\n \t\trte_exit(EXIT_FAILURE, \"Not enough ethernet ports available\\n\");\n \ndiff --git a/examples/qos_meter/main.c b/examples/qos_meter/main.c\nindex b4b8c4f..c02ac50 100644\n--- a/examples/qos_meter/main.c\n+++ b/examples/qos_meter/main.c\n@@ -386,9 +386,6 @@ MAIN(int argc, char **argv)\n \tif (pool == NULL)\n \t\trte_exit(EXIT_FAILURE, \"Buffer pool creation error\\n\");\n \n-\tif (rte_eal_pci_probe() < 0)\n-\t\trte_exit(EXIT_FAILURE, \"PCI probe error\\n\");\n-\n \t/* NIC init */\n \tret = rte_eth_dev_configure(port_rx, 1, 1, &port_conf);\n \tif (ret < 0)\ndiff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c\nindex cbfd63f..f38802e 100644\n--- a/examples/qos_sched/init.c\n+++ b/examples/qos_sched/init.c\n@@ -304,9 +304,6 @@ int app_init(void)\n \tchar ring_name[MAX_NAME_LEN];\n \tchar pool_name[MAX_NAME_LEN];\n \n-\tif (rte_eal_pci_probe() < 0)\n-\t\trte_exit(EXIT_FAILURE, \"Cannot probe PCI\\n\");\n-\n \tif (rte_eth_dev_count() == 0)\n \t\trte_exit(EXIT_FAILURE, \"No Ethernet port - bye\\n\");\n \ndiff --git a/examples/quota_watermark/qw/init.c b/examples/quota_watermark/qw/init.c\nindex a7f8c85..9bc5db3 100644\n--- a/examples/quota_watermark/qw/init.c\n+++ b/examples/quota_watermark/qw/init.c\n@@ -136,13 +136,6 @@ void configure_eth_port(uint8_t port_id)\n void\n init_dpdk(void)\n {\n-    int ret;\n-\n-    /* Bind the drivers to usable devices */\n-    ret = rte_eal_pci_probe();\n-    if (ret < 0)\n-        rte_exit(EXIT_FAILURE, \"rte_eal_pci_probe(): error %d\\n\", ret);\n-\n     if (rte_eth_dev_count() < 2)\n         rte_exit(EXIT_FAILURE, \"Not enough ethernet port available\\n\");\n }\ndiff --git a/examples/vhost/main.c b/examples/vhost/main.c\nindex 85ee8b8..c81b8f5 100644\n--- a/examples/vhost/main.c\n+++ b/examples/vhost/main.c\n@@ -3549,9 +3549,6 @@ MAIN(int argc, char *argv[])\n \tif (ret < 0)\n \t\trte_exit(EXIT_FAILURE, \"Invalid argument\\n\");\n \n-\tif (rte_eal_pci_probe() != 0)\n-\t\trte_exit(EXIT_FAILURE, \"Error with NIC driver initialization\\n\");\n-\n \tfor (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id ++)\n \t\tif (rte_lcore_is_enabled(lcore_id))\n \t\t\tlcore_ids[core_id ++] = lcore_id;\ndiff --git a/examples/vhost_xen/main.c b/examples/vhost_xen/main.c\nindex 56ffec8..498de06 100644\n--- a/examples/vhost_xen/main.c\n+++ b/examples/vhost_xen/main.c\n@@ -1466,9 +1466,6 @@ MAIN(int argc, char *argv[])\n \tif (ret < 0)\n \t\trte_exit(EXIT_FAILURE, \"Invalid argument\\n\");\n \n-\tif (rte_eal_pci_probe() != 0)\n-\t\trte_exit(EXIT_FAILURE, \"Error with NIC driver initialization\\n\");\n-\n \tfor (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id ++)\n \t\tif (rte_lcore_is_enabled(lcore_id))\n \t\t\tlcore_ids[core_id ++] = lcore_id;\ndiff --git a/examples/vmdq/main.c b/examples/vmdq/main.c\nindex 35df234..a162d8b 100644\n--- a/examples/vmdq/main.c\n+++ b/examples/vmdq/main.c\n@@ -597,9 +597,6 @@ MAIN(int argc, char *argv[])\n \tif (ret < 0)\n \t\trte_exit(EXIT_FAILURE, \"Invalid VMDQ argument\\n\");\n \n-\tif (rte_eal_pci_probe() != 0)\n-\t\trte_exit(EXIT_FAILURE, \"Error with NIC driver initialization\\n\");\n-\n \tfor (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id ++)\n \t\tif (rte_lcore_is_enabled(lcore_id))\n \t\t\tlcore_ids[core_id ++] = lcore_id;\n",
    "prefixes": [
        "dpdk-dev"
    ]
}