Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/53358/?format=api
http://patches.dpdk.org/api/patches/53358/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190509171907.14693-3-dharmik.thakkar@arm.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": "<20190509171907.14693-3-dharmik.thakkar@arm.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190509171907.14693-3-dharmik.thakkar@arm.com", "date": "2019-05-09T17:19:06", "name": "[v4,2/3] hash: fix total entries in free key with position", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "9fd54deaac22a5d3892ca1aa1a6b881a951d5816", "submitter": { "id": 1108, "url": "http://patches.dpdk.org/api/people/1108/?format=api", "name": "Dharmik Thakkar", "email": "dharmik.thakkar@arm.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190509171907.14693-3-dharmik.thakkar@arm.com/mbox/", "series": [ { "id": 4621, "url": "http://patches.dpdk.org/api/series/4621/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4621", "date": "2019-05-09T17:19:04", "name": "hash: fix bugs in 'free key with position'", "version": 4, "mbox": "http://patches.dpdk.org/series/4621/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/53358/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/53358/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 13AD14CC7;\n\tThu, 9 May 2019 19:20:02 +0200 (CEST)", "from foss.arm.com (foss.arm.com [217.140.101.70])\n\tby dpdk.org (Postfix) with ESMTP id 1C6002862;\n\tThu, 9 May 2019 19:19:57 +0200 (CEST)", "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249])\n\tby usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 824EB15BF;\n\tThu, 9 May 2019 10:19:56 -0700 (PDT)", "from dp6132.austin.arm.com (dp6132.austin.arm.com [10.118.12.38])\n\tby usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id\n\t137E13F6C4; Thu, 9 May 2019 10:19:56 -0700 (PDT)" ], "From": "Dharmik Thakkar <dharmik.thakkar@arm.com>", "To": "Yipeng Wang <yipeng1.wang@intel.com>,\n\tSameh Gobriel <sameh.gobriel@intel.com>,\n\tBruce Richardson <bruce.richardson@intel.com>,\n\tPablo de Lara <pablo.de.lara.guarch@intel.com>", "Cc": "dev@dpdk.org, honnappa.nagarahalli@arm.com, zhongdahulinfan@163.com,\n\tDharmik Thakkar <dharmik.thakkar@arm.com>, stable@dpdk.org", "Date": "Thu, 9 May 2019 17:19:06 +0000", "Message-Id": "<20190509171907.14693-3-dharmik.thakkar@arm.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20190509171907.14693-1-dharmik.thakkar@arm.com>", "References": "<20190509133924.7153-1-dharmik.thakkar@arm.com>\n\t<20190509171907.14693-1-dharmik.thakkar@arm.com>", "Subject": "[dpdk-dev] [PATCH v4 2/3] hash: fix total entries in free key with\n\tposition", "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "In rte_hash, with current implementation, it is possible that keys\nare stored at indexes greater than the number of total entries.\n\nCurrently, in rte_hash_free_key_with_position(), due to incorrect\ncomputation of total_entries, application cannot free keys with\nindexes greater than the number of total entries.\n\nThis patch fixes this incorrect computation of total_entries.\n\nBugzilla ID: 261\nFixes: 9d033dac7d7c (\"hash: support no free on delete\")\nCc: honnappa.nagarahalli@arm.com\nCc: stable@dpdk.org\n\nReported-by: Linfan <zhongdahulinfan@163.com>\nSuggested-by: Linfan <zhongdahulinfan@163.com>\nSigned-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>\n---\n lib/librte_hash/rte_cuckoo_hash.c | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)", "diff": "diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c\nindex 5029f9f61fae..ed2e96b6f178 100644\n--- a/lib/librte_hash/rte_cuckoo_hash.c\n+++ b/lib/librte_hash/rte_cuckoo_hash.c\n@@ -1594,7 +1594,9 @@ rte_hash_free_key_with_position(const struct rte_hash *h,\n \n \tunsigned int lcore_id, n_slots;\n \tstruct lcore_cache *cached_free_slots;\n-\tconst uint32_t total_entries = h->num_buckets * RTE_HASH_BUCKET_ENTRIES;\n+\tconst uint32_t total_entries = h->use_local_cache ?\n+\t\th->entries + (RTE_MAX_LCORE - 1) * (LCORE_CACHE_SIZE - 1) + 1\n+\t\t\t\t\t\t\t: h->entries + 1;\n \n \t/* Out of bounds */\n \tif (key_idx >= total_entries)\n", "prefixes": [ "v4", "2/3" ] }{ "id": 53358, "url": "