get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 43708,
    "url": "http://patches.dpdk.org/api/patches/43708/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180814143035.19640-1-bluca@debian.org/",
    "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": "<20180814143035.19640-1-bluca@debian.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180814143035.19640-1-bluca@debian.org",
    "date": "2018-08-14T14:30:34",
    "name": "[1/2] bus/pci: harmonize and document rte_pci_read_config return value",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "a814cec863ac513ce87a35e9cfdc257a02674d5b",
    "submitter": {
        "id": 823,
        "url": "http://patches.dpdk.org/api/people/823/?format=api",
        "name": "Luca Boccassi",
        "email": "bluca@debian.org"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180814143035.19640-1-bluca@debian.org/mbox/",
    "series": [
        {
            "id": 980,
            "url": "http://patches.dpdk.org/api/series/980/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=980",
            "date": "2018-08-14T14:30:34",
            "name": "[1/2] bus/pci: harmonize and document rte_pci_read_config return value",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/980/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/43708/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/43708/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 33E324CB3;\n\tTue, 14 Aug 2018 16:30:51 +0200 (CEST)",
            "from mail-wm0-f67.google.com (mail-wm0-f67.google.com\n\t[74.125.82.67]) by dpdk.org (Postfix) with ESMTP id 73EA64C99\n\tfor <dev@dpdk.org>; Tue, 14 Aug 2018 16:30:50 +0200 (CEST)",
            "by mail-wm0-f67.google.com with SMTP id l2-v6so10627196wme.1\n\tfor <dev@dpdk.org>; Tue, 14 Aug 2018 07:30:50 -0700 (PDT)",
            "from localhost ([2001:1be0:110d:fcfe:41aa:5bfa:6cf3:7531])\n\tby smtp.gmail.com with ESMTPSA id\n\tz141-v6sm13937088wmc.3.2018.08.14.07.30.48\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tTue, 14 Aug 2018 07:30:48 -0700 (PDT)"
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=8jA1rguQNQsWxOIHsHF/vAjDwGqJikL8hM7ycAKTsa4=;\n\tb=JwevxhoWeZmiiYGMdyvj6aWLvLDjz6mZ2h1j+lmawdcC5xBm1vARQGxeeEUSYnCIV0\n\tpK+iA0jzPmFCxqmOBlBiIhlxLDuoKW/JsgnyRT3MH3HXHrAQKPRlrJ3d7DTeGYM4s9CF\n\t1tRidScOytyfUF2cMceUTgUO1Ak1zHuqUI9RktrQAzRgWwQYh3N9iEfa8Mxs8WIrdB1H\n\tN6hMMita8kiW/Kce2UglEYX5neBBwrlahpLKn3gZZC7zvpYZe9rF8sTxFey/3D7H2MTH\n\tTtuOtpn+BEbNev88QekONRxBD75vxw/ldFxV63PbRtYtQBMpBXWUj8K97LxRKkdYLiR8\n\tBVeA==",
        "X-Gm-Message-State": "AOUpUlGNDx9CVUwpQSH2ix0bivdkY99oSWTOXybyIEHpbWf19gCWCJsl\n\tgw1VxdNIpUpCUPHqxI7dIOkT2Omw",
        "X-Google-Smtp-Source": "AA+uWPwRRxP2YOXyJRHdCdX9SWecp8y0ZemMEjJkfgHOUmaNOCV3VsEgeLvcz0AeaJg9mB3Oe0DKyg==",
        "X-Received": "by 2002:a1c:8291:: with SMTP id\n\te139-v6mr11886623wmd.39.1534257049770; \n\tTue, 14 Aug 2018 07:30:49 -0700 (PDT)",
        "From": "Luca Boccassi <bluca@debian.org>",
        "To": "dev@dpdk.org",
        "Cc": "maxime.coquelin@redhat.com, zhihong.wang@intel.com, tiwei.bie@intel.com, \n\tbruce.richardson@intel.com, Luca Boccassi <bluca@debian.org>",
        "Date": "Tue, 14 Aug 2018 15:30:34 +0100",
        "Message-Id": "<20180814143035.19640-1-bluca@debian.org>",
        "X-Mailer": "git-send-email 2.18.0",
        "Subject": "[dpdk-dev] [PATCH 1/2] bus/pci: harmonize and document\n\trte_pci_read_config return value",
        "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": "On Linux, rte_pci_read_config on success returns the number of read\nbytes, but on BSD it returns 0.\nDocument the return values, and have BSD behave as Linux does.\n\nAt least one case (bnx2x PMD) treats 0 as an error, so the change\nmakes sense also for that.\n\nSigned-off-by: Luca Boccassi <bluca@debian.org>\n---\n drivers/bus/pci/bsd/pci.c     | 4 +++-\n drivers/bus/pci/rte_bus_pci.h | 2 ++\n 2 files changed, 5 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/bus/pci/bsd/pci.c b/drivers/bus/pci/bsd/pci.c\nindex 655b34b7e4..175d83cf1b 100644\n--- a/drivers/bus/pci/bsd/pci.c\n+++ b/drivers/bus/pci/bsd/pci.c\n@@ -439,6 +439,8 @@ int rte_pci_read_config(const struct rte_pci_device *dev,\n {\n \tint fd = -1;\n \tint size;\n+\t/* Copy Linux implementation's behaviour */\n+\tconst int return_len = len;\n \tstruct pci_io pi = {\n \t\t.pi_sel = {\n \t\t\t.pc_domain = dev->addr.domain,\n@@ -469,7 +471,7 @@ int rte_pci_read_config(const struct rte_pci_device *dev,\n \t}\n \tclose(fd);\n \n-\treturn 0;\n+\treturn return_len;\n \n  error:\n \tif (fd >= 0)\ndiff --git a/drivers/bus/pci/rte_bus_pci.h b/drivers/bus/pci/rte_bus_pci.h\nindex 0d1955ffe0..df8f64798d 100644\n--- a/drivers/bus/pci/rte_bus_pci.h\n+++ b/drivers/bus/pci/rte_bus_pci.h\n@@ -219,6 +219,8 @@ void rte_pci_unregister(struct rte_pci_driver *driver);\n  *   The length of the data buffer.\n  * @param offset\n  *   The offset into PCI config space\n+ * @return\n+ *  Number of bytes read on success, negative on error.\n  */\n int rte_pci_read_config(const struct rte_pci_device *device,\n \t\tvoid *buf, size_t len, off_t offset);\n",
    "prefixes": [
        "1/2"
    ]
}