get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 54371,
    "url": "https://patches.dpdk.org/api/patches/54371/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20190605010852.28395-5-stephen@networkplumber.org/",
    "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": "<20190605010852.28395-5-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190605010852.28395-5-stephen@networkplumber.org",
    "date": "2019-06-05T01:08:50",
    "name": "[v3,4/6] net/ether: use bitops to speedup comparison",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "3a623087517713e32761872c2027bce939269b88",
    "submitter": {
        "id": 27,
        "url": "https://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20190605010852.28395-5-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 4895,
            "url": "https://patches.dpdk.org/api/series/4895/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=4895",
            "date": "2019-06-05T01:08:46",
            "name": "net/ether: improvements and optimizations",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/4895/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/54371/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/54371/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 054951B9AC;\n\tWed,  5 Jun 2019 03:09:07 +0200 (CEST)",
            "from mail-pf1-f193.google.com (mail-pf1-f193.google.com\n\t[209.85.210.193]) by dpdk.org (Postfix) with ESMTP id 3AB661B96E\n\tfor <dev@dpdk.org>; Wed,  5 Jun 2019 03:09:01 +0200 (CEST)",
            "by mail-pf1-f193.google.com with SMTP id q10so3569734pff.9\n\tfor <dev@dpdk.org>; Tue, 04 Jun 2019 18:09:01 -0700 (PDT)",
            "from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127])\n\tby smtp.gmail.com with ESMTPSA id\n\t12sm8645936pfi.60.2019.06.04.18.08.58\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 04 Jun 2019 18:08:59 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=3gRaZTEpP089WqB2TCweuXbKeyAmUk694oE/sGpovbs=;\n\tb=gPDRUUvW8Go5WlmLGah2i5Oiv7zgKvwW+TWQwGAFY4IK5vBjfpKh1oa25exzMiseqL\n\t8bS8V2NPzvNY9b8mdbkFH7yy25IEgHp+OklTuydPPdVdI8DtnciyZXxWsJU4JlBKOUMg\n\trjQi7aG4FlGM47je7v3jfEHxKFLY2qRn9O+sN10WcgpnUX1g0JO5wcZVbd54d2lJHRy9\n\tF9b1gPBRRgD0S9b4PlQ75AoQGEVRO3cr/utctNxL1pZDcgJ3jaJ6COauMSNIgrWzEk8i\n\tesuNDFbGE/03acVs5fuDP3GbMhUW/r2d3yYxWeV6l+1Z0U2e/HAJRNxDwc+khW1xPwPv\n\tCqGQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=3gRaZTEpP089WqB2TCweuXbKeyAmUk694oE/sGpovbs=;\n\tb=lkpU83Zl6hQzpF3zLCh8S40+gEEJMwQ6YpaTNVv0c2KOx+otcZU/EWLkjgdVgdJUlW\n\tqsLOHLpSotWnDOTVNxgdLjpfQvuvZdI/D8Q0Hl0/uE1eGk3GluOF9q+fXRI/j8E4YnQL\n\tdcnzvbIFGWbawhpfmt09hZA11n1DGxj51G0O2p9NPIeNgOl0PaRX1huOESChpIH5BbbP\n\tONeY/ndGulrDR6cGo4xlXhW+iCvW3oNBMKH5OVfwKCG5yngOV3H52tI78qjUbACjDJC6\n\tjJLtSg1VOUTnunBcq6X/wCLvbHBnhRvHEH7gLtzbCQ1TgYowJ+jZqgAtHBJKgrWMQf0r\n\tzVVw==",
        "X-Gm-Message-State": "APjAAAX34oW2BaKR56ba29je+OKs8jLLdae6CgjMDqvdGMziiR+zYfQ1\n\tfcYa41++aSOn4mKsL7l29uz3TqS/Dek=",
        "X-Google-Smtp-Source": "APXvYqx45MvfEVeErFqi9EBQLzFtFSo9GjkDsTzipMUkSN6ndgSxPBFr4GCBF6ogzaCenADivyo2ng==",
        "X-Received": "by 2002:a63:4104:: with SMTP id o4mr718604pga.345.1559696940182; \n\tTue, 04 Jun 2019 18:09:00 -0700 (PDT)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>",
        "Date": "Tue,  4 Jun 2019 18:08:50 -0700",
        "Message-Id": "<20190605010852.28395-5-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20190605010852.28395-1-stephen@networkplumber.org>",
        "References": "<20190516180427.17270-1-stephen@networkplumber.org>\n\t<20190605010852.28395-1-stephen@networkplumber.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v3 4/6] net/ether: use bitops to speedup\n\tcomparison",
        "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": "Using bit operations like or and xor is faster than a loop\non all architectures. Really just explicit unrolling.\n\nSimilar cast to uint16 unaligned is already done in\nother functions here.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n lib/librte_net/rte_ether.h | 17 +++++++----------\n 1 file changed, 7 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/lib/librte_net/rte_ether.h b/lib/librte_net/rte_ether.h\nindex 8edc7e217b25..feb35a33c94b 100644\n--- a/lib/librte_net/rte_ether.h\n+++ b/lib/librte_net/rte_ether.h\n@@ -81,11 +81,10 @@ struct rte_ether_addr {\n static inline int rte_is_same_ether_addr(const struct rte_ether_addr *ea1,\n \t\t\t\t     const struct rte_ether_addr *ea2)\n {\n-\tint i;\n-\tfor (i = 0; i < RTE_ETHER_ADDR_LEN; i++)\n-\t\tif (ea1->addr_bytes[i] != ea2->addr_bytes[i])\n-\t\t\treturn 0;\n-\treturn 1;\n+\tconst unaligned_uint16_t *w1 = (const uint16_t *)ea1;\n+\tconst unaligned_uint16_t *w2 = (const uint16_t *)ea2;\n+\n+\treturn ((w1[0] ^ w2[0]) | (w1[1] ^ w2[1]) | (w1[2] ^ w2[2])) == 0;\n }\n \n /**\n@@ -100,11 +99,9 @@ static inline int rte_is_same_ether_addr(const struct rte_ether_addr *ea1,\n  */\n static inline int rte_is_zero_ether_addr(const struct rte_ether_addr *ea)\n {\n-\tint i;\n-\tfor (i = 0; i < RTE_ETHER_ADDR_LEN; i++)\n-\t\tif (ea->addr_bytes[i] != 0x00)\n-\t\t\treturn 0;\n-\treturn 1;\n+\tconst unaligned_uint16_t *w = (const uint16_t *)ea;\n+\n+\treturn (w[0] | w[1] | w[2]) == 0;\n }\n \n /**\n",
    "prefixes": [
        "v3",
        "4/6"
    ]
}