Show a patch.

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

{
    "id": 243,
    "url": "https://patches.dpdk.org/api/patches/243/",
    "web_url": "https://patches.dpdk.org/patch/243/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<1409062338-26477-3-git-send-email-david.marchand@6wind.com>",
    "date": "2014-08-26T14:12:17",
    "name": "[dpdk-dev,2/3] Revert \"eal: support link bonding device initialization\"",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "d8cf03a6725249f0ca4a83cb59410c4cf5ebe44a",
    "submitter": {
        "id": 3,
        "url": "https://patches.dpdk.org/api/people/3/",
        "name": "David Marchand",
        "email": "david.marchand@6wind.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/patch/243/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/243/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/243/checks/",
    "tags": {},
    "headers": {
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "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:in-reply-to\n\t:references;\n\tbh=cwGZ0nuqDXVCNDzOsyv0jt8e/+7af+UOf2p1US+CZcI=;\n\tb=NtnZ8ojHilqhz29JgwSzCixaplcln6pbPCVWpq5dbmkRfk7bAdJhK6C48TwsacsFj5\n\t5aRoEjHrfAIRt6Dpj4iWsGCCK90PLemRZk+duTP/eBw6Tnx+T7mglbyNvVrVxiWUXN/e\n\tbpRdv6Sfinjh4csc4Qzfl5Yb/uN89CEPm62zN24ODI33O+MZu5JSoeT4uiLSfl8MzIjm\n\tiUUoUj43QH+w3KuTUIokiwwbY1Rkpm1lIJg1cYUi44yND9KkfFOwIimh3DCYNTndOYwP\n\tucStvPOc4KYblY4j4bQYfGDyW0LFAXywcGdbEcxSpEhz3yPmH5XB4iuJ6xz9o+l1kquJ\n\t56ow==",
        "In-Reply-To": "<1409062338-26477-1-git-send-email-david.marchand@6wind.com>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "X-BeenThere": "dev@dpdk.org",
        "References": "<1409062338-26477-1-git-send-email-david.marchand@6wind.com>",
        "X-Mailer": "git-send-email 1.7.10.4",
        "X-Gm-Message-State": "ALoCoQlFoWTvIKR+jnBmSoW7218Usa/G3u+trRZuYWTJfuYXYC9hzREiqnXfsp++eoclK+HNUPV8",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "To": "dev@dpdk.org",
        "Date": "Tue, 26 Aug 2014 16:12:17 +0200",
        "Received": [
            "from mail-wg0-f51.google.com (mail-wg0-f51.google.com\n\t[74.125.82.51]) by dpdk.org (Postfix) with ESMTP id 6FD16B3C0\n\tfor <dev@dpdk.org>; Tue, 26 Aug 2014 16:08:26 +0200 (CEST)",
            "by mail-wg0-f51.google.com with SMTP id b13so14646166wgh.22\n\tfor <dev@dpdk.org>; Tue, 26 Aug 2014 07:12:26 -0700 (PDT)",
            "from alcyon.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net.\n\t[82.239.227.177]) by mx.google.com with ESMTPSA id\n\tcy9sm12568145wib.18.2014.08.26.07.12.25 for <dev@dpdk.org>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 26 Aug 2014 07:12:25 -0700 (PDT)"
        ],
        "From": "David Marchand <david.marchand@6wind.com>",
        "Precedence": "list",
        "Message-Id": "<1409062338-26477-3-git-send-email-david.marchand@6wind.com>",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "Subject": "[dpdk-dev] [PATCH 2/3] Revert \"eal: support link bonding device\n\tinitialization\"",
        "X-List-Received-Date": "Tue, 26 Aug 2014 14:08:26 -0000",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Return-Path": "<david.marchand@6wind.com>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "X-Received": "by 10.180.149.197 with SMTP id uc5mr12289812wib.75.1409062346499;\n\tTue, 26 Aug 2014 07:12:26 -0700 (PDT)",
        "X-Mailman-Version": "2.1.15"
    },
    "content": "This reverts commit a155d430119d947d3cb03136ce50924a642dbfe0.\n\nSigned-off-by: David Marchand <david.marchand@6wind.com>\n---\n lib/librte_eal/bsdapp/eal/eal.c             |   10 +----\n lib/librte_eal/common/eal_common_dev.c      |   58 +++++++++------------------\n lib/librte_eal/common/eal_common_pci.c      |    3 --\n lib/librte_eal/common/include/eal_private.h |    7 ++++\n lib/librte_eal/common/include/rte_dev.h     |   14 +------\n lib/librte_eal/linuxapp/eal/eal.c           |   11 +----\n 6 files changed, 29 insertions(+), 74 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c\nindex dad9e0c..6ca8758 100644\n--- a/lib/librte_eal/bsdapp/eal/eal.c\n+++ b/lib/librte_eal/bsdapp/eal/eal.c\n@@ -898,7 +898,7 @@ rte_eal_init(int argc, char **argv)\n \n \trte_eal_mcfg_complete();\n \n-\tif (rte_eal_dev_init(PMD_INIT_PRE_PCI_PROBE) < 0)\n+\tif (rte_eal_dev_init() < 0)\n \t\trte_panic(\"Cannot init pmd devices\\n\");\n \n \tRTE_LCORE_FOREACH_SLAVE(i) {\n@@ -930,14 +930,6 @@ rte_eal_init(int argc, char **argv)\n \trte_eal_mp_remote_launch(sync_func, NULL, SKIP_MASTER);\n \trte_eal_mp_wait_lcore();\n \n-\t/* Probe & Initialize PCI devices */\n-\tif (rte_eal_pci_probe())\n-\t\t\trte_panic(\"Cannot probe PCI\\n\");\n-\n-\t/* Initialize any outstanding devices */\n-\tif (rte_eal_dev_init(PMD_INIT_POST_PCI_PROBE) < 0)\n-\t\trte_panic(\"Cannot init pmd devices\\n\");\n-\n \treturn fctret;\n }\n \ndiff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c\nindex 1194419..eae5656 100644\n--- a/lib/librte_eal/common/eal_common_dev.c\n+++ b/lib/librte_eal/common/eal_common_dev.c\n@@ -62,7 +62,7 @@ rte_eal_driver_unregister(struct rte_driver *driver)\n }\n \n int\n-rte_eal_dev_init(uint8_t init_pri)\n+rte_eal_dev_init(void)\n {\n \tstruct rte_devargs *devargs;\n \tstruct rte_driver *driver;\n@@ -80,52 +80,30 @@ rte_eal_dev_init(uint8_t init_pri)\n \t\t\tcontinue;\n \n \t\tTAILQ_FOREACH(driver, &dev_driver_list, next) {\n-\t\t\t/* RTE_DEVTYPE_VIRTUAL can only be a virtual or bonded device,\n-\t\t\t * virtual devices are initialized pre PCI probing and bonded\n-\t\t\t * device are post pci probing */\n-\t\t\tif ((driver->type == PMD_VDEV && init_pri ==\n-\t\t\t\t\tPMD_INIT_PRE_PCI_PROBE) ||\n-\t\t\t\t(driver->type == PMD_BDEV && init_pri ==\n-\t\t\t\t\t\tPMD_INIT_POST_PCI_PROBE)) {\n+\t\t\tif (driver->type != PMD_VDEV)\n+\t\t\t\tcontinue;\n \n-\t\t\t\t/* search a driver prefix in virtual device name */\n-\t\t\t\tif (!strncmp(driver->name, devargs->virtual.drv_name,\n-\t\t\t\t\t\tstrlen(driver->name))) {\n-\t\t\t\t\tprintf(\"init (%u) %s\\n\", init_pri, devargs->virtual.drv_name);\n-\t\t\t\t\tdriver->init(devargs->virtual.drv_name,\n-\t\t\t\t\t\tdevargs->args);\n-\t\t\t\t\tbreak;\n-\t\t\t\t}\n+\t\t\t/* search a driver prefix in virtual device name */\n+\t\t\tif (!strncmp(driver->name, devargs->virtual.drv_name,\n+\t\t\t\t\tstrlen(driver->name))) {\n+\t\t\t\tdriver->init(devargs->virtual.drv_name,\n+\t\t\t\t\tdevargs->args);\n+\t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \n-\t\t/* If initializing pre PCI probe, then we don't expect a bonded driver\n-\t\t * to be found */\n-\t\tif (init_pri == PMD_INIT_PRE_PCI_PROBE &&\n-\t\t\t\tstrncmp(PMD_BOND_NAME, devargs->virtual.drv_name,\n-\t\t\t\t\tstrlen(PMD_BOND_NAME)) != 0) {\n-\t\t\tif (driver == NULL) {\n-\t\t\t\trte_panic(\"no driver found for virtual device %s\\n\",\n-\t\t\t\t\tdevargs->virtual.drv_name);\n-\t\t\t}\n-\t\t} else if (init_pri == PMD_INIT_POST_PCI_PROBE &&\n-\t\t\t\tstrncmp(PMD_BOND_NAME, devargs->virtual.drv_name,\n-\t\t\t\t\tstrlen(PMD_BOND_NAME)) == 0) {\n-\t\t\tif (driver == NULL) {\n-\t\t\t\trte_panic(\"no driver found for bonded device %s\\n\",\n-\t\t\t\t\tdevargs->virtual.drv_name);\n-\t\t\t}\n+\t\tif (driver == NULL) {\n+\t\t\trte_panic(\"no driver found for %s\\n\",\n+\t\t\t\t  devargs->virtual.drv_name);\n \t\t}\n \t}\n \n-\t/* Once the vdevs are initialized, start calling all the pdev drivers */\n-\tif (init_pri == PMD_INIT_PRE_PCI_PROBE) {\n-\t\tTAILQ_FOREACH(driver, &dev_driver_list, next) {\n-\t\t\tif (driver->type != PMD_PDEV)\n-\t\t\t\tcontinue;\n-\t\t\t/* PDEV drivers don't get passed any parameters */\n-\t\t\tdriver->init(NULL, NULL);\n-\t\t}\n+\t/* Once the vdevs are initalized, start calling all the pdev drivers */\n+\tTAILQ_FOREACH(driver, &dev_driver_list, next) {\n+\t\tif (driver->type != PMD_PDEV)\n+\t\t\tcontinue;\n+\t\t/* PDEV drivers don't get passed any parameters */\n+\t\tdriver->init(NULL, NULL);\n \t}\n \treturn 0;\n }\ndiff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c\nindex c637361..af809a8 100644\n--- a/lib/librte_eal/common/eal_common_pci.c\n+++ b/lib/librte_eal/common/eal_common_pci.c\n@@ -150,9 +150,6 @@ rte_eal_pci_probe(void)\n \t\tprobe_all = 1;\n \n \tTAILQ_FOREACH(dev, &pci_device_list, next) {\n-\t\t/* check if device has already been initialized */\n-\t\tif (dev->driver != NULL)\n-\t\t\tcontinue;\n \n \t\t/* set devargs in PCI structure */\n \t\tdevargs = pci_devargs_lookup(dev);\ndiff --git a/lib/librte_eal/common/include/eal_private.h b/lib/librte_eal/common/include/eal_private.h\nindex b440ffb..232fcec 100644\n--- a/lib/librte_eal/common/include/eal_private.h\n+++ b/lib/librte_eal/common/include/eal_private.h\n@@ -196,4 +196,11 @@ int rte_eal_intr_init(void);\n  */\n int rte_eal_alarm_init(void);\n \n+/**\n+ * This function initialises any virtual devices\n+ *\n+ * This function is private to the EAL.\n+ */\n+int rte_eal_dev_init(void);\n+\n #endif /* _EAL_PRIVATE_H_ */\ndiff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h\nindex d89f1a5..f7e3a10 100644\n--- a/lib/librte_eal/common/include/rte_dev.h\n+++ b/lib/librte_eal/common/include/rte_dev.h\n@@ -62,16 +62,6 @@ typedef int (rte_dev_init_t)(const char *name, const char *args);\n enum pmd_type {\n \tPMD_VDEV = 0,\n \tPMD_PDEV = 1,\n-\tPMD_BDEV = 2,\t/**< Poll Mode Driver Bonded Device*/\n-};\n-\n-#define PMD_BOND_NAME \"eth_bond\"\n-\n-/**\n- * Driver initialization */\n-enum pmd_init_priority {\n-\tPMD_INIT_PRE_PCI_PROBE = 0,\n-\tPMD_INIT_POST_PCI_PROBE = 1,\n };\n \n /**\n@@ -103,9 +93,9 @@ void rte_eal_driver_register(struct rte_driver *driver);\n void rte_eal_driver_unregister(struct rte_driver *driver);\n \n /**\n- * Initialize all the registered drivers in this process\n+ * Initalize all the registered drivers in this process\n  */\n-int rte_eal_dev_init(uint8_t init_priority);\n+int rte_eal_dev_init(void);\n \n #define PMD_REGISTER_DRIVER(d)\\\n void devinitfn_ ##d(void);\\\ndiff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c\nindex 884aa9b..392bedf 100644\n--- a/lib/librte_eal/linuxapp/eal/eal.c\n+++ b/lib/librte_eal/linuxapp/eal/eal.c\n@@ -75,7 +75,6 @@\n #include <rte_atomic.h>\n #include <malloc_heap.h>\n #include <rte_eth_ring.h>\n-#include <rte_dev.h>\n \n #include \"eal_private.h\"\n #include \"eal_thread.h\"\n@@ -1178,7 +1177,7 @@ rte_eal_init(int argc, char **argv)\n \tRTE_LOG(DEBUG, EAL, \"Master core %u is ready (tid=%x)\\n\",\n \t\trte_config.master_lcore, (int)thread_id);\n \n-\tif (rte_eal_dev_init(PMD_INIT_PRE_PCI_PROBE) < 0)\n+\tif (rte_eal_dev_init() < 0)\n \t\trte_panic(\"Cannot init pmd devices\\n\");\n \n \tRTE_LCORE_FOREACH_SLAVE(i) {\n@@ -1208,14 +1207,6 @@ rte_eal_init(int argc, char **argv)\n \trte_eal_mp_remote_launch(sync_func, NULL, SKIP_MASTER);\n \trte_eal_mp_wait_lcore();\n \n-\t/* Probe & Initialize PCI devices */\n-\tif (rte_eal_pci_probe())\n-\t\t\trte_panic(\"Cannot probe PCI\\n\");\n-\n-\t/* Initialize any outstanding devices */\n-\tif (rte_eal_dev_init(PMD_INIT_POST_PCI_PROBE) < 0)\n-\t\trte_panic(\"Cannot init pmd devices\\n\");\n-\n \treturn fctret;\n }\n \n",
    "prefixes": [
        "dpdk-dev",
        "2/3"
    ]
}