get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2333,
    "url": "https://patches.dpdk.org/api/patches/2333/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1421421030-22261-1-git-send-email-declan.doherty@intel.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": "<1421421030-22261-1-git-send-email-declan.doherty@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1421421030-22261-1-git-send-email-declan.doherty@intel.com",
    "date": "2015-01-16T15:10:30",
    "name": "[dpdk-dev] eal / malloc : alignment parameter check failing due to changes in rte_is_power_of_2",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "bee3ce346b5f1fc7f651fd342469dcfe2a71f62f",
    "submitter": {
        "id": 11,
        "url": "https://patches.dpdk.org/api/people/11/?format=api",
        "name": "Doherty, Declan",
        "email": "declan.doherty@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1421421030-22261-1-git-send-email-declan.doherty@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/2333/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/2333/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 157045A9D;\n\tFri, 16 Jan 2015 16:10:42 +0100 (CET)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 74CFC5A95\n\tfor <dev@dpdk.org>; Fri, 16 Jan 2015 16:10:40 +0100 (CET)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga101.jf.intel.com with ESMTP; 16 Jan 2015 07:10:39 -0800",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby orsmga001.jf.intel.com with ESMTP; 16 Jan 2015 07:10:38 -0800",
            "from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com\n\t[10.237.217.46])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tt0GFAbuF029565; Fri, 16 Jan 2015 15:10:37 GMT",
            "from sivswdev02.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev02.ir.intel.com with ESMTP id t0GFAbw1022842;\n\tFri, 16 Jan 2015 15:10:37 GMT",
            "(from dwdohert@localhost)\n\tby sivswdev02.ir.intel.com with  id t0GFAaTu022838;\n\tFri, 16 Jan 2015 15:10:36 GMT"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.09,411,1418112000\"; d=\"scan'208\";a=\"638363240\"",
        "From": "Declan Doherty <declan.doherty@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Fri, 16 Jan 2015 15:10:30 +0000",
        "Message-Id": "<1421421030-22261-1-git-send-email-declan.doherty@intel.com>",
        "X-Mailer": "git-send-email 1.7.12.2",
        "Subject": "[dpdk-dev] [PATCH] eal / malloc : alignment parameter check failing\n\tdue to changes in rte_is_power_of_2",
        "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": "In commit 2fc8d6d the behaviour of function rte_is_power_of_2 was\nchanged to not return true for 0. memzone_reserve_aligned_thread_unsafe\nand rte_malloc_socket both make the assumption that for align = 0\n!rte_is_power_of_2(align) will return false. This patch adds a check\nthat align parameter is non-zero before doing the power of 2 check\n\nSigned-off-by: Declan Doherty <declan.doherty@intel.com>\n---\n lib/librte_eal/common/eal_common_memzone.c | 2 +-\n lib/librte_malloc/rte_malloc.c             | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_memzone.c b/lib/librte_eal/common/eal_common_memzone.c\nindex b5a5d72..3f09338 100644\n--- a/lib/librte_eal/common/eal_common_memzone.c\n+++ b/lib/librte_eal/common/eal_common_memzone.c\n@@ -156,7 +156,7 @@ memzone_reserve_aligned_thread_unsafe(const char *name, size_t len,\n \t}\n \n \t/* if alignment is not a power of two */\n-\tif (!rte_is_power_of_2(align)) {\n+\tif (align ? !rte_is_power_of_2(align) : 0) {\n \t\tRTE_LOG(ERR, EAL, \"%s(): Invalid alignment: %u\\n\", __func__,\n \t\t\t\talign);\n \t\trte_errno = EINVAL;\ndiff --git a/lib/librte_malloc/rte_malloc.c b/lib/librte_malloc/rte_malloc.c\nindex b966fc7..15c7e20 100644\n--- a/lib/librte_malloc/rte_malloc.c\n+++ b/lib/librte_malloc/rte_malloc.c\n@@ -75,7 +75,7 @@ rte_malloc_socket(const char *type, size_t size, unsigned align, int socket_arg)\n \tvoid *ret;\n \n \t/* return NULL if size is 0 or alignment is not power-of-2 */\n-\tif (size == 0 || !rte_is_power_of_2(align))\n+\tif (size == 0 || align ? !rte_is_power_of_2(align) : 0)\n \t\treturn NULL;\n \n \tif (socket_arg == SOCKET_ID_ANY)\n",
    "prefixes": [
        "dpdk-dev"
    ]
}