get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 66490,
    "url": "http://patches.dpdk.org/api/patches/66490/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1583828479-204084-2-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-2-git-send-email-suanmingm@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1583828479-204084-2-git-send-email-suanmingm@mellanox.com",
    "date": "2020-03-10T08:21:18",
    "name": "[1/2] bitmap: add create bitmap with all bits set",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "8b3cc619fec61a1e59a010116fa09a957cd14410",
    "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-2-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/66490/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/66490/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 04577A0563;\n\tTue, 10 Mar 2020 09:21:34 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id F01B71C020;\n\tTue, 10 Mar 2020 09:21:26 +0100 (CET)",
            "from git-send-mailer.rdmz.labs.mlnx (unknown [37.142.13.130])\n by dpdk.org (Postfix) with ESMTP id 377F81C002\n for <dev@dpdk.org>; Tue, 10 Mar 2020 09:21:25 +0100 (CET)"
        ],
        "From": "Suanming Mou <suanmingm@mellanox.com>",
        "To": "cristian.dumitrescu@intel.com",
        "Cc": "dev@dpdk.org",
        "Date": "Tue, 10 Mar 2020 16:21:18 +0800",
        "Message-Id": "<1583828479-204084-2-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 1/2] bitmap: add create bitmap with all bits set",
        "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": "Currently, in the case to use bitmap as resource allocator, after\nbitmap creation, all the bitmap bits should be set to indicate the\nbit available. Every time when allocate one bit, search for the set\nbits and clear it to make it in use.\n\nAdd a new rte_bitmap_init_with_all_set() function to have a quick\nfill up the bitmap bits.\n\nComparing with the case create the bitmap as empty and set the bitmap\none by one, the new function costs less cycles.\n\nSigned-off-by: Suanming Mou <suanmingm@mellanox.com>\n---\n lib/librte_eal/common/include/rte_bitmap.h | 32 ++++++++++++++++++++++++++++++\n 1 file changed, 32 insertions(+)",
    "diff": "diff --git a/lib/librte_eal/common/include/rte_bitmap.h b/lib/librte_eal/common/include/rte_bitmap.h\nindex 6b846f2..36b32e4 100644\n--- a/lib/librte_eal/common/include/rte_bitmap.h\n+++ b/lib/librte_eal/common/include/rte_bitmap.h\n@@ -483,6 +483,38 @@ struct rte_bitmap {\n \treturn 0;\n }\n \n+/**\n+ * Bitmap initialization with all bits set\n+ *\n+ * @param n_bits\n+ *   Number of pre-allocated bits in array2.\n+ * @param mem\n+ *   Base address of array1 and array2.\n+ * @param mem_size\n+ *   Minimum expected size of bitmap.\n+ * @return\n+ *   Handle to bitmap instance.\n+ */\n+static inline struct rte_bitmap *\n+rte_bitmap_init_with_all_set(uint32_t n_bits, uint8_t *mem, uint32_t mem_size)\n+{\n+\tuint32_t i;\n+\tuint32_t slabs = n_bits / RTE_BITMAP_SLAB_BIT_SIZE;\n+\tstruct rte_bitmap *bmp = rte_bitmap_init(n_bits, mem, mem_size);\n+\n+\tif (!bmp)\n+\t\treturn NULL;\n+\t/* Fill the arry2 byte aligned bits. */\n+\tmemset(bmp->array2, 0xff, slabs * sizeof(bmp->array2[0]));\n+\t/* Fill the arry1 bits. */\n+\tfor (i = 0; i < n_bits; i += RTE_BITMAP_CL_BIT_SIZE)\n+\t\trte_bitmap_set(bmp, i);\n+\t/* Fill the arry2 left not byte aligned bits. */\n+\tfor (i = slabs * RTE_BITMAP_SLAB_BIT_SIZE; i < n_bits; i++)\n+\t\trte_bitmap_set(bmp, i);\n+\treturn bmp;\n+}\n+\n #ifdef __cplusplus\n }\n #endif\n",
    "prefixes": [
        "1/2"
    ]
}