get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 74574,
    "url": "https://patches.dpdk.org/api/patches/74574/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/d87e2f714999b83c69685950d43a85350dc1441c.1595335031.git.wangyunjian@huawei.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": "<d87e2f714999b83c69685950d43a85350dc1441c.1595335031.git.wangyunjian@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/d87e2f714999b83c69685950d43a85350dc1441c.1595335031.git.wangyunjian@huawei.com",
    "date": "2020-07-21T13:31:31",
    "name": "hash: fix return value of null not checked",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "0af58969bbcb469fcba385cb6ce0b87391f49894",
    "submitter": {
        "id": 551,
        "url": "https://patches.dpdk.org/api/people/551/?format=api",
        "name": "Yunjian Wang",
        "email": "wangyunjian@huawei.com"
    },
    "delegate": {
        "id": 24651,
        "url": "https://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/d87e2f714999b83c69685950d43a85350dc1441c.1595335031.git.wangyunjian@huawei.com/mbox/",
    "series": [
        {
            "id": 11211,
            "url": "https://patches.dpdk.org/api/series/11211/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=11211",
            "date": "2020-07-21T13:31:31",
            "name": "hash: fix return value of null not checked",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/11211/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/74574/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/74574/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 BC4B3A0526;\n\tTue, 21 Jul 2020 15:31:48 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 9E0E51BFEB;\n\tTue, 21 Jul 2020 15:31:47 +0200 (CEST)",
            "from huawei.com (szxga06-in.huawei.com [45.249.212.32])\n by dpdk.org (Postfix) with ESMTP id 6C1C51BFE7;\n Tue, 21 Jul 2020 15:31:46 +0200 (CEST)",
            "from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59])\n by Forcepoint Email with ESMTP id 11B456E0895C1D4B8D71;\n Tue, 21 Jul 2020 21:31:44 +0800 (CST)",
            "from localhost (10.174.185.168) by DGGEMS411-HUB.china.huawei.com\n (10.3.19.211) with Microsoft SMTP Server id 14.3.487.0; Tue, 21 Jul 2020\n 21:31:38 +0800"
        ],
        "From": "wangyunjian <wangyunjian@huawei.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<yipeng1.wang@intel.com>, <sameh.gobriel@intel.com>,\n <bruce.richardson@intel.com>, <jerry.lilijun@huawei.com>,\n <xudingke@huawei.com>, Yunjian Wang <wangyunjian@huawei.com>,\n <stable@dpdk.org>",
        "Date": "Tue, 21 Jul 2020 21:31:31 +0800",
        "Message-ID": "\n <d87e2f714999b83c69685950d43a85350dc1441c.1595335031.git.wangyunjian@huawei.com>",
        "X-Mailer": "git-send-email 1.9.5.msysgit.1",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.174.185.168]",
        "X-CFilter-Loop": "Reflected",
        "Subject": "[dpdk-dev]  [PATCH] hash: fix return value of null not checked",
        "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": "From: Yunjian Wang <wangyunjian@huawei.com>\n\nThe function rte_zmalloc_socket() could return NULL, the return\nvalue need to be checked.\n\nFixes: 5915699153d7 (\"hash: fix scaling by reducing contention\")\nCc: stable@dpdk.org\n\nReported-by: HuangBin <brian.huangbin@huawei.com>\nSigned-off-by: Yunjian Wang <wangyunjian@huawei.com>\n---\n lib/librte_hash/rte_cuckoo_hash.c | 9 ++++++++-\n 1 file changed, 8 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c\nindex 5f701d579..0a6d47471 100644\n--- a/lib/librte_hash/rte_cuckoo_hash.c\n+++ b/lib/librte_hash/rte_cuckoo_hash.c\n@@ -151,6 +151,7 @@ rte_hash_create(const struct rte_hash_parameters *params)\n \tunsigned int no_free_on_del = 0;\n \tuint32_t *ext_bkt_to_free = NULL;\n \tuint32_t *tbl_chng_cnt = NULL;\n+\tstruct lcore_cache *local_free_slots = NULL;\n \tunsigned int readwrite_concur_lf_support = 0;\n \tuint32_t i;\n \n@@ -383,9 +384,13 @@ rte_hash_create(const struct rte_hash_parameters *params)\n #endif\n \n \tif (use_local_cache) {\n-\t\th->local_free_slots = rte_zmalloc_socket(NULL,\n+\t\tlocal_free_slots = rte_zmalloc_socket(NULL,\n \t\t\t\tsizeof(struct lcore_cache) * RTE_MAX_LCORE,\n \t\t\t\tRTE_CACHE_LINE_SIZE, params->socket_id);\n+\t\tif (local_free_slots == NULL) {\n+\t\t\tRTE_LOG(ERR, HASH, \"local free slots memory allocation failed\\n\");\n+\t\t\tgoto err_unlock;\n+\t\t}\n \t}\n \n \t/* Default hash function */\n@@ -416,6 +421,7 @@ rte_hash_create(const struct rte_hash_parameters *params)\n \t*h->tbl_chng_cnt = 0;\n \th->hw_trans_mem_support = hw_trans_mem_support;\n \th->use_local_cache = use_local_cache;\n+\th->local_free_slots = local_free_slots;\n \th->readwrite_concur_support = readwrite_concur_support;\n \th->ext_table_support = ext_table_support;\n \th->writer_takes_lock = writer_takes_lock;\n@@ -461,6 +467,7 @@ rte_hash_create(const struct rte_hash_parameters *params)\n \trte_ring_free(r);\n \trte_ring_free(r_ext);\n \trte_free(te);\n+\trte_free(local_free_slots);\n \trte_free(h);\n \trte_free(buckets);\n \trte_free(buckets_ext);\n",
    "prefixes": []
}