get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 52500,
    "url": "http://patches.dpdk.org/api/patches/52500/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190409190630.31975-6-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-6-vivkong@ca.ibm.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190409190630.31975-6-vivkong@ca.ibm.com",
    "date": "2019-04-09T19:06:23",
    "name": "[RFC,05/12] examples/l3fwd: add support for s390x architecture",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "335f906b228c824eee3ad4d486afd2d43e7d5db3",
    "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-6-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/52500/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/52500/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 7F7255B1E;\n\tTue,  9 Apr 2019 21:06:53 +0200 (CEST)",
            "from mail-qk1-f193.google.com (mail-qk1-f193.google.com\n\t[209.85.222.193]) by dpdk.org (Postfix) with ESMTP id 792445592\n\tfor <dev@dpdk.org>; Tue,  9 Apr 2019 21:06:40 +0200 (CEST)",
            "by mail-qk1-f193.google.com with SMTP id z76so10948216qkb.12\n\tfor <dev@dpdk.org>; Tue, 09 Apr 2019 12:06:40 -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.37 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:38 -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=AxiKphG82uiqiMvMNBUOW46rprdwlz2bWijFChj0I00=;\n\tb=XPKIafs4yAUSI0J+OkaBGjYhdoBcacHaWOS3IPVOVluDKmZWIGv8BoZ5h5GBwTYl2x\n\t5EgnbQo2gdfxyAmWpeBrKg/UvWPF+fVupxdli9qa7T5RhvndGi1m+H0Xbz0ZXxlMDusP\n\tu1gCggXhf6N0z0no/y2DuJyyyPELSSHzGNa+tqCCrEy9uYv8DgCy3VQLNTT+/PZuiIYG\n\tiN92THYNwJDms+EuTBToF40/yXHKUDrDTIgewq/4LZVgTv/glaA6gMALqyqBU021eC/F\n\tyoiF7TygIz+rgq/+zL9V8NS0CTwVej/ROm/yQNYTT/B4caHt7TJwF+IK6myAcHQuu8OL\n\txZjQ==",
        "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=AxiKphG82uiqiMvMNBUOW46rprdwlz2bWijFChj0I00=;\n\tb=Npuzo7u+8UZ4oA9KNJp8WuejBibc2+XgDGByBwNLsZWTvOfonbqa1UQAY9k0vm+D5k\n\t7Ugi6EAl5y7w0o753VvG22raWL0x6H73chLJNvwNXmFGLM6JR+nPoAcsplnPyG4nQbur\n\t+VEdED7x4hO9uD3RQ+m3os1kt/rPV2iJpr1zqvsw11ppKcA/XpiI1W6mTSupt4gx4bIJ\n\ty+WHxSEJ4ilsMysm5+Dux4L4HrcqOkOESG8sF2Lc7oRAPV03e20k78Sun1K2GEo4nRcZ\n\t14L/UP2pbu3reqNxB0Msja/jcayY5eTD5I9uvkMvbQamYLZjFdn+JM694mH+18/GU/eZ\n\tQYgA==",
        "X-Gm-Message-State": "APjAAAWetOmheWELzs1msY1Dcz7JMzzb64zHKwfjOa47N9iYgswKjkXx\n\tOpgdl3XyHC6oD13LfYJj56p/hFkrVoc=",
        "X-Google-Smtp-Source": "APXvYqwzBI6cfbZEzCTopb4+yTSP+BbLYJ8+buVU5dBa1SEQLqRYutKwT4EepQU5ecdMROni7NPl2Q==",
        "X-Received": "by 2002:a37:4f95:: with SMTP id\n\td143mr30222430qkb.253.1554836799343; \n\tTue, 09 Apr 2019 12:06:39 -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:23 -0400",
        "Message-Id": "<20190409190630.31975-6-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 05/12] examples/l3fwd: add support for s390x\n\tarchitecture",
        "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 s390x specific implementation.\n\nSigned-off-by: Vivian Kong <vivkong@ca.ibm.com>\n---\n examples/l3fwd/l3fwd_em.c        |   8 +\n examples/l3fwd/l3fwd_lpm_s390x.h | 137 ++++++++++++++++\n examples/l3fwd/l3fwd_s390x.h     | 259 +++++++++++++++++++++++++++++++\n 3 files changed, 404 insertions(+)\n create mode 100644 examples/l3fwd/l3fwd_lpm_s390x.h\n create mode 100644 examples/l3fwd/l3fwd_s390x.h",
    "diff": "diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c\nindex fa8f82be6..a486a9c57 100644\n--- a/examples/l3fwd/l3fwd_em.c\n+++ b/examples/l3fwd/l3fwd_em.c\n@@ -240,6 +240,14 @@ em_mask_key(void *key, xmm_t mask)\n \n \treturn vec_and(data, mask);\n }\n+#elif defined(RTE_MACHINE_CPUFLAG_ZARCH)\n+static inline xmm_t\n+em_mask_key(void *key, xmm_t mask)\n+{\n+\txmm_t data = (xmm_t) vec_xld2(0, (unsigned int *)(key));\n+\n+\treturn data + mask;\n+}\n #else\n #error No vector engine (SSE, NEON, ALTIVEC) available, check your toolchain\n #endif\ndiff --git a/examples/l3fwd/l3fwd_lpm_s390x.h b/examples/l3fwd/l3fwd_lpm_s390x.h\nnew file mode 100644\nindex 000000000..858f696ba\n--- /dev/null\n+++ b/examples/l3fwd/l3fwd_lpm_s390x.h\n@@ -0,0 +1,137 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2010-2016 Intel Corporation.\n+ * (c) Copyright IBM Corp. 2017, 2019\n+ */\n+#ifndef __L3FWD_LPM_S390X_H__\n+#define __L3FWD_LPM_S390X_H__\n+\n+#include \"l3fwd_s390x.h\"\n+\n+typedef unsigned char vector_unsigned_char\n+\t__attribute__((vector_size(16*sizeof(unsigned char))));\n+\n+/*\n+ * Read packet_type and destination IPV4 addresses from 4 mbufs.\n+ */\n+static inline void\n+processx4_step1(struct rte_mbuf *pkt[FWDSTEP],\n+\t\tvector_unsigned_int *dip,\n+\t\tuint32_t *ipv4_flag)\n+{\n+\tstruct ipv4_hdr *ipv4_hdr;\n+\tstruct ether_hdr *eth_hdr;\n+\tuint32_t x0, x1, x2, x3;\n+\n+\teth_hdr = rte_pktmbuf_mtod(pkt[0], struct ether_hdr *);\n+\tipv4_hdr = (struct ipv4_hdr *)(eth_hdr + 1);\n+\tx0 = ipv4_hdr->dst_addr;\n+\tipv4_flag[0] = pkt[0]->packet_type & RTE_PTYPE_L3_IPV4;\n+\n+\trte_compiler_barrier();\n+\teth_hdr = rte_pktmbuf_mtod(pkt[1], struct ether_hdr *);\n+\tipv4_hdr = (struct ipv4_hdr *)(eth_hdr + 1);\n+\tx1 = ipv4_hdr->dst_addr;\n+\tipv4_flag[0] &= pkt[1]->packet_type;\n+\n+\trte_compiler_barrier();\n+\teth_hdr = rte_pktmbuf_mtod(pkt[2], struct ether_hdr *);\n+\tipv4_hdr = (struct ipv4_hdr *)(eth_hdr + 1);\n+\tx2 = ipv4_hdr->dst_addr;\n+\tipv4_flag[0] &= pkt[2]->packet_type;\n+\n+\trte_compiler_barrier();\n+\teth_hdr = rte_pktmbuf_mtod(pkt[3], struct ether_hdr *);\n+\tipv4_hdr = (struct ipv4_hdr *)(eth_hdr + 1);\n+\tx3 = ipv4_hdr->dst_addr;\n+\tipv4_flag[0] &= pkt[3]->packet_type;\n+\n+\trte_compiler_barrier();\n+\tdip[0] = (vector_unsigned_int){x0, x1, x2, x3};\n+}\n+\n+/*\n+ * Lookup into LPM for destination port.\n+ * If lookup fails, use incoming port (portid) as destination port.\n+ */\n+static inline void\n+processx4_step2(const struct lcore_conf *qconf,\n+\t\tvector_unsigned_int dip,\n+\t\tuint32_t ipv4_flag,\n+\t\tuint8_t portid,\n+\t\tstruct rte_mbuf *pkt[FWDSTEP],\n+\t\tuint16_t dprt[FWDSTEP])\n+{\n+\trte_xmm_t dst;\n+\tconst vector_unsigned_char bswap_mask = (vector_unsigned_char){\n+\t\t\t\t\t\t\t3, 2, 1, 0,\n+\t\t\t\t\t\t\t7, 6, 5, 4,\n+\t\t\t\t\t\t\t11, 10, 9, 8,\n+\t\t\t\t\t\t\t15, 14, 13, 12};\n+\n+\t/* Byte swap 4 IPV4 addresses. */\n+\tdip = (vector_unsigned_int)vec_perm(*(vector_unsigned_char *)&dip,\n+\t\t\t\t\t(vector_unsigned_char){}, bswap_mask);\n+\n+\t/* if all 4 packets are IPV4. */\n+\tif (likely(ipv4_flag)) {\n+\t\trte_lpm_lookupx4(qconf->ipv4_lookup_struct, (xmm_t)dip,\n+\t\t\t(uint32_t *)&dst, portid);\n+\t\t/* get rid of unused upper 16 bit for each dport. */\n+\t\tdst.x = (xmm_t)vec_packs(dst.x, dst.x);\n+\t\t*(uint64_t *)dprt = dst.u64[0];\n+\t} else {\n+\t\tdst.x = (xmm_t)dip;\n+\t\tdprt[0] = lpm_get_dst_port_with_ipv4(qconf, pkt[0],\n+\t\t\t\t\t\t\tdst.u32[0], portid);\n+\t\tdprt[1] = lpm_get_dst_port_with_ipv4(qconf, pkt[1],\n+\t\t\t\t\t\t\tdst.u32[1], portid);\n+\t\tdprt[2] = lpm_get_dst_port_with_ipv4(qconf, pkt[2],\n+\t\t\t\t\t\t\tdst.u32[2], portid);\n+\t\tdprt[3] = lpm_get_dst_port_with_ipv4(qconf, pkt[3],\n+\t\t\t\t\t\t\tdst.u32[3], portid);\n+\t}\n+}\n+\n+/*\n+ * Buffer optimized handling of packets, invoked\n+ * from main_loop.\n+ */\n+static inline void\n+l3fwd_lpm_send_packets(int nb_rx, struct rte_mbuf **pkts_burst,\n+\t\t\tuint8_t portid, struct lcore_conf *qconf)\n+{\n+\tint32_t j;\n+\tuint16_t dst_port[MAX_PKT_BURST];\n+\tvector_unsigned_int dip[MAX_PKT_BURST / FWDSTEP];\n+\tuint32_t ipv4_flag[MAX_PKT_BURST / FWDSTEP];\n+\tconst int32_t k = RTE_ALIGN_FLOOR(nb_rx, FWDSTEP);\n+\n+\tfor (j = 0; j != k; j += FWDSTEP)\n+\t\tprocessx4_step1(&pkts_burst[j], &dip[j / FWDSTEP],\n+\t\t\t\t&ipv4_flag[j / FWDSTEP]);\n+\n+\tfor (j = 0; j != k; j += FWDSTEP)\n+\t\tprocessx4_step2(qconf, dip[j / FWDSTEP],\n+\t\t\t\tipv4_flag[j / FWDSTEP],\n+\t\t\t\tportid, &pkts_burst[j], &dst_port[j]);\n+\n+\t/* Classify last up to 3 packets one by one */\n+\tswitch (nb_rx % FWDSTEP) {\n+\tcase 3:\n+\t\tdst_port[j] = lpm_get_dst_port(qconf, pkts_burst[j], portid);\n+\t\tj++;\n+\t\t/* fall-through */\n+\tcase 2:\n+\t\tdst_port[j] = lpm_get_dst_port(qconf, pkts_burst[j], portid);\n+\t\tj++;\n+\t\t/* fall-through */\n+\tcase 1:\n+\t\tdst_port[j] = lpm_get_dst_port(qconf, pkts_burst[j], portid);\n+\t\tj++;\n+\t\t/* fall-through */\n+\t}\n+\n+\tsend_packets_multi(qconf, pkts_burst, dst_port, nb_rx);\n+}\n+\n+#endif /* __L3FWD_LPM_S390X_H__ */\ndiff --git a/examples/l3fwd/l3fwd_s390x.h b/examples/l3fwd/l3fwd_s390x.h\nnew file mode 100644\nindex 000000000..d027092a4\n--- /dev/null\n+++ b/examples/l3fwd/l3fwd_s390x.h\n@@ -0,0 +1,259 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2016 Intel Corporation.\n+ * (c) Copyright IBM Corp. 2017, 2019\n+ */\n+#ifndef _L3FWD_S390X_H_\n+#define _L3FWD_S390X_H_\n+\n+#include \"l3fwd.h\"\n+#include \"l3fwd_common.h\"\n+\n+#define vec_sro(a, b) vec_srb(a, (b) << 64) // Vector Shift Right by Octet\n+typedef unsigned int vector_unsigned_int\n+\t__attribute__((vector_size(4*sizeof(unsigned int))));\n+typedef unsigned short vector_unsigned_short\n+\t__attribute__((vector_size(8*sizeof(unsigned short))));\n+\n+/*\n+ * Update source and destination MAC addresses in the ethernet header.\n+ * Perform RFC1812 checks and updates for IPV4 packets.\n+ */\n+static inline void\n+processx4_step3(struct rte_mbuf *pkt[FWDSTEP], uint16_t dst_port[FWDSTEP])\n+{\n+\tvector_unsigned_int te[FWDSTEP];\n+\tvector_unsigned_int ve[FWDSTEP];\n+\tvector_unsigned_int *p[FWDSTEP];\n+\n+\tp[0] = rte_pktmbuf_mtod(pkt[0], vector_unsigned_int *);\n+\tp[1] = rte_pktmbuf_mtod(pkt[1], vector_unsigned_int *);\n+\tp[2] = rte_pktmbuf_mtod(pkt[2], vector_unsigned_int *);\n+\tp[3] = rte_pktmbuf_mtod(pkt[3], vector_unsigned_int *);\n+\n+\tve[0] = (vector_unsigned_int)val_eth[dst_port[0]];\n+\tte[0] = *p[0];\n+\n+\tve[1] = (vector_unsigned_int)val_eth[dst_port[1]];\n+\tte[1] = *p[1];\n+\n+\tve[2] = (vector_unsigned_int)val_eth[dst_port[2]];\n+\tte[2] = *p[2];\n+\n+\tve[3] = (vector_unsigned_int)val_eth[dst_port[3]];\n+\tte[3] = *p[3];\n+\n+\t/* Update first 12 bytes, keep rest bytes intact. */\n+\tte[0] = (vector_unsigned_int)vec_sel(\n+\t\t\t(vector_unsigned_short)ve[0],\n+\t\t\t(vector_unsigned_short)te[0],\n+\t\t\t(vector_unsigned_short) {0, 0, 0, 0,\n+\t\t\t\t\t\t0, 0, 0xffff, 0xffff});\n+\n+\tte[1] = (vector_unsigned_int)vec_sel(\n+\t\t\t(vector_unsigned_short)ve[1],\n+\t\t\t(vector_unsigned_short)te[1],\n+\t\t\t(vector_unsigned_short) {0, 0, 0, 0,\n+\t\t\t\t\t\t0, 0, 0xffff, 0xffff});\n+\n+\tte[2] = (vector_unsigned_int)vec_sel(\n+\t\t\t(vector_unsigned_short)ve[2],\n+\t\t\t(vector_unsigned_short)te[2],\n+\t\t\t(vector_unsigned_short) {0, 0, 0, 0, 0,\n+\t\t\t\t\t\t0, 0xffff, 0xffff});\n+\n+\tte[3] = (vector_unsigned_int)vec_sel(\n+\t\t\t(vector_unsigned_short)ve[3],\n+\t\t\t(vector_unsigned_short)te[3],\n+\t\t\t(vector_unsigned_short) {0, 0, 0, 0,\n+\t\t\t\t\t\t0, 0, 0xffff, 0xffff});\n+\n+\t*p[0] = te[0];\n+\t*p[1] = te[1];\n+\t*p[2] = te[2];\n+\t*p[3] = te[3];\n+\n+\trfc1812_process((struct ipv4_hdr *)((struct ether_hdr *)p[0] + 1),\n+\t\t&dst_port[0], pkt[0]->packet_type);\n+\trfc1812_process((struct ipv4_hdr *)((struct ether_hdr *)p[1] + 1),\n+\t\t&dst_port[1], pkt[1]->packet_type);\n+\trfc1812_process((struct ipv4_hdr *)((struct ether_hdr *)p[2] + 1),\n+\t\t&dst_port[2], pkt[2]->packet_type);\n+\trfc1812_process((struct ipv4_hdr *)((struct ether_hdr *)p[3] + 1),\n+\t\t&dst_port[3], pkt[3]->packet_type);\n+}\n+\n+/*\n+ * Group consecutive packets with the same destination port in bursts of 4.\n+ * Suppose we have array of destination ports:\n+ * dst_port[] = {a, b, c, d,, e, ... }\n+ * dp1 should contain: <a, b, c, d>, dp2: <b, c, d, e>.\n+ * We doing 4 comparisons at once and the result is 4 bit mask.\n+ * This mask is used as an index into prebuild array of pnum values.\n+ */\n+static inline uint16_t *\n+port_groupx4(uint16_t pn[FWDSTEP + 1], uint16_t *lp, vector_unsigned_short dp1,\n+\tvector_unsigned_short dp2)\n+{\n+\tunion {\n+\t\tuint16_t u16[FWDSTEP + 1];\n+\t\tuint64_t u64;\n+\t} *pnum = (void *)pn;\n+\n+\tint32_t v;\n+\n+\tv = vec_any_eq(dp1, dp2);\n+\n+\n+\t/* update last port counter. */\n+\tlp[0] += gptbl[v].lpv;\n+\n+\t/* if dest port value has changed. */\n+\tif (v != GRPMSK) {\n+\t\tpnum->u64 = gptbl[v].pnum;\n+\t\tpnum->u16[FWDSTEP] = 1;\n+\t\tlp = pnum->u16 + gptbl[v].idx;\n+\t}\n+\n+\treturn lp;\n+}\n+\n+/**\n+ * Process one packet:\n+ * Update source and destination MAC addresses in the ethernet header.\n+ * Perform RFC1812 checks and updates for IPV4 packets.\n+ */\n+static inline void\n+process_packet(struct rte_mbuf *pkt, uint16_t *dst_port)\n+{\n+\tstruct ether_hdr *eth_hdr;\n+\tvector_unsigned_int te, ve;\n+\n+\teth_hdr = rte_pktmbuf_mtod(pkt, struct ether_hdr *);\n+\n+\tte = *(vector_unsigned_int *)eth_hdr;\n+\tve = (vector_unsigned_int)val_eth[dst_port[0]];\n+\n+\trfc1812_process((struct ipv4_hdr *)(eth_hdr + 1), dst_port,\n+\t\t\tpkt->packet_type);\n+\n+\t/* dynamically vec_sel te and ve for MASK_ETH (0x3f) */\n+\tte = (vector_unsigned_int)vec_sel(\n+\t\t(vector_unsigned_short)ve,\n+\t\t(vector_unsigned_short)te,\n+\t\t(vector_unsigned_short){0, 0, 0, 0,\n+\t\t\t\t\t0, 0, 0xffff, 0xffff});\n+\n+\t*(vector_unsigned_int *)eth_hdr = te;\n+}\n+\n+/**\n+ * Send packets burst from pkts_burst to the ports in dst_port array\n+ */\n+static __rte_always_inline void\n+send_packets_multi(struct lcore_conf *qconf, struct rte_mbuf **pkts_burst,\n+\t\tuint16_t dst_port[MAX_PKT_BURST], int nb_rx)\n+{\n+\tint32_t k;\n+\tint j = 0;\n+\tuint16_t dlp;\n+\tuint16_t *lp;\n+\tuint16_t pnum[MAX_PKT_BURST + 1];\n+\n+\t/*\n+\t * Finish packet processing and group consecutive\n+\t * packets with the same destination port.\n+\t */\n+\tk = RTE_ALIGN_FLOOR(nb_rx, FWDSTEP);\n+\tif (k != 0) {\n+\t\tvector_unsigned_short dp1, dp2;\n+\n+\t\tlp = pnum;\n+\t\tlp[0] = 1;\n+\n+\t\tprocessx4_step3(pkts_burst, dst_port);\n+\n+\t\t/* dp1: <d[0], d[1], d[2], d[3], ... > */\n+\t\tdp1 = *(vector_unsigned_short *)dst_port;\n+\n+\t\tfor (j = FWDSTEP; j != k; j += FWDSTEP) {\n+\t\t\tprocessx4_step3(&pkts_burst[j], &dst_port[j]);\n+\n+\t\t\t/*\n+\t\t\t * dp2:\n+\t\t\t * <d[j-3], d[j-2], d[j-1], d[j], ... >\n+\t\t\t */\n+\t\t\tdp2 = *((vector_unsigned_short *)\n+\t\t\t\t\t&dst_port[j - FWDSTEP + 1]);\n+\t\t\tlp  = port_groupx4(&pnum[j - FWDSTEP], lp, dp1, dp2);\n+\n+\t\t\t/*\n+\t\t\t * dp1:\n+\t\t\t * <d[j], d[j+1], d[j+2], d[j+3], ... >\n+\t\t\t */\n+\t\t\tdp1 = vec_sro(dp2, (vector unsigned char) {\n+\t\t\t\t0, 0, 0, 0, 0, 0, 0, 0,\n+\t\t\t\t0, 0, 0, (FWDSTEP - 1) * sizeof(dst_port[0])});\n+\t\t}\n+\n+\t\t/*\n+\t\t * dp2: <d[j-3], d[j-2], d[j-1], d[j-1], ... >\n+\t\t */\n+\t\tdp2 = vec_perm(dp1, (vector_unsigned_short){},\n+\t\t\t\t(vector unsigned char) {0xf9});\n+\t\tlp  = port_groupx4(&pnum[j - FWDSTEP], lp, dp1, dp2);\n+\n+\t\t/*\n+\t\t * remove values added by the last repeated\n+\t\t * dst port.\n+\t\t */\n+\t\tlp[0]--;\n+\t\tdlp = dst_port[j - 1];\n+\t} else {\n+\t\t/* set dlp and lp to the never used values. */\n+\t\tdlp = BAD_PORT - 1;\n+\t\tlp = pnum + MAX_PKT_BURST;\n+\t}\n+\n+\t/* Process up to last 3 packets one by one. */\n+\tswitch (nb_rx % FWDSTEP) {\n+\tcase 3:\n+\t\tprocess_packet(pkts_burst[j], dst_port + j);\n+\t\tGROUP_PORT_STEP(dlp, dst_port, lp, pnum, j);\n+\t\tj++;\n+\t\t/* fall-through */\n+\tcase 2:\n+\t\tprocess_packet(pkts_burst[j], dst_port + j);\n+\t\tGROUP_PORT_STEP(dlp, dst_port, lp, pnum, j);\n+\t\tj++;\n+\t\t/* fall-through */\n+\tcase 1:\n+\t\tprocess_packet(pkts_burst[j], dst_port + j);\n+\t\tGROUP_PORT_STEP(dlp, dst_port, lp, pnum, j);\n+\t\tj++;\n+\t}\n+\n+\t/*\n+\t * Send packets out, through destination port.\n+\t * Consecutive packets with the same destination port\n+\t * are already grouped together.\n+\t * If destination port for the packet equals BAD_PORT,\n+\t * then free the packet without sending it out.\n+\t */\n+\tfor (j = 0; j < nb_rx; j += k) {\n+\n+\t\tint32_t m;\n+\t\tuint16_t pn;\n+\n+\t\tpn = dst_port[j];\n+\t\tk = pnum[j];\n+\n+\t\tif (likely(pn != BAD_PORT))\n+\t\t\tsend_packetsx4(qconf, pn, pkts_burst + j, k);\n+\t\telse\n+\t\t\tfor (m = j; m != j + k; m++)\n+\t\t\t\trte_pktmbuf_free(pkts_burst[m]);\n+\n+\t}\n+}\n+\n+#endif /* _L3FWD_S390X_H_ */\n",
    "prefixes": [
        "RFC",
        "05/12"
    ]
}