get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 4211,
    "url": "http://patches.dpdk.org/api/patches/4211/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1427839547-14705-1-git-send-email-thomas.monjalon@6wind.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": "<1427839547-14705-1-git-send-email-thomas.monjalon@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1427839547-14705-1-git-send-email-thomas.monjalon@6wind.com",
    "date": "2015-03-31T22:05:47",
    "name": "[dpdk-dev] pci: rename passthrough driver to kernel driver",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "9b5d0d8e2f981d9a12e7d06110bc93e07f45795c",
    "submitter": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/people/1/?format=api",
        "name": "Thomas Monjalon",
        "email": "thomas.monjalon@6wind.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1427839547-14705-1-git-send-email-thomas.monjalon@6wind.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/4211/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/4211/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 F255D6A95;\n\tWed,  1 Apr 2015 00:06:43 +0200 (CEST)",
            "from mail-wg0-f53.google.com (mail-wg0-f53.google.com\n\t[74.125.82.53]) by dpdk.org (Postfix) with ESMTP id 409046A94\n\tfor <dev@dpdk.org>; Wed,  1 Apr 2015 00:06:42 +0200 (CEST)",
            "by wgdm6 with SMTP id m6so34238088wgd.2\n\tfor <dev@dpdk.org>; Tue, 31 Mar 2015 15:06:42 -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\tei8sm22703722wib.10.2015.03.31.15.06.40 for <dev@dpdk.org>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tTue, 31 Mar 2015 15:06:41 -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=DtzcNE0BLV7cpJDGv1rfg8j/90w/Pxwmiqw7Wo1WXIU=;\n\tb=Db5G5GiRZi/qpsn/1LnKyEg2SyIKkIasu0G2zsQBXVpQNALIjM3zebGqMEHLESoM8n\n\tMAerXEbPVM6DEVmpt0ajeQPQcxnQ+Rh+Zn/PGxYP9/SBcUVxqXQJHOvcVoOK66Z0x3h3\n\toeIxnkxg8ltuGnORWa9yKiADgql3/TKc+8QuEe2PBEf7qim01EyjsoVDKEc48mFRLVcy\n\t3HGvOJGLtEk8aQU3JNmfpPFMAG4+KtX0Ejz6gIol12zJJv0XLY2szPtQiVJLIBS71n4W\n\tG4J/u6ageFRtto8dImzZq9q4LKgV6z7LrxxCuRKOdoZi6fqtSUm/E2WVPqqwYJis4yOe\n\tIZKQ==",
        "X-Gm-Message-State": "ALoCoQn7q4PDr6IDX9tBzhppfIk4LEnaOvjmRTlv0eFdVWh2bg6i05PC1dv8NdieQA+AWD2q98gh",
        "X-Received": "by 10.194.175.137 with SMTP id ca9mr74424910wjc.67.1427839602141;\n\tTue, 31 Mar 2015 15:06:42 -0700 (PDT)",
        "From": "Thomas Monjalon <thomas.monjalon@6wind.com>",
        "To": "dev@dpdk.org",
        "Date": "Wed,  1 Apr 2015 00:05:47 +0200",
        "Message-Id": "<1427839547-14705-1-git-send-email-thomas.monjalon@6wind.com>",
        "X-Mailer": "git-send-email 2.2.2",
        "Subject": "[dpdk-dev] [PATCH] pci: rename passthrough driver to kernel driver",
        "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": "Kernel driver (kdrv) seems easier to understand than\npassthrough driver (pt_driver). It's also more generic\nas a PMD could run on top of any PCI kernel driver if\nit would offer such support.\n\nSigned-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>\n---\n lib/librte_eal/bsdapp/eal/eal_pci.c     |  3 +--\n lib/librte_eal/common/include/rte_pci.h | 12 ++++++------\n lib/librte_eal/linuxapp/eal/eal_pci.c   | 33 ++++++++++++++++-----------------\n lib/librte_ether/rte_ethdev.c           |  8 ++++----\n 4 files changed, 27 insertions(+), 29 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c\nindex fe3ef86..30f0232 100644\n--- a/lib/librte_eal/bsdapp/eal/eal_pci.c\n+++ b/lib/librte_eal/bsdapp/eal/eal_pci.c\n@@ -356,8 +356,7 @@ pci_scan_one(int dev_pci_fd, struct pci_conf *conf)\n \t\t\t\tTAILQ_INSERT_BEFORE(dev2, dev, next);\n \t\t\t\treturn 0;\n \t\t\t} else { /* already registered */\n-\t\t\t\t/* update pt_driver */\n-\t\t\t\tdev2->pt_driver = dev->pt_driver;\n+\t\t\t\tdev2->kdrv = dev->kdrv;\n \t\t\t\tdev2->max_vfs = dev->max_vfs;\n \t\t\t\tmemmove(dev2->mem_resource,\n \t\t\t\t\tdev->mem_resource,\ndiff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h\nindex 995f814..785852d 100644\n--- a/lib/librte_eal/common/include/rte_pci.h\n+++ b/lib/librte_eal/common/include/rte_pci.h\n@@ -142,11 +142,11 @@ struct rte_pci_addr {\n \n struct rte_devargs;\n \n-enum rte_pt_driver {\n-\tRTE_PT_UNKNOWN\t\t= 0,\n-\tRTE_PT_IGB_UIO\t\t= 1,\n-\tRTE_PT_VFIO\t\t= 2,\n-\tRTE_PT_UIO_GENERIC\t= 3,\n+enum rte_kernel_driver {\n+\tRTE_KDRV_UNKNOWN = 0,\n+\tRTE_KDRV_IGB_UIO,\n+\tRTE_KDRV_VFIO,\n+\tRTE_KDRV_UIO_GENERIC,\n };\n \n /**\n@@ -162,7 +162,7 @@ struct rte_pci_device {\n \tuint16_t max_vfs;                       /**< sriov enable if not zero */\n \tint numa_node;                          /**< NUMA node connection */\n \tstruct rte_devargs *devargs;            /**< Device user arguments */\n-\tenum rte_pt_driver pt_driver;\t\t/**< Driver of passthrough */\n+\tenum rte_kernel_driver kdrv;            /**< Kernel driver passthrough */\n };\n \n /** Any PCI device identifier (vendor, device, ...) */\ndiff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c\nindex 83c589e..9cb0ffd 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_pci.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_pci.c\n@@ -340,19 +340,19 @@ pci_scan_one(const char *dirname, uint16_t domain, uint8_t bus,\n \tret = pci_get_kernel_driver_by_path(filename, driver);\n \tif (!ret) {\n \t\tif (!strcmp(driver, \"vfio-pci\"))\n-\t\t\tdev->pt_driver = RTE_PT_VFIO;\n+\t\t\tdev->kdrv = RTE_KDRV_VFIO;\n \t\telse if (!strcmp(driver, \"igb_uio\"))\n-\t\t\tdev->pt_driver = RTE_PT_IGB_UIO;\n+\t\t\tdev->kdrv = RTE_KDRV_IGB_UIO;\n \t\telse if (!strcmp(driver, \"uio_pci_generic\"))\n-\t\t\tdev->pt_driver = RTE_PT_UIO_GENERIC;\n+\t\t\tdev->kdrv = RTE_KDRV_UIO_GENERIC;\n \t\telse\n-\t\t\tdev->pt_driver = RTE_PT_UNKNOWN;\n+\t\t\tdev->kdrv = RTE_KDRV_UNKNOWN;\n \t} else if (ret < 0) {\n \t\tRTE_LOG(ERR, EAL, \"Fail to get kernel driver\\n\");\n \t\tfree(dev);\n \t\treturn -1;\n \t} else\n-\t\tdev->pt_driver = RTE_PT_UNKNOWN;\n+\t\tdev->kdrv = RTE_KDRV_UNKNOWN;\n \n \t/* device is valid, add in list (sorted) */\n \tif (TAILQ_EMPTY(&pci_device_list)) {\n@@ -370,8 +370,7 @@ pci_scan_one(const char *dirname, uint16_t domain, uint8_t bus,\n \t\t\t\tTAILQ_INSERT_BEFORE(dev2, dev, next);\n \t\t\t\treturn 0;\n \t\t\t} else { /* already registered */\n-\t\t\t\t/* update pt_driver */\n-\t\t\t\tdev2->pt_driver = dev->pt_driver;\n+\t\t\t\tdev2->kdrv = dev->kdrv;\n \t\t\t\tdev2->max_vfs = dev->max_vfs;\n \t\t\t\tmemmove(dev2->mem_resource,\n \t\t\t\t\tdev->mem_resource,\n@@ -570,20 +569,20 @@ pci_map_device(struct rte_pci_device *dev)\n \tint ret = -1;\n \n \t/* try mapping the NIC resources using VFIO if it exists */\n-\tswitch (dev->pt_driver) {\n-\tcase RTE_PT_VFIO:\n+\tswitch (dev->kdrv) {\n+\tcase RTE_KDRV_VFIO:\n #ifdef VFIO_PRESENT\n \t\tif (pci_vfio_is_enabled())\n \t\t\tret = pci_vfio_map_resource(dev);\n #endif\n \t\tbreak;\n-\tcase RTE_PT_IGB_UIO:\n-\tcase RTE_PT_UIO_GENERIC:\n+\tcase RTE_KDRV_IGB_UIO:\n+\tcase RTE_KDRV_UIO_GENERIC:\n \t\t/* map resources for devices that use uio */\n \t\tret = pci_uio_map_resource(dev);\n \t\tbreak;\n \tdefault:\n-\t\tRTE_LOG(DEBUG, EAL, \"  Not managed by known pt driver,\"\n+\t\tRTE_LOG(DEBUG, EAL, \"  Not managed by a supported kernel driver,\"\n \t\t\t\" skipped\\n\");\n \t\tret = 1;\n \t\tbreak;\n@@ -600,17 +599,17 @@ pci_unmap_device(struct rte_pci_device *dev)\n \t\treturn;\n \n \t/* try unmapping the NIC resources using VFIO if it exists */\n-\tswitch (dev->pt_driver) {\n-\tcase RTE_PT_VFIO:\n+\tswitch (dev->kdrv) {\n+\tcase RTE_KDRV_VFIO:\n \t\tRTE_LOG(ERR, EAL, \"Hotplug doesn't support vfio yet\\n\");\n \t\tbreak;\n-\tcase RTE_PT_IGB_UIO:\n-\tcase RTE_PT_UIO_GENERIC:\n+\tcase RTE_KDRV_IGB_UIO:\n+\tcase RTE_KDRV_UIO_GENERIC:\n \t\t/* unmap resources for devices that use uio */\n \t\tpci_uio_unmap_resource(dev);\n \t\tbreak;\n \tdefault:\n-\t\tRTE_LOG(DEBUG, EAL, \"  Not managed by known pt driver,\"\n+\t\tRTE_LOG(DEBUG, EAL, \"  Not managed by a supported kernel driver,\"\n \t\t\t\" skipped\\n\");\n \t\tbreak;\n \t}\ndiff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c\nindex 5208bad..e20cca5 100644\n--- a/lib/librte_ether/rte_ethdev.c\n+++ b/lib/librte_ether/rte_ethdev.c\n@@ -512,11 +512,11 @@ rte_eth_dev_is_detachable(uint8_t port_id)\n \t}\n \n \tif (rte_eth_devices[port_id].dev_type == RTE_ETH_DEV_PCI) {\n-\t\tswitch (rte_eth_devices[port_id].pci_dev->pt_driver) {\n-\t\tcase RTE_PT_IGB_UIO:\n-\t\tcase RTE_PT_UIO_GENERIC:\n+\t\tswitch (rte_eth_devices[port_id].pci_dev->kdrv) {\n+\t\tcase RTE_KDRV_IGB_UIO:\n+\t\tcase RTE_KDRV_UIO_GENERIC:\n \t\t\tbreak;\n-\t\tcase RTE_PT_VFIO:\n+\t\tcase RTE_KDRV_VFIO:\n \t\tdefault:\n \t\t\treturn -ENOTSUP;\n \t\t}\n",
    "prefixes": [
        "dpdk-dev"
    ]
}