Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/52502/?format=api
http://patches.dpdk.org/api/patches/52502/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190409190630.31975-8-vivkong@ca.ibm.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": "<20190409190630.31975-8-vivkong@ca.ibm.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190409190630.31975-8-vivkong@ca.ibm.com", "date": "2019-04-09T19:06:25", "name": "[RFC,07/12] test: add support for s390x architecture", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "be79b05b20f97d6b56b70b58c464ce8f07d84705", "submitter": { "id": 1273, "url": "http://patches.dpdk.org/api/people/1273/?format=api", "name": "Vivian Kong", "email": "vivkong@gmail.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/20190409190630.31975-8-vivkong@ca.ibm.com/mbox/", "series": [ { "id": 4211, "url": "http://patches.dpdk.org/api/series/4211/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4211", "date": "2019-04-09T19:06:18", "name": "introduce s390x architecture", "version": 1, "mbox": "http://patches.dpdk.org/series/4211/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/52502/comments/", "check": "warning", "checks": "http://patches.dpdk.org/api/patches/52502/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 488055F14;\n\tTue, 9 Apr 2019 21:07:00 +0200 (CEST)", "from mail-qt1-f193.google.com (mail-qt1-f193.google.com\n\t[209.85.160.193]) by dpdk.org (Postfix) with ESMTP id 13BE25689\n\tfor <dev@dpdk.org>; Tue, 9 Apr 2019 21:06:43 +0200 (CEST)", "by mail-qt1-f193.google.com with SMTP id w30so21163759qta.8\n\tfor <dev@dpdk.org>; Tue, 09 Apr 2019 12:06:43 -0700 (PDT)", "from csz25116.canlab.ibm.com ([199.246.40.57])\n\tby smtp.gmail.com with ESMTPSA id\n\tq23sm17934789qkc.16.2019.04.09.12.06.41 for <dev@dpdk.org>\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 09 Apr 2019 12:06:41 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:subject:date:message-id:in-reply-to:references:reply-to;\n\tbh=kKo99JY69sqsDAQW6vWtxBehSgnXVqEE9ossRf7HUvk=;\n\tb=EsUgEhDSvOtkcdm+jyA044zK3DIGKbYcO5ktf7uz08+6xhZek8lTP6sPIKTJ7Ur5Vj\n\t5d2J+PkXsTPG7sUrywJqv1tX8ciITMF+DbGQPAayfhlhfJ0qu3xWAwz1bpjCfjMgX2vk\n\tSVFK4sCLVwbNHwkQWC31L7YhON7lUDx3pLk/wXfdgh9bSuZmaqzOCxn+DEzv7Dc31WPZ\n\t6qPHTQB6m78o606a6Gym+ScUaq9PO2feHz/mVJ0EHY7xwxmlUu1VAPaleyDbODAvPT1M\n\tYX3G1+0C9L9B6+e64KM58Q/TsA8TDmmYNTVcDVSoawWFOrCB8gNzXeNwlM0Ucf3cr7/u\n\tLLPw==", "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:subject:date:message-id:in-reply-to\n\t:references:reply-to;\n\tbh=kKo99JY69sqsDAQW6vWtxBehSgnXVqEE9ossRf7HUvk=;\n\tb=LGl/EGBx2U4DGlB1zq4H16zekKi3dl38+LjnKd0er9w/T/Hr2oxpd+01x3IqK+Z0Pv\n\tFn2pVQngDfAIXGtplPekr+CfTKV2TFn1IhLdxvQSEoTsIQZp9exzMiS38qw+UX0PLi5V\n\tu5VSobCX4kIuYn8bPvz2gl0bK2bWU23kLGvcCdm/qkjrK88z0vAE7EdgQF3zkbWhkBA4\n\tRSE+MYXh9tepOC1HU8JyYwcXgOzeiEIny3X4AFLsK/rWfBArRpwzNfy1rpWtuwSIZvI6\n\twTYUoKevEcu4UCbsAXOn5IRoJv7cRbKy+O/OvalqdXTpZt4ZHjOHeKpfqeQ8v4+d8+ma\n\tUf4Q==", "X-Gm-Message-State": "APjAAAVBDy/dcur/CSu07d5ozFmnBMQBDHOUEQE+UwzFdEea+/Zb5QN+\n\tu7gKYLnBk3L8N5mL3c/NNaws3gvvj+k=", "X-Google-Smtp-Source": "APXvYqwl5ovg7zax+elDYGc6t++ve3f5Tt+S/RFrQz8cji+WwpH20EtfXijEvUwyCEpl74WR7y8LYQ==", "X-Received": "by 2002:aed:3e94:: with SMTP id\n\tn20mr32502036qtf.268.1554836802013; \n\tTue, 09 Apr 2019 12:06:42 -0700 (PDT)", "From": "Vivian Kong <vivkong@gmail.com>", "X-Google-Original-From": "Vivian Kong <vivkong@ca.ibm.com>", "To": "dev@dpdk.org", "Date": "Tue, 9 Apr 2019 15:06:25 -0400", "Message-Id": "<20190409190630.31975-8-vivkong@ca.ibm.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20190409190630.31975-1-vivkong@ca.ibm.com>", "References": "<20190409190630.31975-1-vivkong@ca.ibm.com>", "Subject": "[dpdk-dev] [RFC 07/12] test: add support for s390x architecture", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "Reply-To": "vivkong@ca.ibm.com", "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": "Add big endian support for s390x architecture.\n\nSigned-off-by: Vivian Kong <vivkong@ca.ibm.com>\n---\n app/test/test_cmdline_ipaddr.c | 13 +++-\n app/test/test_cmdline_num.c | 111 +++++++++++++++++++++++++++++++++\n app/test/test_xmmt_ops.h | 14 +++++\n 3 files changed, 137 insertions(+), 1 deletion(-)", "diff": "diff --git a/app/test/test_cmdline_ipaddr.c b/app/test/test_cmdline_ipaddr.c\nindex 8ee7f6288..5e7629bba 100644\n--- a/app/test/test_cmdline_ipaddr.c\n+++ b/app/test/test_cmdline_ipaddr.c\n@@ -6,6 +6,7 @@\n #include <string.h>\n #include <inttypes.h>\n #include <netinet/in.h>\n+#include <rte_byteorder.h>\n \n #ifndef __linux__\n #ifndef __FreeBSD__\n@@ -22,7 +23,8 @@\n \n #include \"test_cmdline.h\"\n \n-#define IP4(a,b,c,d) {((uint32_t)(((a) & 0xff)) | \\\n+#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN\n+#define IP4(a, b, c, d) {((uint32_t)(((a) & 0xff)) | \\\n \t\t\t\t\t (((b) & 0xff) << 8) | \\\n \t\t\t\t\t (((c) & 0xff) << 16) | \\\n \t\t\t\t\t ((d) & 0xff) << 24)}\n@@ -30,6 +32,15 @@\n #define U16_SWAP(x) \\\n \t\t(((x & 0xFF) << 8) | ((x & 0xFF00) >> 8))\n \n+#else\n+#define IP4(a, b, c, d) {((uint32_t)(((a) & 0xff) << 24) | \\\n+\t\t\t\t\t (((b) & 0xff) << 16) | \\\n+\t\t\t\t\t (((c) & 0xff) << 8) | \\\n+\t\t\t\t\t ((d) & 0xff))}\n+\n+#define U16_SWAP(x) x\n+#endif\n+\n /* create IPv6 address, swapping bytes where needed */\n #ifndef s6_addr16\n # define s6_addr16 __u6_addr.__u6_addr16\ndiff --git a/app/test/test_cmdline_num.c b/app/test/test_cmdline_num.c\nindex 4c97caf3d..9e80397ac 100644\n--- a/app/test/test_cmdline_num.c\n+++ b/app/test/test_cmdline_num.c\n@@ -11,6 +11,8 @@\n #include <cmdline_parse.h>\n #include <cmdline_parse_num.h>\n \n+\n+#include <rte_byteorder.h>\n #include \"test_cmdline.h\"\n \n struct num_unsigned_str {\n@@ -451,6 +453,48 @@ test_parse_num_valid(void)\n \t\t\t/* check if result matches what it should have matched\n \t\t\t * since unsigned numbers don't care about number of bits, we can just convert\n \t\t\t * everything to uint64_t without any worries. */\n+\t\t\t#if RTE_BYTE_ORDER == RTE_BIG_ENDIAN\n+\t\t\tswitch (type) {\n+\t\t\tcase UINT8:\n+\t\t\t{\n+\t\t\t\tuint8_t *temp = (uint8_t *)&result;\n+\t\t\t\tresult = *temp;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t\tcase UINT16:\n+\t\t\t{\n+\t\t\t\tuint16_t *temp = (uint16_t *)&result;\n+\t\t\t\tresult = *temp;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t\tcase UINT32:\n+\t\t\t{\n+\t\t\t\tuint32_t *temp = (uint32_t *)&result;\n+\t\t\t\tresult = *temp;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t\tcase INT8:\n+\t\t\t{\n+\t\t\t\tint8_t *temp = (int8_t *)&result;\n+\t\t\t\tresult = *temp;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t\tcase INT16:\n+\t\t\t{\n+\t\t\t\tint16_t *temp = (int16_t *)&result;\n+\t\t\t\tresult = *temp;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t\tcase INT32:\n+\t\t\t{\n+\t\t\t\tint32_t *temp = (int32_t *)&result;\n+\t\t\t\tresult = *temp;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t\tdefault:\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t\t#endif\n \t\t\tif (ret > 0 && num_valid_positive_strs[i].result != result) {\n \t\t\t\tprintf(\"Error: parsing %s as %s failed: result mismatch!\\n\",\n \t\t\t\t\t\tnum_valid_positive_strs[i].str, buf);\n@@ -480,6 +524,7 @@ test_parse_num_valid(void)\n \t\t\t * the result is signed in this case, so we have to account for that */\n \t\t\tif (ret > 0) {\n \t\t\t\t/* detect negative */\n+\t\t\t\t#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN\n \t\t\t\tswitch (type) {\n \t\t\t\tcase INT8:\n \t\t\t\t\tresult = (int8_t) result;\n@@ -493,6 +538,30 @@ test_parse_num_valid(void)\n \t\t\t\tdefault:\n \t\t\t\t\tbreak;\n \t\t\t\t}\n+\t\t\t\t#else\n+\t\t\t\tswitch (type) {\n+\t\t\t\tcase INT8:\n+\t\t\t\t{\n+\t\t\t\t\tint8_t *temp = (int8_t *)&result;\n+\t\t\t\t\tresult = *temp;\n+\t\t\t\t\tbreak;\n+\t\t\t\t}\n+\t\t\t\tcase INT16:\n+\t\t\t\t{\n+\t\t\t\t\tint16_t *temp = (int16_t *)&result;\n+\t\t\t\t\tresult = *temp;\n+\t\t\t\t\tbreak;\n+\t\t\t\t}\n+\t\t\t\tcase INT32:\n+\t\t\t\t{\n+\t\t\t\t\tint32_t *temp = (int32_t *)&result;\n+\t\t\t\t\tresult = *temp;\n+\t\t\t\t\tbreak;\n+\t\t\t\t}\n+\t\t\t\tdefault:\n+\t\t\t\t\tbreak;\n+\t\t\t\t}\n+\t\t\t\t#endif\n \t\t\t\tif (num_valid_negative_strs[i].result == (int64_t) result)\n \t\t\t\t\tcontinue;\n \t\t\t\tprintf(\"Error: parsing %s as %s failed: result mismatch!\\n\",\n@@ -529,6 +598,48 @@ test_parse_num_valid(void)\n \t\t\t/* check if result matches what it should have matched\n \t\t\t * since unsigned numbers don't care about number of bits, we can just convert\n \t\t\t * everything to uint64_t without any worries. */\n+\t\t\t#if RTE_BYTE_ORDER == RTE_BIG_ENDIAN\n+\t\t\tswitch (type) {\n+\t\t\tcase UINT8:\n+\t\t\t{\n+\t\t\t\tuint8_t *temp = (uint8_t *)&result;\n+\t\t\t\tresult = *temp;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t\tcase UINT16:\n+\t\t\t{\n+\t\t\t\tuint16_t *temp = (uint16_t *)&result;\n+\t\t\t\tresult = *temp;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t\tcase UINT32:\n+\t\t\t{\n+\t\t\t\tuint32_t *temp = (uint32_t *)&result;\n+\t\t\t\tresult = *temp;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t\tcase INT8:\n+\t\t\t{\n+\t\t\t\tint8_t *temp = (int8_t *)&result;\n+\t\t\t\tresult = *temp;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t\tcase INT16:\n+\t\t\t{\n+\t\t\t\tint16_t *temp = (int16_t *)&result;\n+\t\t\t\tresult = *temp;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t\tcase INT32:\n+\t\t\t{\n+\t\t\t\tint32_t *temp = (int32_t *)&result;\n+\t\t\t\tresult = *temp;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t\tdefault:\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t\t#endif\n \t\t\tif (ret > 0 && num_garbage_positive_strs[i].result != result) {\n \t\t\t\tprintf(\"Error: parsing %s as %s failed: result mismatch!\\n\",\n \t\t\t\t\t\tnum_garbage_positive_strs[i].str, buf);\ndiff --git a/app/test/test_xmmt_ops.h b/app/test/test_xmmt_ops.h\nindex 8bcf0b261..6d8cd1998 100644\n--- a/app/test/test_xmmt_ops.h\n+++ b/app/test/test_xmmt_ops.h\n@@ -49,6 +49,20 @@ vect_set_epi32(int i3, int i2, int i1, int i0)\n \treturn data;\n }\n \n+#elif defined(RTE_ARCH_S390X)\n+\n+/* loads the xmm_t value from address p(does not need to be 16-byte aligned)*/\n+#define vect_loadu_sil128(p) vec_xld2(0, (signed int *)p)\n+\n+/* sets the 4 signed 32-bit integer values and returns the xmm_t variable */\n+static __rte_always_inline xmm_t\n+vect_set_epi32(int i3, int i2, int i1, int i0)\n+{\n+\txmm_t data = (xmm_t){i0, i1, i2, i3};\n+\n+\treturn data;\n+}\n+\n #endif\n \n #endif /* _TEST_XMMT_OPS_H_ */\n", "prefixes": [ "RFC", "07/12" ] }{ "id": 52502, "url": "