get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 49525,
    "url": "https://patches.dpdk.org/api/patches/49525/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1547033502-3167-4-git-send-email-gavin.hu@arm.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": "<1547033502-3167-4-git-send-email-gavin.hu@arm.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1547033502-3167-4-git-send-email-gavin.hu@arm.com",
    "date": "2019-01-09T11:31:42",
    "name": "[v6,3/3] hash: flush the rings instead of dequeuing one by one",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "11187b7fb40412343593ad6872d8822c84b772c4",
    "submitter": {
        "id": 1018,
        "url": "https://patches.dpdk.org/api/people/1018/?format=api",
        "name": "Gavin Hu",
        "email": "gavin.hu@arm.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1547033502-3167-4-git-send-email-gavin.hu@arm.com/mbox/",
    "series": [
        {
            "id": 3063,
            "url": "https://patches.dpdk.org/api/series/3063/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=3063",
            "date": "2019-01-09T11:31:39",
            "name": "ring test enhancement and new ring reset api and use it by hash",
            "version": 6,
            "mbox": "https://patches.dpdk.org/series/3063/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/49525/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/49525/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 286711B474;\n\tWed,  9 Jan 2019 12:32:08 +0100 (CET)",
            "from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70])\n\tby dpdk.org (Postfix) with ESMTP id 46BC31B439;\n\tWed,  9 Jan 2019 12:32:05 +0100 (CET)",
            "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 AD30A1650;\n\tWed,  9 Jan 2019 03:32:04 -0800 (PST)",
            "from net-arm-c2400.shanghai.arm.com (net-arm-c2400.shanghai.arm.com\n\t[10.169.41.165])\n\tby usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id\n\t1F7323F70D; Wed,  9 Jan 2019 03:32:02 -0800 (PST)"
        ],
        "From": "gavin hu <gavin.hu@arm.com>",
        "To": "dev@dpdk.org",
        "Cc": "nd@arm.com, thomas@monjalon.net, jerinj@marvell.com,\n\themant.agrawal@nxp.com, Honnappa.Nagarahalli@arm.com, gavin.hu@arm.com,\n\tolivier.matz@6wind.com, bruce.richardson@intel.com, stable@dpdk.org",
        "Date": "Wed,  9 Jan 2019 19:31:42 +0800",
        "Message-Id": "<1547033502-3167-4-git-send-email-gavin.hu@arm.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": [
            "<1547033502-3167-1-git-send-email-gavin.hu@arm.com>",
            "<1546483094-29712-2-git-send-email-gavin.hu@arm.com>"
        ],
        "References": [
            "<1547033502-3167-1-git-send-email-gavin.hu@arm.com>",
            "<1546483094-29712-2-git-send-email-gavin.hu@arm.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH v6 3/3] hash: flush the rings instead of\n\tdequeuing one by one",
        "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": "From: Gavin Hu <gavin.hu@arm.com>\n\nWithin rte_hash_reset, calling a while loop to dequeue one by\none from the ring, while not using them at all, is wasting cycles,\nThe patch just flush the ring by resetting the indices can save cpu\ncycles.\n\nFixes: b26473ff8f4a (\"hash: add reset function\")\nFixes: 75706568a7eb (\"hash: add extendable bucket feature\")\nCc: stable@dpdk.org\n\nSigned-off-by: Gavin Hu <gavin.hu@arm.com>\nReviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>\n---\n lib/librte_hash/Makefile          |  2 +-\n lib/librte_hash/meson.build       |  3 +++\n lib/librte_hash/rte_cuckoo_hash.c | 11 ++++-------\n 3 files changed, 8 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/lib/librte_hash/Makefile b/lib/librte_hash/Makefile\nindex c8c435d..5669d83 100644\n--- a/lib/librte_hash/Makefile\n+++ b/lib/librte_hash/Makefile\n@@ -6,7 +6,7 @@ include $(RTE_SDK)/mk/rte.vars.mk\n # library name\n LIB = librte_hash.a\n \n-CFLAGS += -O3\n+CFLAGS += -O3 -DALLOW_EXPERIMENTAL_API\n CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)\n LDLIBS += -lrte_eal -lrte_ring\n \ndiff --git a/lib/librte_hash/meson.build b/lib/librte_hash/meson.build\nindex efc06ed..ebf70de 100644\n--- a/lib/librte_hash/meson.build\n+++ b/lib/librte_hash/meson.build\n@@ -14,3 +14,6 @@ headers = files('rte_cmp_arm64.h',\n \n sources = files('rte_cuckoo_hash.c', 'rte_fbk_hash.c')\n deps += ['ring']\n+\n+# rte ring reset is not yet part of stable API\n+allow_experimental_apis = true\ndiff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c\nindex c01489b..4b08049 100644\n--- a/lib/librte_hash/rte_cuckoo_hash.c\n+++ b/lib/librte_hash/rte_cuckoo_hash.c\n@@ -559,7 +559,6 @@ __hash_rw_reader_unlock(const struct rte_hash *h)\n void\n rte_hash_reset(struct rte_hash *h)\n {\n-\tvoid *ptr;\n \tuint32_t tot_ring_cnt, i;\n \n \tif (h == NULL)\n@@ -570,16 +569,14 @@ rte_hash_reset(struct rte_hash *h)\n \tmemset(h->key_store, 0, h->key_entry_size * (h->entries + 1));\n \t*h->tbl_chng_cnt = 0;\n \n-\t/* clear the free ring */\n-\twhile (rte_ring_dequeue(h->free_slots, &ptr) == 0)\n-\t\tcontinue;\n+\t/* reset the free ring */\n+\trte_ring_reset(h->free_slots);\n \n-\t/* clear free extendable bucket ring and memory */\n+\t/* flush free extendable bucket ring and memory */\n \tif (h->ext_table_support) {\n \t\tmemset(h->buckets_ext, 0, h->num_buckets *\n \t\t\t\t\t\tsizeof(struct rte_hash_bucket));\n-\t\twhile (rte_ring_dequeue(h->free_ext_bkts, &ptr) == 0)\n-\t\t\tcontinue;\n+\t\trte_ring_reset(h->free_ext_bkts);\n \t}\n \n \t/* Repopulate the free slots ring. Entry zero is reserved for key misses */\n",
    "prefixes": [
        "v6",
        "3/3"
    ]
}