get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 17229,
    "url": "https://patches.dpdk.org/api/patches/17229/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1479977798-13417-2-git-send-email-olivier.matz@6wind.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<1479977798-13417-2-git-send-email-olivier.matz@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1479977798-13417-2-git-send-email-olivier.matz@6wind.com",
    "date": "2016-11-24T08:56:34",
    "name": "[dpdk-dev,1/5] mbuf: remove const attribute in mbuf read function",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": true,
    "hash": "9c2bd2ebec5dd84e1c0d52d6e083ba66c1a59f0c",
    "submitter": {
        "id": 8,
        "url": "https://patches.dpdk.org/api/people/8/?format=api",
        "name": "Olivier Matz",
        "email": "olivier.matz@6wind.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1479977798-13417-2-git-send-email-olivier.matz@6wind.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/17229/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/17229/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 53B9F5687;\n\tThu, 24 Nov 2016 09:58:01 +0100 (CET)",
            "from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com\n\t[62.23.145.76]) by dpdk.org (Postfix) with ESMTP id 9E96A5587\n\tfor <dev@dpdk.org>; Thu, 24 Nov 2016 09:57:01 +0100 (CET)",
            "from glumotte.dev.6wind.com (unknown [10.16.0.195])\n\tby proxy.6wind.com (Postfix) with ESMTP id 5DB6526A72;\n\tThu, 24 Nov 2016 09:56:52 +0100 (CET)"
        ],
        "From": "Olivier Matz <olivier.matz@6wind.com>",
        "To": "dev@dpdk.org,\n\tyuanhan.liu@linux.intel.com",
        "Cc": "maxime.coquelin@redhat.com, huawei.xie@intel.com,\n\tstephen@networkplumber.org",
        "Date": "Thu, 24 Nov 2016 09:56:34 +0100",
        "Message-Id": "<1479977798-13417-2-git-send-email-olivier.matz@6wind.com>",
        "X-Mailer": "git-send-email 2.8.1",
        "In-Reply-To": "<1479977798-13417-1-git-send-email-olivier.matz@6wind.com>",
        "References": "<1479977798-13417-1-git-send-email-olivier.matz@6wind.com>",
        "Subject": "[dpdk-dev] [PATCH 1/5] mbuf: remove const attribute in mbuf read\n\tfunction",
        "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": "There is no good reason to have this const attribute: rte_pktmbuf_read()\nreturns a pointer which is either in a private buffer, or in the mbuf.\n\nIn the first case, it is clearly not const. In the second case, it is up\nto the user to check that the mbuf is not shared and that data can be\nmodified.\n\nSigned-off-by: Olivier Matz <olivier.matz@6wind.com>\n---\n lib/librte_mbuf/rte_mbuf.c | 2 +-\n lib/librte_mbuf/rte_mbuf.h | 4 ++--\n 2 files changed, 3 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c\nindex 63f43c8..b31958e 100644\n--- a/lib/librte_mbuf/rte_mbuf.c\n+++ b/lib/librte_mbuf/rte_mbuf.c\n@@ -265,7 +265,7 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len)\n }\n \n /* read len data bytes in a mbuf at specified offset (internal) */\n-const void *__rte_pktmbuf_read(const struct rte_mbuf *m, uint32_t off,\n+void *__rte_pktmbuf_read(const struct rte_mbuf *m, uint32_t off,\n \tuint32_t len, void *buf)\n {\n \tconst struct rte_mbuf *seg = m;\ndiff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h\nindex ead7c6e..14956f6 100644\n--- a/lib/librte_mbuf/rte_mbuf.h\n+++ b/lib/librte_mbuf/rte_mbuf.h\n@@ -1576,7 +1576,7 @@ static inline int rte_pktmbuf_is_contiguous(const struct rte_mbuf *m)\n /**\n  * @internal used by rte_pktmbuf_read().\n  */\n-const void *__rte_pktmbuf_read(const struct rte_mbuf *m, uint32_t off,\n+void *__rte_pktmbuf_read(const struct rte_mbuf *m, uint32_t off,\n \tuint32_t len, void *buf);\n \n /**\n@@ -1599,7 +1599,7 @@ const void *__rte_pktmbuf_read(const struct rte_mbuf *m, uint32_t off,\n  *   The pointer to the data, either in the mbuf if it is contiguous,\n  *   or in the user buffer. If mbuf is too small, NULL is returned.\n  */\n-static inline const void *rte_pktmbuf_read(const struct rte_mbuf *m,\n+static inline void *rte_pktmbuf_read(const struct rte_mbuf *m,\n \tuint32_t off, uint32_t len, void *buf)\n {\n \tif (likely(off + len <= rte_pktmbuf_data_len(m)))\n",
    "prefixes": [
        "dpdk-dev",
        "1/5"
    ]
}