get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1746,
    "url": "http://patches.dpdk.org/api/patches/1746/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1417639668-23500-2-git-send-email-thomas.monjalon@6wind.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": "<1417639668-23500-2-git-send-email-thomas.monjalon@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1417639668-23500-2-git-send-email-thomas.monjalon@6wind.com",
    "date": "2014-12-03T20:47:47",
    "name": "[dpdk-dev,1/2] eal: detect endianness",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "348249ee791047d3fbc0b3e722f22494d0f0d66a",
    "submitter": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/people/1/?format=api",
        "name": "Thomas Monjalon",
        "email": "thomas.monjalon@6wind.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1417639668-23500-2-git-send-email-thomas.monjalon@6wind.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/1746/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/1746/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 29BE7803D;\n\tWed,  3 Dec 2014 21:49:03 +0100 (CET)",
            "from mail-wi0-f180.google.com (mail-wi0-f180.google.com\n\t[209.85.212.180]) by dpdk.org (Postfix) with ESMTP id F37F6559C\n\tfor <dev@dpdk.org>; Wed,  3 Dec 2014 21:49:00 +0100 (CET)",
            "by mail-wi0-f180.google.com with SMTP id n3so25758531wiv.7\n\tfor <dev@dpdk.org>; Wed, 03 Dec 2014 12:49:00 -0800 (PST)",
            "from XPS13.localdomain (188.20.90.92.rev.sfr.net. [92.90.20.188])\n\tby mx.google.com with ESMTPSA id\n\thz9sm37761878wjb.17.2014.12.03.12.48.55 for <multiple recipients>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tWed, 03 Dec 2014 12:49:00 -0800 (PST)"
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=CSp5GWtWkM0EdbDGUbroVvPm+YUvYbS1z/u7ndnUlMo=;\n\tb=FesX3PIQUb4hNLuppSZM0ogcQb45B7wVpaYpbNi0Bi/CKTr+tbio+dvIAqQt6Pt9lW\n\tM7O/MhvoyqFuPO9jPqhewn66swJNUYJOrtO7XP5Uvh2EDqNcSI87XTYXnHhHtVVadCST\n\tzJMLQRPsfT/2UTQnV9blmne95/g9crQJMi6VaY/L6kfxe75z3yWn0l0J8Zs6pho0b6LV\n\tkFQI3oHAFjPWInkp56rU//peqbFclKVd+5YkJTR0eFcIk2YD9rhsrE/6I4kv05wfDj8X\n\t9KPIb4D944UXHCs/9d9aNzpd0BfY9GCeHmxaAUFpnKlJsl50vp/Mq8wNF18yzGH7Ufgv\n\trPWA==",
        "X-Gm-Message-State": "ALoCoQn+ju1acndetFo56lEJAXvjyoVoRNSh1nglLXWFUDkPvJfPypKSR/OuyWyuInt/rMK4OYIF",
        "X-Received": "by 10.180.84.198 with SMTP id b6mr105069779wiz.41.1417639740869; \n\tWed, 03 Dec 2014 12:49:00 -0800 (PST)",
        "From": "Thomas Monjalon <thomas.monjalon@6wind.com>",
        "To": "dev@dpdk.org",
        "Date": "Wed,  3 Dec 2014 21:47:47 +0100",
        "Message-Id": "<1417639668-23500-2-git-send-email-thomas.monjalon@6wind.com>",
        "X-Mailer": "git-send-email 2.1.3",
        "In-Reply-To": "<1417639668-23500-1-git-send-email-thomas.monjalon@6wind.com>",
        "References": "<283531301.lWbIahXLyM@xps13>\n\t<1417639668-23500-1-git-send-email-thomas.monjalon@6wind.com>",
        "Subject": "[dpdk-dev] [PATCH 1/2] eal: detect endianness",
        "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": "There is no standard to check endianness.\nSo we need to try different checks.\nPrevious trials were done in testpmd (see commits\n51f694dd40f56 and 64741f237cf29) without full success.\nThis one is not guaranteed to work everywhere so it could\nevolve when exceptions are found.\n\nIf endianness is not detected, there is a fallback on x86\nto little endian. It could be forced before doing detection\nbut it would add some arch-dependent code in the generic header.\n\nThe option CONFIG_RTE_ARCH_BIG_ENDIAN introduced for IBM Power only\n(commit a982ec81d84d53) can be removed. A compile-time check is better.\n\nSigned-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>\n---\n config/defconfig_ppc_64-power8-linuxapp-gcc        |  1 -\n .../common/include/arch/ppc_64/rte_byteorder.h     |  4 ++--\n .../common/include/arch/x86/rte_byteorder.h        |  4 ++++\n .../common/include/generic/rte_byteorder.h         | 28 ++++++++++++++++++++++\n 4 files changed, 34 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/config/defconfig_ppc_64-power8-linuxapp-gcc b/config/defconfig_ppc_64-power8-linuxapp-gcc\nindex 48018c3..d97a885 100644\n--- a/config/defconfig_ppc_64-power8-linuxapp-gcc\n+++ b/config/defconfig_ppc_64-power8-linuxapp-gcc\n@@ -34,7 +34,6 @@ CONFIG_RTE_MACHINE=\"power8\"\n \n CONFIG_RTE_ARCH=\"ppc_64\"\n CONFIG_RTE_ARCH_PPC_64=y\n-CONFIG_RTE_ARCH_BIG_ENDIAN=y\n CONFIG_RTE_ARCH_64=y\n \n CONFIG_RTE_TOOLCHAIN=\"gcc\"\ndiff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_byteorder.h b/lib/librte_eal/common/include/arch/ppc_64/rte_byteorder.h\nindex 1a89051..80436f2 100644\n--- a/lib/librte_eal/common/include/arch/ppc_64/rte_byteorder.h\n+++ b/lib/librte_eal/common/include/arch/ppc_64/rte_byteorder.h\n@@ -105,7 +105,7 @@ static inline uint64_t rte_arch_bswap64(uint64_t _x)\n /* Power 8 have both little endian and big endian mode\n  * Power 7 only support big endian\n  */\n-#ifndef RTE_ARCH_BIG_ENDIAN\n+#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN\n \n #define rte_cpu_to_le_16(x) (x)\n #define rte_cpu_to_le_32(x) (x)\n@@ -123,7 +123,7 @@ static inline uint64_t rte_arch_bswap64(uint64_t _x)\n #define rte_be_to_cpu_32(x) rte_bswap32(x)\n #define rte_be_to_cpu_64(x) rte_bswap64(x)\n \n-#else\n+#else /* RTE_BIG_ENDIAN */\n \n #define rte_cpu_to_le_16(x) rte_bswap16(x)\n #define rte_cpu_to_le_32(x) rte_bswap32(x)\ndiff --git a/lib/librte_eal/common/include/arch/x86/rte_byteorder.h b/lib/librte_eal/common/include/arch/x86/rte_byteorder.h\nindex 1aa6985..ffdb6ef 100644\n--- a/lib/librte_eal/common/include/arch/x86/rte_byteorder.h\n+++ b/lib/librte_eal/common/include/arch/x86/rte_byteorder.h\n@@ -40,6 +40,10 @@ extern \"C\" {\n \n #include \"generic/rte_byteorder.h\"\n \n+#ifndef RTE_BYTE_ORDER\n+#define RTE_BYTE_ORDER RTE_LITTLE_ENDIAN\n+#endif\n+\n /*\n  * An architecture-optimized byte swap for a 16-bit value.\n  *\ndiff --git a/lib/librte_eal/common/include/generic/rte_byteorder.h b/lib/librte_eal/common/include/generic/rte_byteorder.h\nindex 9358136..ea23fdf 100644\n--- a/lib/librte_eal/common/include/generic/rte_byteorder.h\n+++ b/lib/librte_eal/common/include/generic/rte_byteorder.h\n@@ -44,6 +44,34 @@\n  */\n \n #include <stdint.h>\n+#ifdef RTE_EXEC_ENV_BSDAPP\n+#include <sys/endian.h>\n+#else\n+#include <endian.h>\n+#endif\n+\n+/*\n+ * Compile-time endianness detection\n+ */\n+#define RTE_BIG_ENDIAN    1\n+#define RTE_LITTLE_ENDIAN 2\n+#if defined __BYTE_ORDER\n+#if __BYTE_ORDER == __BIG_ENDIAN\n+#define RTE_BYTE_ORDER RTE_BIG_ENDIAN\n+#elif __BYTE_ORDER == __LITTLE_ENDIAN\n+#define RTE_BYTE_ORDER RTE_LITTLE_ENDIAN\n+#endif /* __BYTE_ORDER */\n+#elif defined __BYTE_ORDER__\n+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__\n+#define RTE_BYTE_ORDER RTE_BIG_ENDIAN\n+#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__\n+#define RTE_BYTE_ORDER RTE_LITTLE_ENDIAN\n+#endif /* __BYTE_ORDER__ */\n+#elif defined __BIG_ENDIAN__\n+#define RTE_BYTE_ORDER RTE_BIG_ENDIAN\n+#elif defined __LITTLE_ENDIAN__\n+#define RTE_BYTE_ORDER RTE_LITTLE_ENDIAN\n+#endif\n \n /*\n  * An internal function to swap bytes in a 16-bit value.\n",
    "prefixes": [
        "dpdk-dev",
        "1/2"
    ]
}