get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 12939,
    "url": "http://patches.dpdk.org/api/patches/12939/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1464005996-9463-1-git-send-email-piotrx.t.azarewicz@intel.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": "<1464005996-9463-1-git-send-email-piotrx.t.azarewicz@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1464005996-9463-1-git-send-email-piotrx.t.azarewicz@intel.com",
    "date": "2016-05-23T12:19:56",
    "name": "[dpdk-dev,v1,1/1] examples/quota_watermark: fix low_watermark variable placement",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "d9e6af33fc299ed0c040175d8204df7e972d2e10",
    "submitter": {
        "id": 273,
        "url": "http://patches.dpdk.org/api/people/273/?format=api",
        "name": "Piotr Azarewicz",
        "email": "piotrx.t.azarewicz@intel.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/project/dpdk/patch/1464005996-9463-1-git-send-email-piotrx.t.azarewicz@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/12939/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/12939/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 06D845937;\n\tMon, 23 May 2016 14:18:53 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 5662E591F\n\tfor <dev@dpdk.org>; Mon, 23 May 2016 14:18:51 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga101.jf.intel.com with ESMTP; 23 May 2016 05:18:50 -0700",
            "from gklab-246-018.igk.intel.com (HELO stargo) ([10.217.246.18])\n\tby fmsmga001.fm.intel.com with SMTP; 23 May 2016 05:18:48 -0700",
            "by stargo (sSMTP sendmail emulation);\n\tMon, 23 May 2016 14:20:03 +0200"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.26,355,1459839600\"; d=\"scan'208\";a=\"972660151\"",
        "From": "Piotr Azarewicz <piotrx.t.azarewicz@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Piotr Azarewicz <piotrx.t.azarewicz@intel.com>",
        "Date": "Mon, 23 May 2016 14:19:56 +0200",
        "Message-Id": "<1464005996-9463-1-git-send-email-piotrx.t.azarewicz@intel.com>",
        "X-Mailer": "git-send-email 1.9.1",
        "Subject": "[dpdk-dev] [PATCH v1 1/1] examples/quota_watermark: fix\n\tlow_watermark variable placement",
        "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": "qw app at its init stage reserve 2*sizeof(int) memory space for quota\nand low_watermark shared variables, but both apps (qw and qwctl) assign\nwrong address for low_watermark pointer (out of reserved memzone space)\ndue to wrong pointer arithmetic.\n\nCID 30709 : Extra sizeof expression (SIZEOF_MISMATCH)\nsuspicious_pointer_arithmetic: Adding 4UL /* sizeof (int) */ to pointer\n(unsigned int *)(*qw_memzone).addr of type unsigned int * is suspicious\nbecause adding an integral value to this pointer automatically scales\nthat value by the size, 4 bytes, of the pointed-to type, unsigned int.\nMost likely, sizeof (int) is extraneous and should be replaced with 1.\n\nCoverity issue: 30709\nFixes: 1d6c3ee3321a (\"examples/quota_watermark: initial import\")\n\nSigned-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>\n---\n examples/quota_watermark/qw/init.c     |    2 +-\n examples/quota_watermark/qwctl/qwctl.c |    2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/examples/quota_watermark/qw/init.c b/examples/quota_watermark/qw/init.c\nindex afc1366..c208721 100644\n--- a/examples/quota_watermark/qw/init.c\n+++ b/examples/quota_watermark/qw/init.c\n@@ -170,5 +170,5 @@ setup_shared_variables(void)\n         rte_exit(EXIT_FAILURE, \"%s\\n\", rte_strerror(rte_errno));\n \n     quota = qw_memzone->addr;\n-    low_watermark = (unsigned int *) qw_memzone->addr + sizeof(int);\n+    low_watermark = (unsigned int *) qw_memzone->addr + 1;\n }\ndiff --git a/examples/quota_watermark/qwctl/qwctl.c b/examples/quota_watermark/qwctl/qwctl.c\nindex eb2f618..4961089 100644\n--- a/examples/quota_watermark/qwctl/qwctl.c\n+++ b/examples/quota_watermark/qwctl/qwctl.c\n@@ -68,7 +68,7 @@ setup_shared_variables(void)\n         rte_exit(EXIT_FAILURE, \"Couldn't find memzone\\n\");\n \n     quota = qw_memzone->addr;\n-    low_watermark = (unsigned int *) qw_memzone->addr + sizeof(int);\n+    low_watermark = (unsigned int *) qw_memzone->addr + 1;\n }\n \n int main(int argc, char **argv)\n",
    "prefixes": [
        "dpdk-dev",
        "v1",
        "1/1"
    ]
}