get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 26863,
    "url": "http://patches.dpdk.org/api/patches/26863/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20170712182812.18404-1-thomas@monjalon.net/",
    "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": "<20170712182812.18404-1-thomas@monjalon.net>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20170712182812.18404-1-thomas@monjalon.net",
    "date": "2017-07-12T18:28:12",
    "name": "[dpdk-dev] net/failsafe: do not probe device if plugged out",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": true,
    "hash": "c42df3738142acf7495dae81782553d63fe5f794",
    "submitter": {
        "id": 685,
        "url": "http://patches.dpdk.org/api/people/685/?format=api",
        "name": "Thomas Monjalon",
        "email": "thomas@monjalon.net"
    },
    "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/20170712182812.18404-1-thomas@monjalon.net/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/26863/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/26863/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 E23D52E8B;\n\tWed, 12 Jul 2017 20:28:23 +0200 (CEST)",
            "from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com\n\t[66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 760B32E83\n\tfor <dev@dpdk.org>; Wed, 12 Jul 2017 20:28:22 +0200 (CEST)",
            "from compute1.internal (compute1.nyi.internal [10.202.2.41])\n\tby mailout.nyi.internal (Postfix) with ESMTP id 2B13A20B90;\n\tWed, 12 Jul 2017 14:28:22 -0400 (EDT)",
            "from frontend1 ([10.202.2.160])\n\tby compute1.internal (MEProxy); Wed, 12 Jul 2017 14:28:22 -0400",
            "from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184])\n\tby mail.messagingengine.com (Postfix) with ESMTPA id 8A1907E21B;\n\tWed, 12 Jul 2017 14:28:21 -0400 (EDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=\n\tcc:date:from:message-id:subject:to:x-me-sender:x-me-sender\n\t:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=N23JYRs7UwnQJ7PdvpMcJRBv6Hz\n\tJNiVv7UmRGHG7nW0=; b=V6cK9v0AmdApkDe0TMvwyVHyQEEut4Akd3zd+bRAIa+\n\tVo6AgIkT21NMemVtem4InPNUdwu8cWTPUG4QsGnntWADNVG+mWLDVdPzaD/3zQYF\n\tmMx7c7yI4HIUcvgUl45NImtSQDAbuQQ9zisBiFVYFEhfe31N3YJ2Hml7BTtZCIuY\n\t=",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n\tmessagingengine.com; h=cc:date:from:message-id:subject:to\n\t:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=N23JYR\n\ts7UwnQJ7PdvpMcJRBv6HzJNiVv7UmRGHG7nW0=; b=PeunzQdwb18ArDaKQ4F/jF\n\tSyh5FTpasZNRSLi6AvIJ/+uZYPhBYTWoWmVJ7YprD7g/c/6BPrDZ0sCrrDoxRgpl\n\tmsQcO+nKP/PJO4TmKDZFVzZM/+sI0OTMbw5z044vdo8isfcNyQxz4XAIsH0phe1K\n\tV9Xbm25jaC8aiqpGdO5BWfJaWy99H1ZgNcYlhfzxNnOKvZfn3pp2dWeImvyjRGB+\n\tEQ82ckGVAXVzE6YJwOExG94+Gs9A4RtjLgwPhp4h1Oh7yl1UIYVoWB3mcnAoU5Mn\n\tl1/IoZDVGGpLM0GQBkMpNKvgAyUMXOoHJUy4kF5kQaTH5+iugtm9hVKDAxGDKXnQ\n\t=="
        ],
        "X-ME-Sender": "<xms:RmpmWVDfyuLvqAVypW7_ZgykkLKNj_DL1uK39wl3ZuboCG9CBSOg3g>",
        "X-Sasl-enc": "DXtNLt9iEQqSLi56AdXhTzBj4j8bu4hvHAtvYAPFkND5 1499884101",
        "From": "Thomas Monjalon <thomas@monjalon.net>",
        "To": "gaetan.rivet@6wind.com",
        "Cc": "dev@dpdk.org",
        "Date": "Wed, 12 Jul 2017 20:28:12 +0200",
        "Message-Id": "<20170712182812.18404-1-thomas@monjalon.net>",
        "X-Mailer": "git-send-email 2.13.2",
        "Subject": "[dpdk-dev] [PATCH] net/failsafe: do not probe device if plugged out",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <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": "When probing a sub-devices which does not exist in the system,\nsome errors are logged:\n\tEAL: Cannot find unplugged device (0002:00:02.0)\n\tPMD: net_failsafe: ERROR: sub_device 0 probe failed\n\nIt is normal to have these errors when initializing the failsafe\ndevice and its sub-devices.\nBut we do not need to log them at each probe.\nAnd it is even less relevant if the sub-device has been plugged out.\n\nThe unavailable devices are skipped after the first probe, considering\ntwo exceptions:\n- The vdevs are always probed because they do not really exist on the\nvirtual bus before probing them.\n- The sub-device list given by an executed command line may change\nfrom one call to the next one, therefore it is considered to be always\nthe first one. Anyway, such external command should check the\ndevice availability before passing it to the failsafe PMD.\n\nSigned-off-by: Thomas Monjalon <thomas@monjalon.net>\n---\nThis patch is on top of the failsafe series which is\npending for integration in 17.08-rc2.\n---\n drivers/net/failsafe/failsafe_eal.c | 21 +++++++++++++++++++++\n 1 file changed, 21 insertions(+)",
    "diff": "diff --git a/drivers/net/failsafe/failsafe_eal.c b/drivers/net/failsafe/failsafe_eal.c\nindex 3321dda71..5181066ed 100644\n--- a/drivers/net/failsafe/failsafe_eal.c\n+++ b/drivers/net/failsafe/failsafe_eal.c\n@@ -49,6 +49,11 @@ fs_find_ethdev(const struct rte_device *dev)\n \treturn NULL;\n }\n \n+static int cmp_dev_name(const struct rte_device *dev, const void *name)\n+{\n+\treturn strcmp(dev->name, name);\n+}\n+\n static int\n fs_bus_init(struct rte_eth_dev *dev)\n {\n@@ -56,12 +61,24 @@ fs_bus_init(struct rte_eth_dev *dev)\n \tstruct rte_device *rdev;\n \tstruct rte_devargs *da;\n \tuint8_t i;\n+\tstatic int first_init = 1;\n \tint ret;\n \n \tFOREACH_SUBDEV(sdev, i, dev) {\n \t\tif (sdev->state != DEV_PARSED)\n \t\t\tcontinue;\n \t\tda = &sdev->devargs;\n+\n+\t\t/* skip plugged out devices */\n+\t\tif (! first_init\n+\t\t\t\t&& sdev->cmdline == NULL\n+\t\t\t\t&& strcmp(da->bus->name, \"vdev\") != 0) {\n+\t\t\tda->bus->scan();\n+\t\t\tif (bus->find_device(NULL, cmp_dev_name, da->name) == NULL)\n+\t\t\t\tcontinue; /* device not found */\n+\t\t}\n+\n+\t\t/* probe device */\n \t\trdev = rte_eal_hotplug_add(da->bus->name,\n \t\t\t\t\t   da->name,\n \t\t\t\t\t   da->args);\n@@ -84,6 +101,10 @@ fs_bus_init(struct rte_eth_dev *dev)\n \t\tETH(sdev)->state = RTE_ETH_DEV_DEFERRED;\n \t\tsdev->state = DEV_PROBED;\n \t}\n+\n+\tif (first_init)\n+\t\tfirst_init = 0;\n+\n \treturn 0;\n }\n \n",
    "prefixes": [
        "dpdk-dev"
    ]
}