get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 66491,
    "url": "http://patches.dpdk.org/api/patches/66491/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1583828479-204084-3-git-send-email-suanmingm@mellanox.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": "<1583828479-204084-3-git-send-email-suanmingm@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1583828479-204084-3-git-send-email-suanmingm@mellanox.com",
    "date": "2020-03-10T08:21:19",
    "name": "[2/2] test/bitmap: add bitmap create with all bits set case",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "c180eda6507f0ccf8e7a9ffed9bea035a7326f9f",
    "submitter": {
        "id": 1358,
        "url": "http://patches.dpdk.org/api/people/1358/?format=api",
        "name": "Suanming Mou",
        "email": "suanmingm@mellanox.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/1583828479-204084-3-git-send-email-suanmingm@mellanox.com/mbox/",
    "series": [
        {
            "id": 8861,
            "url": "http://patches.dpdk.org/api/series/8861/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8861",
            "date": "2020-03-10T08:21:17",
            "name": "bitmap: add create bitmap with all bits set",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/8861/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/66491/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/66491/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 7ADA9A0563;\n\tTue, 10 Mar 2020 09:21:42 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 614E11C02C;\n\tTue, 10 Mar 2020 09:21:29 +0100 (CET)",
            "from git-send-mailer.rdmz.labs.mlnx (unknown [37.142.13.130])\n by dpdk.org (Postfix) with ESMTP id 4B9CD1C014\n for <dev@dpdk.org>; Tue, 10 Mar 2020 09:21:26 +0100 (CET)"
        ],
        "From": "Suanming Mou <suanmingm@mellanox.com>",
        "To": "cristian.dumitrescu@intel.com",
        "Cc": "dev@dpdk.org",
        "Date": "Tue, 10 Mar 2020 16:21:19 +0800",
        "Message-Id": "<1583828479-204084-3-git-send-email-suanmingm@mellanox.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1583828479-204084-1-git-send-email-suanmingm@mellanox.com>",
        "References": "<1583828479-204084-1-git-send-email-suanmingm@mellanox.com>",
        "Subject": "[dpdk-dev] [PATCH 2/2] test/bitmap: add bitmap create with all bits\n\tset case",
        "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 <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Add the case to verify bitmap create with all bits set works\ncorrectly.\n\nSigned-off-by: Suanming Mou <suanmingm@mellanox.com>\n---\n app/test/test_bitmap.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++++-\n 1 file changed, 56 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/app/test/test_bitmap.c b/app/test/test_bitmap.c\nindex 95c5184..a8204d3 100644\n--- a/app/test/test_bitmap.c\n+++ b/app/test/test_bitmap.c\n@@ -146,7 +146,7 @@\n }\n \n static int\n-test_bitmap(void)\n+test_bitmap_all_clear(void)\n {\n \tvoid *mem;\n \tuint32_t bmp_size;\n@@ -182,4 +182,59 @@\n \treturn TEST_SUCCESS;\n }\n \n+static int\n+test_bitmap_all_set(void)\n+{\n+\tvoid *mem;\n+\tuint32_t i;\n+\tuint64_t slab;\n+\tuint32_t pos;\n+\tuint32_t bmp_size;\n+\tstruct rte_bitmap *bmp;\n+\n+\tbmp_size =\n+\t\trte_bitmap_get_memory_footprint(MAX_BITS);\n+\n+\tmem = rte_zmalloc(\"test_bmap\", bmp_size, RTE_CACHE_LINE_SIZE);\n+\tif (mem == NULL) {\n+\t\tprintf(\"Failed to allocate memory for bitmap\\n\");\n+\t\treturn TEST_FAILED;\n+\t}\n+\n+\tbmp = rte_bitmap_init_with_all_set(MAX_BITS, mem, bmp_size);\n+\tif (bmp == NULL) {\n+\t\tprintf(\"Failed to init bitmap\\n\");\n+\t\treturn TEST_FAILED;\n+\t}\n+\n+\tfor (i = 0; i < MAX_BITS; i++) {\n+\t\tpos = slab = 0;\n+\t\tif (!rte_bitmap_scan(bmp, &pos, &slab)) {\n+\t\t\tprintf(\"Failed with init bitmap.\\n\");\n+\t\t\treturn TEST_FAILED;\n+\t\t}\n+\t\tpos += (slab ? __builtin_ctzll(slab) : 0);\n+\t\trte_bitmap_clear(bmp, pos);\n+\t}\n+\n+\tif (rte_bitmap_scan(bmp, &pos, &slab)) {\n+\t\tprintf(\"Too much bits set.\\n\");\n+\t\treturn TEST_FAILED;\n+\t}\n+\n+\trte_bitmap_free(bmp);\n+\trte_free(mem);\n+\n+\treturn TEST_SUCCESS;\n+\n+}\n+\n+static int\n+test_bitmap(void)\n+{\n+\tif (test_bitmap_all_clear() != TEST_SUCCESS)\n+\t\treturn TEST_FAILED;\n+\treturn test_bitmap_all_set();\n+}\n+\n REGISTER_TEST_COMMAND(bitmap_test, test_bitmap);\n",
    "prefixes": [
        "2/2"
    ]
}