get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 152,
    "url": "http://patches.dpdk.org/api/patches/152/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1407880077-15038-1-git-send-email-tomas.vestelind@gmail.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": "<1407880077-15038-1-git-send-email-tomas.vestelind@gmail.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1407880077-15038-1-git-send-email-tomas.vestelind@gmail.com",
    "date": "2014-08-12T21:47:57",
    "name": "[dpdk-dev] hash: added rte_hash_clear that clears all keys",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "dfd338b6c5ba069348baecc783c0116645572876",
    "submitter": {
        "id": 53,
        "url": "http://patches.dpdk.org/api/people/53/?format=api",
        "name": "Tomas Vestelind",
        "email": "tomas.vestelind@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1407880077-15038-1-git-send-email-tomas.vestelind@gmail.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/152/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/152/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<tomas.vestelind@gmail.com>",
        "Received": [
            "from mail-la0-f46.google.com (mail-la0-f46.google.com\n\t[209.85.215.46]) by dpdk.org (Postfix) with ESMTP id 21D9EB3BE\n\tfor <dev@dpdk.org>; Tue, 12 Aug 2014 23:46:53 +0200 (CEST)",
            "by mail-la0-f46.google.com with SMTP id b8so8337077lan.5\n\tfor <dev@dpdk.org>; Tue, 12 Aug 2014 14:49:50 -0700 (PDT)",
            "from localhost.localdomain (h-79-136-64-87.na.cust.bahnhof.se.\n\t[79.136.64.87]) by mx.google.com with ESMTPSA id\n\to3sm24735915lbh.24.2014.08.12.14.49.48 for <dev@dpdk.org>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 12 Aug 2014 14:49:49 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\n\th=from:to:subject:date:message-id;\n\tbh=1GXSX6pw3LftRVt0bulCTPNKSPNzTj7VuoU8e/pIV1Y=;\n\tb=cPBv0xlgvmIQ26tYJZgLAwoh+Pgdy9bwLD4M7jvgOxGZCKHPXgwqJ242A9u0e+MAYG\n\t342Is8aZ+irkDC2ku/f21Yu1AUbLVOfoKKlMZFPh616wq60eNv3J3pFK2Rf1yw2xxUkF\n\tw//sNiSRMD5mGC+XpyweF4b2HBvf6nFod6iQKzFAGdpx2wZos2iK1G7pSsFA42Klhr5O\n\tDrwVXUHrRTU/QlPQdQUnYAjjFeWgPmw/mjFApQk3eyNKGS2j0Qtb+0QSJbGe3aCVClMp\n\tckNX6jhcazbHzLEaLSmYFEvBIaU4j3NJug0ygGlfxg0gFDeTaaaKo4mFKA3Cd97/F9/I\n\tJx6g==",
        "X-Received": "by 10.152.27.2 with SMTP id p2mr383159lag.23.1407880190106;\n\tTue, 12 Aug 2014 14:49:50 -0700 (PDT)",
        "From": "Tomas Vestelind <tomas.vestelind@gmail.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue, 12 Aug 2014 23:47:57 +0200",
        "Message-Id": "<1407880077-15038-1-git-send-email-tomas.vestelind@gmail.com>",
        "X-Mailer": "git-send-email 1.7.10.4",
        "Subject": "[dpdk-dev] [PATCH] hash: added rte_hash_clear that clears all keys",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "X-List-Received-Date": "Tue, 12 Aug 2014 21:46:53 -0000"
    },
    "content": "I added rte_hash_clear which clear the map from all previously added\nkeys.\n\nSigned-off-by: Tomas Vestelind <tomas.vestelind@gmail.com>\n---\n lib/librte_hash/rte_hash.c |   14 ++++++++++++++\n lib/librte_hash/rte_hash.h |   10 ++++++++++\n 2 files changed, 24 insertions(+)",
    "diff": "diff --git a/lib/librte_hash/rte_hash.c b/lib/librte_hash/rte_hash.c\nindex 2108c4f..917a6c1 100644\n--- a/lib/librte_hash/rte_hash.c\n+++ b/lib/librte_hash/rte_hash.c\n@@ -507,3 +507,17 @@ rte_hash_keys(const struct rte_hash *h, void *keys)\n \n     return found_keys;\n }\n+\n+void\n+rte_hash_clear(const struct rte_hash *h)\n+{\n+    unsigned int bucket, entry;\n+\n+    /* Clear all entries by invalidating each signature */\n+    for (bucket = 0; bucket < h->num_buckets; bucket++) {\n+        hash_sig_t *sig = get_sig_tbl_bucket(h, bucket);\n+        for (entry = 0; entry < h->bucket_entries; entry++) {\n+            sig[entry] = NULL_SIGNATURE;\n+        }\n+    }\n+}\ndiff --git a/lib/librte_hash/rte_hash.h b/lib/librte_hash/rte_hash.h\nindex e0fb28f..b84137e 100644\n--- a/lib/librte_hash/rte_hash.h\n+++ b/lib/librte_hash/rte_hash.h\n@@ -318,6 +318,16 @@ rte_hash_lookup_bulk(const struct rte_hash *h, const void **keys,\n  */\n unsigned int\n rte_hash_keys(const struct rte_hash *h, void *keys);\n+\n+/**\n+ * Clear all keys. This operation is not multi-thread safe and should only be\n+ * called from one thread.\n+ *\n+ * @param h\n+ *   Hash table to clear.\n+ */\n+void\n+rte_hash_clear(const struct rte_hash *h);\n #ifdef __cplusplus\n }\n #endif\n",
    "prefixes": [
        "dpdk-dev"
    ]
}