get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1325,
    "url": "https://patches.dpdk.org/api/patches/1325/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/7fd8c23c65bd068f25fb9f5ca52935dafb6a640c.1416280649.git.e_zhumabekov@sts.kz/",
    "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": "<7fd8c23c65bd068f25fb9f5ca52935dafb6a640c.1416280649.git.e_zhumabekov@sts.kz>",
    "list_archive_url": "https://inbox.dpdk.org/dev/7fd8c23c65bd068f25fb9f5ca52935dafb6a640c.1416280649.git.e_zhumabekov@sts.kz",
    "date": "2014-11-18T03:21:57",
    "name": "[dpdk-dev,v3,4/5] hash: rte_hash_crc() slices data into 8-byte pieces",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2f043cc183349f252024108ab68fdfd01b4122f1",
    "submitter": {
        "id": 36,
        "url": "https://patches.dpdk.org/api/people/36/?format=api",
        "name": "Yerden Zhumabekov",
        "email": "e_zhumabekov@sts.kz"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/7fd8c23c65bd068f25fb9f5ca52935dafb6a640c.1416280649.git.e_zhumabekov@sts.kz/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/1325/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/1325/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id B98E07F70;\n\tTue, 18 Nov 2014 04:11:20 +0100 (CET)",
            "from mgw.gov.kz (mgw.gov.kz [89.218.88.242])\n\tby dpdk.org (Postfix) with ESMTP id 0ECFF7E75\n\tfor <dev@dpdk.org>; Tue, 18 Nov 2014 04:11:11 +0100 (CET)",
            "from mgw.gov.kz (mx.ctsat.kz [178.89.4.95])\n\tby mgw.gov.kz  with ESMTP id sAI3LT4r028024-sAI3LT4t028024\n\t(version=TLSv1.0 cipher=AES128-SHA bits=128 verify=NO);\n\tTue, 18 Nov 2014 09:21:29 +0600",
            "from EXCASHUB2.rgp.local (192.168.40.53) by EdgeForefront.rgp.local\n\t(192.168.40.59) with Microsoft SMTP Server (TLS) id 14.2.247.3;\n\tTue, 18 Nov 2014 09:21:18 +0600",
            "from r220.rgp.local (192.168.59.10) by excashub2.rgp.local\n\t(192.168.40.48) with Microsoft SMTP Server (TLS) id 14.2.247.3;\n\tTue, 18 Nov 2014 09:21:38 +0600"
        ],
        "From": "Yerden Zhumabekov <e_zhumabekov@sts.kz>",
        "To": "<dev@dpdk.org>",
        "Date": "Tue, 18 Nov 2014 09:21:57 +0600",
        "Message-ID": "<7fd8c23c65bd068f25fb9f5ca52935dafb6a640c.1416280649.git.e_zhumabekov@sts.kz>",
        "X-Mailer": "git-send-email 1.7.9.5",
        "In-Reply-To": "<cover.1416280649.git.e_zhumabekov@sts.kz>",
        "References": "<1416160760-16087-1-git-send-email-e_zhumabekov@sts.kz>\n\t<cover.1416280649.git.e_zhumabekov@sts.kz>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[192.168.59.10]",
        "X-FEAS-SYSTEM-WL": "e_zhumabekov@sts.kz",
        "Subject": "[dpdk-dev] [PATCH v3 4/5] hash: rte_hash_crc() slices data into\n\t8-byte pieces",
        "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>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Calculating hash for data of variable length is more efficient\nwhen that data is sliced into 8-byte pieces. The rest part of data\nis hashed using CRC32 functions with either 8 and 4 byte operands.\n\nSigned-off-by: Yerden Zhumabekov <e_zhumabekov@sts.kz>\n---\n lib/librte_hash/rte_hash_crc.h |   33 ++++++++++++++++++++++++---------\n 1 file changed, 24 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/lib/librte_hash/rte_hash_crc.h b/lib/librte_hash/rte_hash_crc.h\nindex c1b75e8..2d95e3c 100644\n--- a/lib/librte_hash/rte_hash_crc.h\n+++ b/lib/librte_hash/rte_hash_crc.h\n@@ -456,7 +456,7 @@ rte_hash_crc_8byte(uint64_t data, uint32_t init_val)\n }\n \n /**\n- * Use crc32 instruction to perform a hash.\n+ * Calculate CRC32 hash on user-supplied byte array.\n  *\n  * @param data\n  *   Data to perform hash on.\n@@ -471,23 +471,38 @@ static inline uint32_t\n rte_hash_crc(const void *data, uint32_t data_len, uint32_t init_val)\n {\n \tunsigned i;\n-\tuint32_t temp = 0;\n-\tconst uint32_t *p32 = (const uint32_t *)data;\n+\tuint64_t temp = 0;\n+\tconst uint64_t *p64 = (const uint64_t *)data;\n \n-\tfor (i = 0; i < data_len / 4; i++) {\n-\t\tinit_val = rte_hash_crc_4byte(*p32++, init_val);\n+\tfor (i = 0; i < data_len / 8; i++) {\n+\t\tinit_val = rte_hash_crc_8byte(*p64++, init_val);\n \t}\n \n-\tswitch (3 - (data_len & 0x03)) {\n+\tswitch (7 - (data_len & 0x07)) {\n \tcase 0:\n-\t\ttemp |= *((const uint8_t *)p32 + 2) << 16;\n+\t\ttemp |= (uint64_t) *((const uint8_t *)p64 + 6) << 48;\n \t\t/* Fallthrough */\n \tcase 1:\n-\t\ttemp |= *((const uint8_t *)p32 + 1) << 8;\n+\t\ttemp |= (uint64_t) *((const uint8_t *)p64 + 5) << 40;\n \t\t/* Fallthrough */\n \tcase 2:\n-\t\ttemp |= *((const uint8_t *)p32);\n+\t\ttemp |= (uint64_t) *((const uint8_t *)p64 + 4) << 32;\n+\t\ttemp |= *((const uint32_t *)p64);\n+\t\tinit_val = rte_hash_crc_8byte(temp, init_val);\n+\t\tbreak;\n+\tcase 3:\n+\t\tinit_val = rte_hash_crc_4byte(*(const uint32_t *)p64, init_val);\n+\t\tbreak;\n+\tcase 4:\n+\t\ttemp |= *((const uint8_t *)p64 + 2) << 16;\n+\t\t/* Fallthrough */\n+\tcase 5:\n+\t\ttemp |= *((const uint8_t *)p64 + 1) << 8;\n+\t\t/* Fallthrough */\n+\tcase 6:\n+\t\ttemp |= *((const uint8_t *)p64);\n \t\tinit_val = rte_hash_crc_4byte(temp, init_val);\n+\t\t/* Fallthrough */\n \tdefault:\n \t\tbreak;\n \t}\n",
    "prefixes": [
        "dpdk-dev",
        "v3",
        "4/5"
    ]
}