get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 17095,
    "url": "http://patches.dpdk.org/api/patches/17095/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1479494872-9302-1-git-send-email-nhorman@tuxdriver.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": "<1479494872-9302-1-git-send-email-nhorman@tuxdriver.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1479494872-9302-1-git-send-email-nhorman@tuxdriver.com",
    "date": "2016-11-18T18:47:52",
    "name": "[dpdk-dev] pmdinfogen: Fix pmdinfogen to select proper endianess on cross-compile",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "c237019ac8e53c2e0c94c7188a75f57774e46850",
    "submitter": {
        "id": 32,
        "url": "http://patches.dpdk.org/api/people/32/?format=api",
        "name": "Neil Horman",
        "email": "nhorman@tuxdriver.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1479494872-9302-1-git-send-email-nhorman@tuxdriver.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/17095/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/17095/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 4F011558A;\n\tFri, 18 Nov 2016 19:48:26 +0100 (CET)",
            "from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58])\n\tby dpdk.org (Postfix) with ESMTP id 3C77B37B3\n\tfor <dev@dpdk.org>; Fri, 18 Nov 2016 19:48:24 +0100 (CET)",
            "from cpe-2606-a000-111b-40ed-7aac-c0ff-fec2-933b.dyn6.twc.com\n\t([2606:a000:111b:40ed:7aac:c0ff:fec2:933b] helo=localhost)\n\tby smtp.tuxdriver.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63)\n\t(envelope-from <nhorman@tuxdriver.com>)\n\tid 1c7oCp-0002YV-7Q; Fri, 18 Nov 2016 13:48:16 -0500"
        ],
        "From": "Neil Horman <nhorman@tuxdriver.com>",
        "To": "dev@dpdk.org",
        "Cc": "Neil Horman <nhorman@tuxdriver.com>,\n\tHemant Agrawal <hemant.agrawal@nxp.com>,\n\tJerin Jacob <Jerin.Jacob@cavium.com>,\n\tBruce Richardson <bruce.richardson@intel.com>,\n\tThomas Monjalon <thomas.monjalon@6wind.com>",
        "Date": "Fri, 18 Nov 2016 13:47:52 -0500",
        "Message-Id": "<1479494872-9302-1-git-send-email-nhorman@tuxdriver.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "X-Spam-Score": "-2.9 (--)",
        "X-Spam-Status": "No",
        "Subject": "[dpdk-dev] [PATCH] pmdinfogen: Fix pmdinfogen to select proper\n\tendianess on cross-compile",
        "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": "pmdinfogen has a bug in which, during build, it pulls in rte_byteorder.h to\nobtain the rte macros for byteswapping between the cpu byte order and big or\nlittle endian.  Unfortunately, pmdinfogen is a tool that is only meant to be run\nduring the build of dpdk components, and so, it runs on the host.  In cross\ncompile environments however, the rte_byteorder.h is configured using a target\ncpu, who's endianess may differ from that of the host, leading to improper\nswapping.\n\nThe fix is to use host system defined byte swapping routines rather than the\ndpdk provided routines.  Note that we are using non posix compliant routines, as\nthe posix compliant api only addresses 16 and 32 bit swaps, and we also need 64\nbit swaps.  Those macros exist (via endian.h), but BSD and Linux put that header\nin different locations so some ifdeffery is required.\n\nTested successfully by myself on Linux and BSD systems.\n\nSigned-off-by: Neil Horman <nhorman@tuxdriver.com>\nCC: Hemant Agrawal <hemant.agrawal@nxp.com>\nCC: Jerin Jacob <Jerin.Jacob@cavium.com>\nCC: Bruce Richardson <bruce.richardson@intel.com>\nCC: Thomas Monjalon <thomas.monjalon@6wind.com>\n---\n buildtools/pmdinfogen/pmdinfogen.h | 10 +++++++---\n 1 file changed, 7 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/buildtools/pmdinfogen/pmdinfogen.h b/buildtools/pmdinfogen/pmdinfogen.h\nindex 1da2966..7c787c1 100644\n--- a/buildtools/pmdinfogen/pmdinfogen.h\n+++ b/buildtools/pmdinfogen/pmdinfogen.h\n@@ -16,12 +16,16 @@\n #include <sys/types.h>\n #include <sys/stat.h>\n #include <sys/mman.h>\n+#ifdef __linux__ \n+#include <endian.h>\n+#else\n+#include <sys/endian.h>\n+#endif\n #include <fcntl.h>\n #include <unistd.h>\n #include <elf.h>\n #include <rte_config.h>\n #include <rte_pci.h>\n-#include <rte_byteorder.h>\n \n /* On BSD-alike OSes elf.h defines these according to host's word size */\n #undef ELF_ST_BIND\n@@ -75,9 +79,9 @@\n #define CONVERT_NATIVE(fend, width, x) ({ \\\n typeof(x) ___x; \\\n if ((fend) == ELFDATA2LSB) \\\n-\t___x = rte_le_to_cpu_##width(x); \\\n+\t___x = le##width##toh(x); \\\n else \\\n-\t___x = rte_be_to_cpu_##width(x); \\\n+\t___x = be##width##toh(x); \\\n \t___x; \\\n })\n \n",
    "prefixes": [
        "dpdk-dev"
    ]
}