Show a patch.

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

{
    "id": 44463,
    "url": "http://patches.dpdk.org/api/patches/44463/?format=api",
    "web_url": "http://patches.dpdk.org/patch/44463/",
    "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"
    },
    "msgid": "<20180910054547.18494-2-david.marchand@6wind.com>",
    "date": "2018-09-10T05:45:45",
    "name": "[1/3] mbuf: add sanity checks on segment metadata",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "d1a46f46d9f99dc583dcb52cb10a98ac44417a71",
    "submitter": {
        "id": 3,
        "url": "http://patches.dpdk.org/api/people/3/?format=api",
        "name": "David Marchand",
        "email": "david.marchand@6wind.com"
    },
    "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/patch/44463/mbox/",
    "series": [
        {
            "id": 1241,
            "url": "http://patches.dpdk.org/api/series/1241/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1241",
            "date": "2018-09-10T05:45:44",
            "name": "segment sanity checks",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/1241/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/44463/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/44463/checks/",
    "tags": {},
    "headers": {
        "X-Mailer": "git-send-email 2.17.1",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "From": "David Marchand <david.marchand@6wind.com>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=mSgd7H/pbd5sYWV0FWi47cIfDXHrYZ8iz9to1Nv+BIA=;\n\tb=sV5UEziNirezj5zXqBeslIsNI7eWCCq7tPjxxiNfKclfEvYYjLgNRUCU/l/X9cqsLM\n\tVZHxofjrHrwhRQynLjZy3qiszTpAZvYRYAkfDBQdob42Vtiu5FH4uzcopplzyFRk3iFX\n\t5VAedUdY2Q6OiexFD0IAEPEltOaBPrPfLey3LBCrHjPYu7kYUHSVm8GwzaQZ/QnHRG3D\n\tOUh4PIiL5/DALZhYexTZICbmsC48jwVgwU+PY4whSo8hxM247QTAlz9XiqkjD2z+jDCU\n\tKrrSYPmJXYWXhZFm/iewd174JIpQQb4GParOdMcRGELLcG0nKh92GcdTGEV57uUyvPHt\n\t9lOw==",
        "X-Mailman-Version": "2.1.15",
        "Delivered-To": "patchwork@dpdk.org",
        "X-Gm-Message-State": "APzg51A9Bki0Jv1I/hY/x3RmLJhZL1QB8/HZ6zyAltP30Bk+apcmWpDX\n\tUxbMREer68E9LzP2HCauRQy49LS43LE=",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Cc": "olivier.matz@6wind.com, wenzhuo.lu@intel.com, jingjing.wu@intel.com,\n\tbernard.iremonger@intel.com",
        "To": "dev@dpdk.org",
        "Errors-To": "dev-bounces@dpdk.org",
        "References": "<20180910054547.18494-1-david.marchand@6wind.com>",
        "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:in-reply-to\n\t:references;\n\tbh=mSgd7H/pbd5sYWV0FWi47cIfDXHrYZ8iz9to1Nv+BIA=;\n\tb=b53ZI5z1XIso2VINhccKPfV9lSnlAklCPi/zN3Md1eOa8imdCnxgC3VyUh4ck+dish\n\t2dLUiEGTX6d2Fl2VIZaJtfxK5HNHZS8eNcYW4nL93UBnmaw9oSAEALHhekv4MLSMUCXJ\n\tPlydF/+YHhsgGyCQ5cpqHgpGfYcSiWh26OxK2sSNcwkeO63FQv/I/hGbdLtxZmthtflg\n\tv0i06YjGRacGoBlY/uIk0rjBYKSvORXsiUbfSv8Qsf0OEUUx0zSjfHR+NH0Qa3rmClFI\n\tB41FfZLc7RYSVwvHRLYsw9J2wy4SyxyyRkyd8akrg0mWFrtZs02kU1KPuMArBW3HxRtQ\n\t8qvw==",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 490E74C93;\n\tMon, 10 Sep 2018 07:45:57 +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 BAD114C91\n\tfor <dev@dpdk.org>; Mon, 10 Sep 2018 07:45:55 +0200 (CEST)",
            "by mail-wm0-f67.google.com with SMTP id s12-v6so20149498wmc.0\n\tfor <dev@dpdk.org>; Sun, 09 Sep 2018 22:45:55 -0700 (PDT)",
            "from 6wind.com ([109.190.253.16]) by smtp.gmail.com with ESMTPSA id\n\tt4-v6sm14667473wrb.45.2018.09.09.22.45.53\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSun, 09 Sep 2018 22:45:54 -0700 (PDT)"
        ],
        "Date": "Mon, 10 Sep 2018 07:45:45 +0200",
        "X-Received": "by 2002:a1c:9c56:: with SMTP id\n\tf83-v6mr10969197wme.135.1536558355115; \n\tSun, 09 Sep 2018 22:45:55 -0700 (PDT)",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "Subject": "[dpdk-dev] [PATCH 1/3] mbuf: add sanity checks on segment metadata",
        "In-Reply-To": "<20180910054547.18494-1-david.marchand@6wind.com>",
        "Message-Id": "<20180910054547.18494-2-david.marchand@6wind.com>",
        "Precedence": "list",
        "X-BeenThere": "dev@dpdk.org",
        "X-Original-To": "patchwork@dpdk.org",
        "X-Google-Smtp-Source": "ANB0VdZEtLilQTVGOvN+BJFqfPOvJ2oloMl3+/Sk9OWLnRKEHWTHCDE5gwNj8QcvnOxBcgqetU5axA=="
    },
    "content": "Add some basic checks on the segments offset and length metadata:\nalways funny to have a < 0 tailroom cast to uint16_t ;-).\n\nSigned-off-by: David Marchand <david.marchand@6wind.com>\n---\n lib/librte_mbuf/rte_mbuf.c | 5 +++++\n 1 file changed, 5 insertions(+)",
    "diff": "diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c\nindex e714c5a59..137a320ed 100644\n--- a/lib/librte_mbuf/rte_mbuf.c\n+++ b/lib/librte_mbuf/rte_mbuf.c\n@@ -200,6 +200,11 @@ rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header)\n \tpkt_len = m->pkt_len;\n \n \tdo {\n+\t\tif (m->data_off > m->buf_len)\n+\t\t\trte_panic(\"data offset too big in mbuf segment\\n\");\n+\t\tif ((uint32_t)m->data_off + (uint32_t)m->data_len >\n+\t\t\t\t(uint32_t)m->buf_len)\n+\t\t\trte_panic(\"data length too big in mbuf segment\\n\");\n \t\tnb_segs -= 1;\n \t\tpkt_len -= m->data_len;\n \t} while ((m = m->next) != NULL);\n",
    "prefixes": [
        "1/3"
    ]
}