get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 17684,
    "url": "https://patches.dpdk.org/api/patches/17684/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1480952058-13591-1-git-send-email-thomas.monjalon@6wind.com/",
    "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": "<1480952058-13591-1-git-send-email-thomas.monjalon@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1480952058-13591-1-git-send-email-thomas.monjalon@6wind.com",
    "date": "2016-12-05T15:34:18",
    "name": "[dpdk-dev] use generated flags for SSE and AVX checks",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": true,
    "hash": "33b74df11fea46915e8e96984a4cdc2ad4a93d3e",
    "submitter": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/people/1/?format=api",
        "name": "Thomas Monjalon",
        "email": "thomas.monjalon@6wind.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1480952058-13591-1-git-send-email-thomas.monjalon@6wind.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/17684/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/17684/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 341D8379B;\n\tMon,  5 Dec 2016 16:34:28 +0100 (CET)",
            "from mail-wj0-f177.google.com (mail-wj0-f177.google.com\n\t[209.85.210.177]) by dpdk.org (Postfix) with ESMTP id 05337377C\n\tfor <dev@dpdk.org>; Mon,  5 Dec 2016 16:34:26 +0100 (CET)",
            "by mail-wj0-f177.google.com with SMTP id v7so293649431wjy.2\n\tfor <dev@dpdk.org>; Mon, 05 Dec 2016 07:34:26 -0800 (PST)",
            "from XPS13.localdomain (184.203.134.77.rev.sfr.net.\n\t[77.134.203.184]) by smtp.gmail.com with ESMTPSA id\n\tj6sm20989874wjk.25.2016.12.05.07.34.25 for <dev@dpdk.org>\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tMon, 05 Dec 2016 07:34:25 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:subject:date:message-id;\n\tbh=/iGTuGcX+kCI0YJFzvkfeKUYRFDQknC8IUAbkWpt3hY=;\n\tb=H967jQQGp8cuGZFntaRtzrItcZNF8kSxbmeVwxIFqhlbx4fL2pu0hiBpVjWmuzlceO\n\tSY9GPmrZgRxVo2SB2yPeoL1dWmo6MrPMlVRNC2biuWtc/mb1u14RbGveQ/FNtsj3g0o4\n\tyfvs2HZTsoW9T5NCEOCW6ryZIaAVy8qrVhVoUFxWXAWtD/hgXidC7myCe+O3vIxE5aUv\n\tS6blPQx5K+4dGJsYRS7lCc3+DnylmYUFaxffV0Rux+fP16NNLHYQTNrE1Wct9wFOOZV9\n\t7njy87t1pAqWxUPrI/4T/xf6B8q/gGEh6LkJy8GFEokTluG2RPDQipM5PQpryMKVLSVp\n\tpEaQ==",
        "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:subject:date:message-id;\n\tbh=/iGTuGcX+kCI0YJFzvkfeKUYRFDQknC8IUAbkWpt3hY=;\n\tb=Kf57S82WR70e1Jz2LvtSTtdpfByaLO+6ROGz4pldUGFixdz2xodcbc+Vj3HvkoTmpE\n\tcfcAwhS6e8vXUWBxFZN7c5JdbZeeTIsEnZ8/ien+JRQC6N+9oTOlkpprDSaFgAbxjvw0\n\t5Q4bYH1Ue84/udPP9pQLITe2XHI4UoF1DVZsikmgcK1eW5+yYEbY/AG0k+VbeCvSoGcK\n\tliA/72gVDZXsVfoR85UeHI0JQU+UbfwAW9g0CWiPXH78LRffHNFRxbsYf61nHLXzJc7e\n\ttlLytEHvfqeCFq1qtRNlqeAljWXLIyCxo2BkiG2JRa83ks+fMUz0JqCWkT2vBGZKbx8x\n\tlkOQ==",
        "X-Gm-Message-State": "AKaTC02/zYsJHmzzjlEqmXKsmkrJD5CKXledJmsklYEtnz3d7wLFZ23Cke5RXq4lf+sJuzM1",
        "X-Received": "by 10.194.191.161 with SMTP id gz1mr50088001wjc.22.1480952066396;\n\tMon, 05 Dec 2016 07:34:26 -0800 (PST)",
        "From": "Thomas Monjalon <thomas.monjalon@6wind.com>",
        "To": "dev@dpdk.org",
        "Date": "Mon,  5 Dec 2016 16:34:18 +0100",
        "Message-Id": "<1480952058-13591-1-git-send-email-thomas.monjalon@6wind.com>",
        "X-Mailer": "git-send-email 2.7.0",
        "Subject": "[dpdk-dev] [PATCH] use generated flags for SSE and AVX checks",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <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": "Clean up the code to always use the flags RTE_MACHINE_CPUFLAG_*\ngenerated by the DPDK makefile rte.cpuflags.mk.\n\nSigned-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>\n---\n examples/l3fwd/l3fwd_em.c                         |  8 ++++----\n examples/l3fwd/l3fwd_lpm.c                        |  6 +++---\n examples/performance-thread/l3fwd-thread/main.c   |  2 +-\n lib/librte_eal/common/include/arch/x86/rte_vect.h | 14 +++++++-------\n lib/librte_eal/common/include/rte_common.h        |  2 +-\n lib/librte_hash/rte_thash.h                       |  8 +++-----\n lib/librte_sched/rte_sched.c                      |  2 +-\n lib/librte_table/rte_lru.h                        |  2 +-\n 8 files changed, 21 insertions(+), 23 deletions(-)",
    "diff": "diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c\nindex 9cc4460..6714430 100644\n--- a/examples/l3fwd/l3fwd_em.c\n+++ b/examples/l3fwd/l3fwd_em.c\n@@ -246,7 +246,7 @@ static rte_xmm_t mask0;\n static rte_xmm_t mask1;\n static rte_xmm_t mask2;\n \n-#if defined(__SSE2__)\n+#if defined(RTE_MACHINE_CPUFLAG_SSE2)\n static inline xmm_t\n em_mask_key(void *key, xmm_t mask)\n {\n@@ -328,7 +328,7 @@ em_get_ipv6_dst_port(void *ipv6_hdr,  uint8_t portid, void *lookup_struct)\n \treturn (uint8_t)((ret < 0) ? portid : ipv6_l3fwd_out_if[ret]);\n }\n \n-#if defined(__SSE4_1__)\n+#if defined(RTE_MACHINE_CPUFLAG_SSE4_1)\n #if defined(NO_HASH_MULTI_LOOKUP)\n #include \"l3fwd_em_sse.h\"\n #else\n@@ -709,13 +709,13 @@ em_main_loop(__attribute__((unused)) void *dummy)\n \t\t\tif (nb_rx == 0)\n \t\t\t\tcontinue;\n \n-#if defined(__SSE4_1__)\n+#if defined(RTE_MACHINE_CPUFLAG_SSE4_1)\n \t\t\tl3fwd_em_send_packets(nb_rx, pkts_burst,\n \t\t\t\t\t\t\tportid, qconf);\n #else\n \t\t\tl3fwd_em_no_opt_send_packets(nb_rx, pkts_burst,\n \t\t\t\t\t\t\tportid, qconf);\n-#endif /* __SSE_4_1__ */\n+#endif /* SSE_4_1 */\n \t\t}\n \t}\n \ndiff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c\nindex f621269..005534d 100644\n--- a/examples/l3fwd/l3fwd_lpm.c\n+++ b/examples/l3fwd/l3fwd_lpm.c\n@@ -104,7 +104,7 @@ static struct ipv6_l3fwd_lpm_route ipv6_l3fwd_lpm_route_array[] = {\n struct rte_lpm *ipv4_l3fwd_lpm_lookup_struct[NB_SOCKETS];\n struct rte_lpm6 *ipv6_l3fwd_lpm_lookup_struct[NB_SOCKETS];\n \n-#if defined(__SSE4_1__)\n+#if defined(RTE_MACHINE_CPUFLAG_SSE4_1)\n #include \"l3fwd_lpm_sse.h\"\n #else\n #include \"l3fwd_lpm.h\"\n@@ -178,13 +178,13 @@ lpm_main_loop(__attribute__((unused)) void *dummy)\n \t\t\tif (nb_rx == 0)\n \t\t\t\tcontinue;\n \n-#if defined(__SSE4_1__)\n+#if defined(RTE_MACHINE_CPUFLAG_SSE4_1)\n \t\t\tl3fwd_lpm_send_packets(nb_rx, pkts_burst,\n \t\t\t\t\t\tportid, qconf);\n #else\n \t\t\tl3fwd_lpm_no_opt_send_packets(nb_rx, pkts_burst,\n \t\t\t\t\t\t\tportid, qconf);\n-#endif /* __SSE_4_1__ */\n+#endif /* SSE_4_1 */\n \t\t}\n \t}\n \ndiff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c\nindex fdc90b2..0917aa1 100644\n--- a/examples/performance-thread/l3fwd-thread/main.c\n+++ b/examples/performance-thread/l3fwd-thread/main.c\n@@ -95,7 +95,7 @@\n  *  When set to one, optimized forwarding path is enabled.\n  *  Note that LPM optimisation path uses SSE4.1 instructions.\n  */\n-#if ((APP_LOOKUP_METHOD == APP_LOOKUP_LPM) && !defined(__SSE4_1__))\n+#if ((APP_LOOKUP_METHOD == APP_LOOKUP_LPM) && !defined(RTE_MACHINE_CPUFLAG_SSE4_1))\n #define ENABLE_MULTI_BUFFER_OPTIMIZE\t0\n #else\n #define ENABLE_MULTI_BUFFER_OPTIMIZE\t1\ndiff --git a/lib/librte_eal/common/include/arch/x86/rte_vect.h b/lib/librte_eal/common/include/arch/x86/rte_vect.h\nindex 77f2e25..56b53b7 100644\n--- a/lib/librte_eal/common/include/arch/x86/rte_vect.h\n+++ b/lib/librte_eal/common/include/arch/x86/rte_vect.h\n@@ -44,23 +44,23 @@\n \n #if (defined(__ICC) || (__GNUC__ == 4 &&  __GNUC_MINOR__ < 4))\n \n-#ifdef __SSE__\n+#ifdef RTE_MACHINE_CPUFLAG_SSE\n #include <xmmintrin.h>\n #endif\n \n-#ifdef __SSE2__\n+#ifdef RTE_MACHINE_CPUFLAG_SSE2\n #include <emmintrin.h>\n #endif\n \n-#ifdef __SSE3__\n+#ifdef RTE_MACHINE_CPUFLAG_SSE3\n #include <tmmintrin.h>\n #endif\n \n-#if defined(__SSE4_2__) || defined(__SSE4_1__)\n+#if defined(RTE_MACHINE_CPUFLAG_SSE4_2) || defined(RTE_MACHINE_CPUFLAG_SSE4_1)\n #include <smmintrin.h>\n #endif\n \n-#if defined(__AVX__)\n+#if defined(RTE_MACHINE_CPUFLAG_AVX)\n #include <immintrin.h>\n #endif\n \n@@ -88,7 +88,7 @@ typedef union rte_xmm {\n \tdouble   pd[XMM_SIZE / sizeof(double)];\n } rte_xmm_t;\n \n-#ifdef __AVX__\n+#ifdef RTE_MACHINE_CPUFLAG_AVX\n \n typedef __m256i ymm_t;\n \n@@ -105,7 +105,7 @@ typedef union rte_ymm {\n \tdouble   pd[YMM_SIZE / sizeof(double)];\n } rte_ymm_t;\n \n-#endif /* __AVX__ */\n+#endif /* AVX */\n \n #ifdef RTE_ARCH_I686\n #define _mm_cvtsi128_si64(a)    \\\ndiff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h\nindex db5ac91..bc0f4cd 100644\n--- a/lib/librte_eal/common/include/rte_common.h\n+++ b/lib/librte_eal/common/include/rte_common.h\n@@ -294,7 +294,7 @@ rte_align64pow2(uint64_t v)\n \n /*********** Other general functions / macros ********/\n \n-#ifdef __SSE2__\n+#ifdef RTE_MACHINE_CPUFLAG_SSE2\n #include <emmintrin.h>\n /**\n  * PAUSE instruction for tight loops (avoid busy waiting)\ndiff --git a/lib/librte_hash/rte_thash.h b/lib/librte_hash/rte_thash.h\nindex a4886a8..9a352bd 100644\n--- a/lib/librte_hash/rte_thash.h\n+++ b/lib/librte_hash/rte_thash.h\n@@ -56,11 +56,9 @@ extern \"C\" {\n #include <rte_ip.h>\n #include <rte_common.h>\n \n-#ifdef __SSE3__\n+#ifdef RTE_MACHINE_CPUFLAG_SSE3\n #include <rte_vect.h>\n-#endif\n \n-#ifdef __SSE3__\n /* Byte swap mask used for converting IPv6 address\n  * 4-byte chunks to CPU byte order\n  */\n@@ -134,7 +132,7 @@ struct rte_ipv6_tuple {\n union rte_thash_tuple {\n \tstruct rte_ipv4_tuple\tv4;\n \tstruct rte_ipv6_tuple\tv6;\n-#ifdef __SSE3__\n+#ifdef RTE_MACHINE_CPUFLAG_SSE3\n } __attribute__((aligned(XMM_SIZE)));\n #else\n };\n@@ -169,7 +167,7 @@ rte_convert_rss_key(const uint32_t *orig, uint32_t *targ, int len)\n static inline void\n rte_thash_load_v6_addrs(const struct ipv6_hdr *orig, union rte_thash_tuple *targ)\n {\n-#ifdef __SSE3__\n+#ifdef RTE_MACHINE_CPUFLAG_SSE3\n \t__m128i ipv6 = _mm_loadu_si128((const __m128i *)orig->src_addr);\n \t*(__m128i *)targ->v6.src_addr =\n \t\t\t_mm_shuffle_epi8(ipv6, rte_thash_ipv6_bswap_mask);\ndiff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c\nindex e6dace2..c593363 100644\n--- a/lib/librte_sched/rte_sched.c\n+++ b/lib/librte_sched/rte_sched.c\n@@ -56,7 +56,7 @@\n #ifdef RTE_SCHED_VECTOR\n #include <rte_vect.h>\n \n-#if defined(__SSE4__)\n+#ifdef RTE_MACHINE_CPUFLAG_SSE4\n #define SCHED_VECTOR_SSE4\n #endif\n \ndiff --git a/lib/librte_table/rte_lru.h b/lib/librte_table/rte_lru.h\nindex e87e062..3d677c8 100644\n--- a/lib/librte_table/rte_lru.h\n+++ b/lib/librte_table/rte_lru.h\n@@ -47,7 +47,7 @@ extern \"C\" {\n #endif\n \n #ifndef RTE_TABLE_HASH_LRU_STRATEGY\n-#ifdef __SSE4_2__\n+#ifdef RTE_MACHINE_CPUFLAG_SSE4_2\n #define RTE_TABLE_HASH_LRU_STRATEGY                        2\n #else /* if no SSE, use simple scalar version */\n #define RTE_TABLE_HASH_LRU_STRATEGY                        1\n",
    "prefixes": [
        "dpdk-dev"
    ]
}