get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 48324,
    "url": "http://patches.dpdk.org/api/patches/48324/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20181123143620.10480-1-i.maximets@samsung.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": "<20181123143620.10480-1-i.maximets@samsung.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20181123143620.10480-1-i.maximets@samsung.com",
    "date": "2018-11-23T14:36:20",
    "name": "[v2] net/virtio: avoid annoying IOPL call related errors",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "cc90948b88ce472d22bed9f41bca2c4ed7e89c3d",
    "submitter": {
        "id": 323,
        "url": "http://patches.dpdk.org/api/people/323/?format=api",
        "name": "Ilya Maximets",
        "email": "i.maximets@samsung.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20181123143620.10480-1-i.maximets@samsung.com/mbox/",
    "series": [
        {
            "id": 2557,
            "url": "http://patches.dpdk.org/api/series/2557/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=2557",
            "date": "2018-11-23T14:36:20",
            "name": "[v2] net/virtio: avoid annoying IOPL call related errors",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/2557/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/48324/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/48324/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id B7CF01B5A3;\n\tFri, 23 Nov 2018 15:36:30 +0100 (CET)",
            "from mailout2.w1.samsung.com (mailout2.w1.samsung.com\n\t[210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 17AAE1B5A0\n\tfor <dev@dpdk.org>; Fri, 23 Nov 2018 15:36:28 +0100 (CET)",
            "from eucas1p1.samsung.com (unknown [182.198.249.206])\n\tby mailout2.w1.samsung.com (KnoxPortal) with ESMTP id\n\t20181123143627euoutp02da60bed1fb7c4ba73e1df1484af765a7~px5RfUPcw1012410124euoutp02H\n\tfor <dev@dpdk.org>; Fri, 23 Nov 2018 14:36:27 +0000 (GMT)",
            "from eusmges1new.samsung.com (unknown [203.254.199.242]) by\n\teucas1p2.samsung.com (KnoxPortal) with ESMTP id\n\t20181123143626eucas1p276c7b4217f4e27ccadd54875deac1a6e~px5Q49AbJ0936409364eucas1p27;\n\tFri, 23 Nov 2018 14:36:26 +0000 (GMT)",
            "from eucas1p2.samsung.com ( [182.198.249.207]) by\n\teusmges1new.samsung.com (EUCPMTA) with SMTP id F4.90.04441.A6018FB5;\n\tFri, 23 Nov 2018 14:36:26 +0000 (GMT)",
            "from eusmtrp2.samsung.com (unknown [182.198.249.139]) by\n\teucas1p1.samsung.com (KnoxPortal) with ESMTPA id\n\t20181123143625eucas1p1def3421fa13b5aec7204549932c75bb7~px5QIBUne1016810168eucas1p1k;\n\tFri, 23 Nov 2018 14:36:25 +0000 (GMT)",
            "from eusmgms1.samsung.com (unknown [182.198.249.179]) by\n\teusmtrp2.samsung.com (KnoxPortal) with ESMTP id\n\t20181123143625eusmtrp2750316f02ad86a8fde5becaaf5a438c4~px5P3K-5x1488714887eusmtrp2V;\n\tFri, 23 Nov 2018 14:36:25 +0000 (GMT)",
            "from eusmtip1.samsung.com ( [203.254.199.221]) by\n\teusmgms1.samsung.com (EUCPMTA) with SMTP id 57.2F.04284.96018FB5;\n\tFri, 23 Nov 2018 14:36:25 +0000 (GMT)",
            "from imaximets.rnd.samsung.ru (unknown [106.109.129.180]) by\n\teusmtip1.samsung.com (KnoxPortal) with ESMTPA id\n\t20181123143624eusmtip1420ffe4ff2171b22ad61801fe556e004~px5PM5yAv0464204642eusmtip1t;\n\tFri, 23 Nov 2018 14:36:24 +0000 (GMT)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com\n\t20181123143627euoutp02da60bed1fb7c4ba73e1df1484af765a7~px5RfUPcw1012410124euoutp02H",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com;\n\ts=mail20170921; t=1542983787;\n\tbh=n2OLb357xXx4ukPd3zWIjR0k/ZNAvG932sVSpvDSCQw=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=c1NpVrfJotFuJAlhyXC06d5zsS8anMpZ7CWzNHrmA7+JV/xu5dp/jiEo4QtnM5724\n\tA84HcR82GAJZl8x138ezBNd/izi5LNfvQGA+mkPg54dMkFpds8R0vUmZuO9ShFv279\n\tLF9ehMF5TC+fs11WhvFNxdHhaEbk/yOojN+BGaAM=",
        "X-AuditID": "cbfec7f2-5c9ff70000001159-67-5bf8106a19a9",
        "From": "Ilya Maximets <i.maximets@samsung.com>",
        "To": "dev@dpdk.org, David Marchand <david.marchand@6wind.com>",
        "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>, Tiwei Bie\n\t<tiwei.bie@intel.com>, Zhihong Wang <zhihong.wang@intel.com>, Thomas\n\tMonjalon <thomas@monjalon.net>, Ferruh Yigit <ferruh.yigit@intel.com>,\n\tIan Stokes <ian.stokes@intel.com>, Kevin Traynor <ktraynor@redhat.com>,\n\tIlya Maximets <i.maximets@samsung.com>",
        "Date": "Fri, 23 Nov 2018 17:36:20 +0300",
        "Message-Id": "<20181123143620.10480-1-i.maximets@samsung.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20181123141739.11214-1-i.maximets@samsung.com>",
        "X-Brightmail-Tracker": [
            "H4sIAAAAAAAAA+NgFprIKsWRmVeSWpSXmKPExsWy7djP87pZAj+iDZ4/lrVY0dHOYvHu03Ym\n\tizt7T7NbXGn/yW6x8eFZVou1hz6wWxzr3MNi8enBCRaLrQ3/mSw2X5zE5MDlcbH/DqPHrwVL\n\tWT0W73nJ5HHs5jR2j/f7rrJ59G1ZxRjAFsVlk5Kak1mWWqRvl8CV0XP+DHvBJuGKLdv3sjQw\n\tfubvYuTkkBAwkTgwq42pi5GLQ0hgBaPEw/nf2CGcL4wSH47dYoRwPjNKfLv0hBWmZevzSywQ\n\tieWMEg1d/9ggnB+MElNudLOAVLEJ6EicWn2EEcQWEbCWaFq1CKyIWWAfk8Ts9y+ZQRLCAu4S\n\ta+evZQKxWQRUJd4+aWcDsXmBGhb9nMcMsU5eYvWGA2A2p4CNxOaTq8FukhDoZ5fY/qkR6FoO\n\tIMdFYsbiSoh6YYlXx7ewQ9gyEv93zmeCsOsl7re8hOrtYJSYfugfVMJeYsvrc2BzmAU0Jdbv\n\t0ocIO0rMaZsLNZ5P4sZbQZAwM5A5adt0Zogwr0RHmxBEtYrE74PLoS6Wkrj57jPUBR4SX39M\n\th4ZvP6NEa+9i5gmM8rMQli1gZFzFKJ5aWpybnlpsmJdarlecmFtcmpeul5yfu4kRmFBO/zv+\n\taQfj10tJhxgFOBiVeHgNmH9EC7EmlhVX5h5ilOBgVhLhbVL8Hi3Em5JYWZValB9fVJqTWnyI\n\tUZqDRUmct5rhQbSQQHpiSWp2ampBahFMlomDU6qBccaVqzfijtYdODk1ZsmukuccNs937G5Y\n\t49847+1z1SdGzS+mdGRu7q3eu81cxHT1w1zvs0ovjlfV6D7pNWz9ICPDIL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a13b5aec7204549932c75bb7",
        "X-Msg-Generator": "CA",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "X-RootMTR": "20181123143625eucas1p1def3421fa13b5aec7204549932c75bb7",
        "X-EPHeader": "CA",
        "CMS-TYPE": "201P",
        "X-CMS-RootMailID": "20181123143625eucas1p1def3421fa13b5aec7204549932c75bb7",
        "References": "<20181123141739.11214-1-i.maximets@samsung.com>\n\t<CGME20181123143625eucas1p1def3421fa13b5aec7204549932c75bb7@eucas1p1.samsung.com>",
        "Subject": "[dpdk-dev] [PATCH v2] net/virtio: avoid annoying IOPL call related\n\terrors",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "In case of running with not enough capabilities, i.e. running as\nnon-root user any application linked with DPDK prints the message\nabout IOPL call failure even if it was just called like\n'./testpmd --help'. For example, this beaks most of the OVS unit\ntests if it built with DPDK support.\n\nLet's register the virtio driver unconditionally and print error\nmessage while probing the device. Silent iopl() call left in the\nconstructor to have privileges as early as possible as it was before.\n\nSigned-off-by: Ilya Maximets <i.maximets@samsung.com>\n---\n\nVersion 2:\n\t* Fixed possible fd leak on BSD.\n\nWe can avoid test failures in OVS by filtering the output\nlike this:\n  https://patchwork.ozlabs.org/project/openvswitch/list/?series=77706\n\nBut it still looks very inconvenient for me to have this\nmessage in the output of every command for the DPDK linked app.\n\n drivers/net/virtio/virtio_ethdev.c | 11 ++++++-----\n lib/librte_eal/bsdapp/eal/eal.c    |  6 ++++--\n 2 files changed, 10 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c\nindex e1fe36a23..2ba66d291 100644\n--- a/drivers/net/virtio/virtio_ethdev.c\n+++ b/drivers/net/virtio/virtio_ethdev.c\n@@ -1760,6 +1760,11 @@ vdpa_mode_selected(struct rte_devargs *devargs)\n static int eth_virtio_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \tstruct rte_pci_device *pci_dev)\n {\n+\tif (rte_eal_iopl_init() != 0) {\n+\t\tPMD_INIT_LOG(ERR, \"IOPL call failed - cannot use virtio PMD\");\n+\t\treturn 1;\n+\t}\n+\n \t/* virtio pmd skips probe if device needs to work in vdpa mode */\n \tif (vdpa_mode_selected(pci_dev->device.devargs))\n \t\treturn 1;\n@@ -1785,11 +1790,7 @@ static struct rte_pci_driver rte_virtio_pmd = {\n \n RTE_INIT(rte_virtio_pmd_init)\n {\n-\tif (rte_eal_iopl_init() != 0) {\n-\t\tPMD_INIT_LOG(ERR, \"IOPL call failed - cannot use virtio PMD\");\n-\t\treturn;\n-\t}\n-\n+\trte_eal_iopl_init();\n \trte_pci_register(&rte_virtio_pmd);\n }\n \ndiff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c\nindex 508cbc46f..b8152a75c 100644\n--- a/lib/librte_eal/bsdapp/eal/eal.c\n+++ b/lib/librte_eal/bsdapp/eal/eal.c\n@@ -556,9 +556,11 @@ int rte_eal_has_hugepages(void)\n int\n rte_eal_iopl_init(void)\n {\n-\tstatic int fd;\n+\tstatic int fd = -1;\n+\n+\tif (fd < 0)\n+\t\tfd = open(\"/dev/io\", O_RDWR);\n \n-\tfd = open(\"/dev/io\", O_RDWR);\n \tif (fd < 0)\n \t\treturn -1;\n \t/* keep fd open for iopl */\n",
    "prefixes": [
        "v2"
    ]
}