get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 6570,
    "url": "http://patches.dpdk.org/api/patches/6570/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1437667927-18113-1-git-send-email-pablo.de.lara.guarch@intel.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": "<1437667927-18113-1-git-send-email-pablo.de.lara.guarch@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1437667927-18113-1-git-send-email-pablo.de.lara.guarch@intel.com",
    "date": "2015-07-23T16:12:07",
    "name": "[dpdk-dev] examples/l3fwd: increase lookup burst size to 8",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "6b2bb9f9bd4602153896f35457bf68c18e28d84a",
    "submitter": {
        "id": 9,
        "url": "http://patches.dpdk.org/api/people/9/?format=api",
        "name": "De Lara Guarch, Pablo",
        "email": "pablo.de.lara.guarch@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1437667927-18113-1-git-send-email-pablo.de.lara.guarch@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/6570/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/6570/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 22AD3C3A8;\n\tThu, 23 Jul 2015 18:12:22 +0200 (CEST)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id 69E15C394\n\tfor <dev@dpdk.org>; Thu, 23 Jul 2015 18:12:19 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga103.fm.intel.com with ESMTP; 23 Jul 2015 09:12:09 -0700",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby FMSMGA003.fm.intel.com with ESMTP; 23 Jul 2015 09:12:08 -0700",
            "from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com\n\t[10.237.217.46])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tt6NGC8TD003798 for <dev@dpdk.org>; Thu, 23 Jul 2015 17:12:08 +0100",
            "from sivswdev02.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev02.ir.intel.com with ESMTP id t6NGC7Bb018147\n\tfor <dev@dpdk.org>; Thu, 23 Jul 2015 17:12:07 +0100",
            "(from pdelarax@localhost)\n\tby sivswdev02.ir.intel.com with  id t6NGC7hx018143\n\tfor dev@dpdk.org; Thu, 23 Jul 2015 17:12:07 +0100"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.15,531,1432623600\"; d=\"scan'208\";a=\"529087019\"",
        "From": "Pablo de Lara <pablo.de.lara.guarch@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Thu, 23 Jul 2015 17:12:07 +0100",
        "Message-Id": "<1437667927-18113-1-git-send-email-pablo.de.lara.guarch@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "Subject": "[dpdk-dev] [PATCH] examples/l3fwd: increase lookup burst size to 8",
        "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": "With the new hash implementation, the minimum lookup burst size\nto get good performance is 8, since its internal pipeline\nconsists of 4 stages of 2 entries each, so to avoid\nduplication, burst size should be 8 or more entries.\n\nSigned-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>\n---\n examples/l3fwd/main.c | 234 ++++++++++++++++++++++++++++++++++++++++----------\n 1 file changed, 191 insertions(+), 43 deletions(-)",
    "diff": "diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c\nindex 45676ba..c8a0f66 100644\n--- a/examples/l3fwd/main.c\n+++ b/examples/l3fwd/main.c\n@@ -1,7 +1,7 @@\n /*-\n  *   BSD LICENSE\n  *\n- *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n+ *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.\n  *   All rights reserved.\n  *\n  *   Redistribution and use in source and binary forms, with or without\n@@ -731,26 +731,34 @@ static inline void l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid,\n #if ((APP_LOOKUP_METHOD == APP_LOOKUP_EXACT_MATCH) && \\\n \t(ENABLE_MULTI_BUFFER_OPTIMIZE == 1))\n \n-#define MASK_ALL_PKTS    0xf\n-#define EXECLUDE_1ST_PKT 0xe\n-#define EXECLUDE_2ND_PKT 0xd\n-#define EXECLUDE_3RD_PKT 0xb\n-#define EXECLUDE_4TH_PKT 0x7\n+#define MASK_ALL_PKTS    0xff\n+#define EXCLUDE_1ST_PKT 0xfe\n+#define EXCLUDE_2ND_PKT 0xfd\n+#define EXCLUDE_3RD_PKT 0xfb\n+#define EXCLUDE_4TH_PKT 0xf7\n+#define EXCLUDE_5TH_PKT 0xef\n+#define EXCLUDE_6TH_PKT 0xdf\n+#define EXCLUDE_7TH_PKT 0xbf\n+#define EXCLUDE_8TH_PKT 0x7f\n \n static inline void\n-simple_ipv4_fwd_4pkts(struct rte_mbuf* m[4], uint8_t portid, struct lcore_conf *qconf)\n+simple_ipv4_fwd_8pkts(struct rte_mbuf *m[8], uint8_t portid, struct lcore_conf *qconf)\n {\n-\tstruct ether_hdr *eth_hdr[4];\n-\tstruct ipv4_hdr *ipv4_hdr[4];\n-\tuint8_t dst_port[4];\n-\tint32_t ret[4];\n-\tunion ipv4_5tuple_host key[4];\n-\t__m128i data[4];\n+\tstruct ether_hdr *eth_hdr[8];\n+\tstruct ipv4_hdr *ipv4_hdr[8];\n+\tuint8_t dst_port[8];\n+\tint32_t ret[8];\n+\tunion ipv4_5tuple_host key[8];\n+\t__m128i data[8];\n \n \teth_hdr[0] = rte_pktmbuf_mtod(m[0], struct ether_hdr *);\n \teth_hdr[1] = rte_pktmbuf_mtod(m[1], struct ether_hdr *);\n \teth_hdr[2] = rte_pktmbuf_mtod(m[2], struct ether_hdr *);\n \teth_hdr[3] = rte_pktmbuf_mtod(m[3], struct ether_hdr *);\n+\teth_hdr[4] = rte_pktmbuf_mtod(m[4], struct ether_hdr *);\n+\teth_hdr[5] = rte_pktmbuf_mtod(m[5], struct ether_hdr *);\n+\teth_hdr[6] = rte_pktmbuf_mtod(m[6], struct ether_hdr *);\n+\teth_hdr[7] = rte_pktmbuf_mtod(m[7], struct ether_hdr *);\n \n \t/* Handle IPv4 headers.*/\n \tipv4_hdr[0] = rte_pktmbuf_mtod_offset(m[0], struct ipv4_hdr *,\n@@ -761,32 +769,56 @@ simple_ipv4_fwd_4pkts(struct rte_mbuf* m[4], uint8_t portid, struct lcore_conf *\n \t\t\t\t\t      sizeof(struct ether_hdr));\n \tipv4_hdr[3] = rte_pktmbuf_mtod_offset(m[3], struct ipv4_hdr *,\n \t\t\t\t\t      sizeof(struct ether_hdr));\n+\tipv4_hdr[4] = rte_pktmbuf_mtod_offset(m[4], struct ipv4_hdr *,\n+\t\t\t\t\t      sizeof(struct ether_hdr));\n+\tipv4_hdr[5] = rte_pktmbuf_mtod_offset(m[5], struct ipv4_hdr *,\n+\t\t\t\t\t      sizeof(struct ether_hdr));\n+\tipv4_hdr[6] = rte_pktmbuf_mtod_offset(m[6], struct ipv4_hdr *,\n+\t\t\t\t\t      sizeof(struct ether_hdr));\n+\tipv4_hdr[7] = rte_pktmbuf_mtod_offset(m[7], struct ipv4_hdr *,\n+\t\t\t\t\t      sizeof(struct ether_hdr));\n \n #ifdef DO_RFC_1812_CHECKS\n \t/* Check to make sure the packet is valid (RFC1812) */\n \tuint8_t valid_mask = MASK_ALL_PKTS;\n \tif (is_valid_ipv4_pkt(ipv4_hdr[0], m[0]->pkt_len) < 0) {\n \t\trte_pktmbuf_free(m[0]);\n-\t\tvalid_mask &= EXECLUDE_1ST_PKT;\n+\t\tvalid_mask &= EXCLUDE_1ST_PKT;\n \t}\n \tif (is_valid_ipv4_pkt(ipv4_hdr[1], m[1]->pkt_len) < 0) {\n \t\trte_pktmbuf_free(m[1]);\n-\t\tvalid_mask &= EXECLUDE_2ND_PKT;\n+\t\tvalid_mask &= EXCLUDE_2ND_PKT;\n \t}\n \tif (is_valid_ipv4_pkt(ipv4_hdr[2], m[2]->pkt_len) < 0) {\n \t\trte_pktmbuf_free(m[2]);\n-\t\tvalid_mask &= EXECLUDE_3RD_PKT;\n+\t\tvalid_mask &= EXCLUDE_3RD_PKT;\n \t}\n \tif (is_valid_ipv4_pkt(ipv4_hdr[3], m[3]->pkt_len) < 0) {\n \t\trte_pktmbuf_free(m[3]);\n-\t\tvalid_mask &= EXECLUDE_4TH_PKT;\n+\t\tvalid_mask &= EXCLUDE_4TH_PKT;\n+\t}\n+\tif (is_valid_ipv4_pkt(ipv4_hdr[4], m[4]->pkt_len) < 0) {\n+\t\trte_pktmbuf_free(m[4]);\n+\t\tvalid_mask &= EXCLUDE_5TH_PKT;\n+\t}\n+\tif (is_valid_ipv4_pkt(ipv4_hdr[5], m[5]->pkt_len) < 0) {\n+\t\trte_pktmbuf_free(m[5]);\n+\t\tvalid_mask &= EXCLUDE_6TH_PKT;\n+\t}\n+\tif (is_valid_ipv4_pkt(ipv4_hdr[6], m[6]->pkt_len) < 0) {\n+\t\trte_pktmbuf_free(m[6]);\n+\t\tvalid_mask &= EXCLUDE_7TH_PKT;\n+\t}\n+\tif (is_valid_ipv4_pkt(ipv4_hdr[7], m[7]->pkt_len) < 0) {\n+\t\trte_pktmbuf_free(m[7]);\n+\t\tvalid_mask &= EXCLUDE_8TH_PKT;\n \t}\n \tif (unlikely(valid_mask != MASK_ALL_PKTS)) {\n \t\tif (valid_mask == 0){\n \t\t\treturn;\n \t\t} else {\n \t\t\tuint8_t i = 0;\n-\t\t\tfor (i = 0; i < 4; i++) {\n+\t\t\tfor (i = 0; i < 8; i++) {\n \t\t\t\tif ((0x1 << i) & valid_mask) {\n \t\t\t\t\tl3fwd_simple_forward(m[i], portid, qconf);\n \t\t\t\t}\n@@ -796,22 +828,52 @@ simple_ipv4_fwd_4pkts(struct rte_mbuf* m[4], uint8_t portid, struct lcore_conf *\n \t}\n #endif // End of #ifdef DO_RFC_1812_CHECKS\n \n-\tdata[0] = _mm_loadu_si128(rte_pktmbuf_mtod_offset(m[0], __m128i *, sizeof(struct ether_hdr) + offsetof(struct ipv4_hdr, time_to_live)));\n-\tdata[1] = _mm_loadu_si128(rte_pktmbuf_mtod_offset(m[1], __m128i *, sizeof(struct ether_hdr) + offsetof(struct ipv4_hdr, time_to_live)));\n-\tdata[2] = _mm_loadu_si128(rte_pktmbuf_mtod_offset(m[2], __m128i *, sizeof(struct ether_hdr) + offsetof(struct ipv4_hdr, time_to_live)));\n-\tdata[3] = _mm_loadu_si128(rte_pktmbuf_mtod_offset(m[3], __m128i *, sizeof(struct ether_hdr) + offsetof(struct ipv4_hdr, time_to_live)));\n+\tdata[0] = _mm_loadu_si128(rte_pktmbuf_mtod_offset(m[0], __m128i *,\n+\t\t\t\t\tsizeof(struct ether_hdr) +\n+\t\t\t\t\toffsetof(struct ipv4_hdr, time_to_live)));\n+\tdata[1] = _mm_loadu_si128(rte_pktmbuf_mtod_offset(m[1], __m128i *,\n+\t\t\t\t\tsizeof(struct ether_hdr) +\n+\t\t\t\t\toffsetof(struct ipv4_hdr, time_to_live)));\n+\tdata[2] = _mm_loadu_si128(rte_pktmbuf_mtod_offset(m[2], __m128i *,\n+\t\t\t\t\tsizeof(struct ether_hdr) +\n+\t\t\t\t\toffsetof(struct ipv4_hdr, time_to_live)));\n+\tdata[3] = _mm_loadu_si128(rte_pktmbuf_mtod_offset(m[3], __m128i *,\n+\t\t\t\t\tsizeof(struct ether_hdr) +\n+\t\t\t\t\toffsetof(struct ipv4_hdr, time_to_live)));\n+\tdata[4] = _mm_loadu_si128(rte_pktmbuf_mtod_offset(m[4], __m128i *,\n+\t\t\t\t\tsizeof(struct ether_hdr) +\n+\t\t\t\t\toffsetof(struct ipv4_hdr, time_to_live)));\n+\tdata[5] = _mm_loadu_si128(rte_pktmbuf_mtod_offset(m[5], __m128i *,\n+\t\t\t\t\tsizeof(struct ether_hdr) +\n+\t\t\t\t\toffsetof(struct ipv4_hdr, time_to_live)));\n+\tdata[6] = _mm_loadu_si128(rte_pktmbuf_mtod_offset(m[6], __m128i *,\n+\t\t\t\t\tsizeof(struct ether_hdr) +\n+\t\t\t\t\toffsetof(struct ipv4_hdr, time_to_live)));\n+\tdata[7] = _mm_loadu_si128(rte_pktmbuf_mtod_offset(m[7], __m128i *,\n+\t\t\t\t\tsizeof(struct ether_hdr) +\n+\t\t\t\t\toffsetof(struct ipv4_hdr, time_to_live)));\n \n \tkey[0].xmm = _mm_and_si128(data[0], mask0);\n \tkey[1].xmm = _mm_and_si128(data[1], mask0);\n \tkey[2].xmm = _mm_and_si128(data[2], mask0);\n \tkey[3].xmm = _mm_and_si128(data[3], mask0);\n+\tkey[4].xmm = _mm_and_si128(data[4], mask0);\n+\tkey[5].xmm = _mm_and_si128(data[5], mask0);\n+\tkey[6].xmm = _mm_and_si128(data[6], mask0);\n+\tkey[7].xmm = _mm_and_si128(data[7], mask0);\n+\n+\tconst void *key_array[8] = {&key[0], &key[1], &key[2], &key[3],\n+\t\t\t\t&key[4], &key[5], &key[6], &key[7]};\n \n-\tconst void *key_array[4] = {&key[0], &key[1], &key[2],&key[3]};\n-\trte_hash_lookup_multi(qconf->ipv4_lookup_struct, &key_array[0], 4, ret);\n+\trte_hash_lookup_multi(qconf->ipv4_lookup_struct, &key_array[0], 8, ret);\n \tdst_port[0] = (uint8_t) ((ret[0] < 0) ? portid : ipv4_l3fwd_out_if[ret[0]]);\n \tdst_port[1] = (uint8_t) ((ret[1] < 0) ? portid : ipv4_l3fwd_out_if[ret[1]]);\n \tdst_port[2] = (uint8_t) ((ret[2] < 0) ? portid : ipv4_l3fwd_out_if[ret[2]]);\n \tdst_port[3] = (uint8_t) ((ret[3] < 0) ? portid : ipv4_l3fwd_out_if[ret[3]]);\n+\tdst_port[4] = (uint8_t) ((ret[4] < 0) ? portid : ipv4_l3fwd_out_if[ret[4]]);\n+\tdst_port[5] = (uint8_t) ((ret[5] < 0) ? portid : ipv4_l3fwd_out_if[ret[5]]);\n+\tdst_port[6] = (uint8_t) ((ret[6] < 0) ? portid : ipv4_l3fwd_out_if[ret[6]]);\n+\tdst_port[7] = (uint8_t) ((ret[7] < 0) ? portid : ipv4_l3fwd_out_if[ret[7]]);\n \n \tif (dst_port[0] >= RTE_MAX_ETHPORTS || (enabled_port_mask & 1 << dst_port[0]) == 0)\n \t\tdst_port[0] = portid;\n@@ -821,6 +883,14 @@ simple_ipv4_fwd_4pkts(struct rte_mbuf* m[4], uint8_t portid, struct lcore_conf *\n \t\tdst_port[2] = portid;\n \tif (dst_port[3] >= RTE_MAX_ETHPORTS || (enabled_port_mask & 1 << dst_port[3]) == 0)\n \t\tdst_port[3] = portid;\n+\tif (dst_port[4] >= RTE_MAX_ETHPORTS || (enabled_port_mask & 1 << dst_port[4]) == 0)\n+\t\tdst_port[4] = portid;\n+\tif (dst_port[5] >= RTE_MAX_ETHPORTS || (enabled_port_mask & 1 << dst_port[5]) == 0)\n+\t\tdst_port[5] = portid;\n+\tif (dst_port[6] >= RTE_MAX_ETHPORTS || (enabled_port_mask & 1 << dst_port[6]) == 0)\n+\t\tdst_port[6] = portid;\n+\tif (dst_port[7] >= RTE_MAX_ETHPORTS || (enabled_port_mask & 1 << dst_port[7]) == 0)\n+\t\tdst_port[7] = portid;\n \n #ifdef DO_RFC_1812_CHECKS\n \t/* Update time to live and header checksum */\n@@ -832,6 +902,14 @@ simple_ipv4_fwd_4pkts(struct rte_mbuf* m[4], uint8_t portid, struct lcore_conf *\n \t++(ipv4_hdr[1]->hdr_checksum);\n \t++(ipv4_hdr[2]->hdr_checksum);\n \t++(ipv4_hdr[3]->hdr_checksum);\n+\t--(ipv4_hdr[4]->time_to_live);\n+\t--(ipv4_hdr[5]->time_to_live);\n+\t--(ipv4_hdr[6]->time_to_live);\n+\t--(ipv4_hdr[7]->time_to_live);\n+\t++(ipv4_hdr[4]->hdr_checksum);\n+\t++(ipv4_hdr[5]->hdr_checksum);\n+\t++(ipv4_hdr[6]->hdr_checksum);\n+\t++(ipv4_hdr[7]->hdr_checksum);\n #endif\n \n \t/* dst addr */\n@@ -839,17 +917,29 @@ simple_ipv4_fwd_4pkts(struct rte_mbuf* m[4], uint8_t portid, struct lcore_conf *\n \t*(uint64_t *)&eth_hdr[1]->d_addr = dest_eth_addr[dst_port[1]];\n \t*(uint64_t *)&eth_hdr[2]->d_addr = dest_eth_addr[dst_port[2]];\n \t*(uint64_t *)&eth_hdr[3]->d_addr = dest_eth_addr[dst_port[3]];\n+\t*(uint64_t *)&eth_hdr[4]->d_addr = dest_eth_addr[dst_port[4]];\n+\t*(uint64_t *)&eth_hdr[5]->d_addr = dest_eth_addr[dst_port[5]];\n+\t*(uint64_t *)&eth_hdr[6]->d_addr = dest_eth_addr[dst_port[6]];\n+\t*(uint64_t *)&eth_hdr[7]->d_addr = dest_eth_addr[dst_port[7]];\n \n \t/* src addr */\n \tether_addr_copy(&ports_eth_addr[dst_port[0]], &eth_hdr[0]->s_addr);\n \tether_addr_copy(&ports_eth_addr[dst_port[1]], &eth_hdr[1]->s_addr);\n \tether_addr_copy(&ports_eth_addr[dst_port[2]], &eth_hdr[2]->s_addr);\n \tether_addr_copy(&ports_eth_addr[dst_port[3]], &eth_hdr[3]->s_addr);\n+\tether_addr_copy(&ports_eth_addr[dst_port[4]], &eth_hdr[4]->s_addr);\n+\tether_addr_copy(&ports_eth_addr[dst_port[5]], &eth_hdr[5]->s_addr);\n+\tether_addr_copy(&ports_eth_addr[dst_port[6]], &eth_hdr[6]->s_addr);\n+\tether_addr_copy(&ports_eth_addr[dst_port[7]], &eth_hdr[7]->s_addr);\n \n \tsend_single_packet(m[0], (uint8_t)dst_port[0]);\n \tsend_single_packet(m[1], (uint8_t)dst_port[1]);\n \tsend_single_packet(m[2], (uint8_t)dst_port[2]);\n \tsend_single_packet(m[3], (uint8_t)dst_port[3]);\n+\tsend_single_packet(m[4], (uint8_t)dst_port[4]);\n+\tsend_single_packet(m[5], (uint8_t)dst_port[5]);\n+\tsend_single_packet(m[6], (uint8_t)dst_port[6]);\n+\tsend_single_packet(m[7], (uint8_t)dst_port[7]);\n \n }\n \n@@ -866,18 +956,22 @@ static inline void get_ipv6_5tuple(struct rte_mbuf* m0, __m128i mask0, __m128i m\n }\n \n static inline void\n-simple_ipv6_fwd_4pkts(struct rte_mbuf* m[4], uint8_t portid, struct lcore_conf *qconf)\n+simple_ipv6_fwd_8pkts(struct rte_mbuf *m[8], uint8_t portid, struct lcore_conf *qconf)\n {\n-\tstruct ether_hdr *eth_hdr[4];\n-\t__attribute__((unused)) struct ipv6_hdr *ipv6_hdr[4];\n-\tuint8_t dst_port[4];\n-\tint32_t ret[4];\n-\tunion ipv6_5tuple_host key[4];\n+\tstruct ether_hdr *eth_hdr[8];\n+\t__attribute__((unused)) struct ipv6_hdr *ipv6_hdr[8];\n+\tuint8_t dst_port[8];\n+\tint32_t ret[8];\n+\tunion ipv6_5tuple_host key[8];\n \n \teth_hdr[0] = rte_pktmbuf_mtod(m[0], struct ether_hdr *);\n \teth_hdr[1] = rte_pktmbuf_mtod(m[1], struct ether_hdr *);\n \teth_hdr[2] = rte_pktmbuf_mtod(m[2], struct ether_hdr *);\n \teth_hdr[3] = rte_pktmbuf_mtod(m[3], struct ether_hdr *);\n+\teth_hdr[4] = rte_pktmbuf_mtod(m[4], struct ether_hdr *);\n+\teth_hdr[5] = rte_pktmbuf_mtod(m[5], struct ether_hdr *);\n+\teth_hdr[6] = rte_pktmbuf_mtod(m[6], struct ether_hdr *);\n+\teth_hdr[7] = rte_pktmbuf_mtod(m[7], struct ether_hdr *);\n \n \t/* Handle IPv6 headers.*/\n \tipv6_hdr[0] = rte_pktmbuf_mtod_offset(m[0], struct ipv6_hdr *,\n@@ -888,18 +982,36 @@ simple_ipv6_fwd_4pkts(struct rte_mbuf* m[4], uint8_t portid, struct lcore_conf *\n \t\t\t\t\t      sizeof(struct ether_hdr));\n \tipv6_hdr[3] = rte_pktmbuf_mtod_offset(m[3], struct ipv6_hdr *,\n \t\t\t\t\t      sizeof(struct ether_hdr));\n+\tipv6_hdr[4] = rte_pktmbuf_mtod_offset(m[4], struct ipv6_hdr *,\n+\t\t\t\t\t      sizeof(struct ether_hdr));\n+\tipv6_hdr[5] = rte_pktmbuf_mtod_offset(m[5], struct ipv6_hdr *,\n+\t\t\t\t\t      sizeof(struct ether_hdr));\n+\tipv6_hdr[6] = rte_pktmbuf_mtod_offset(m[6], struct ipv6_hdr *,\n+\t\t\t\t\t      sizeof(struct ether_hdr));\n+\tipv6_hdr[7] = rte_pktmbuf_mtod_offset(m[7], struct ipv6_hdr *,\n+\t\t\t\t\t      sizeof(struct ether_hdr));\n \n \tget_ipv6_5tuple(m[0], mask1, mask2, &key[0]);\n \tget_ipv6_5tuple(m[1], mask1, mask2, &key[1]);\n \tget_ipv6_5tuple(m[2], mask1, mask2, &key[2]);\n \tget_ipv6_5tuple(m[3], mask1, mask2, &key[3]);\n+\tget_ipv6_5tuple(m[4], mask1, mask2, &key[4]);\n+\tget_ipv6_5tuple(m[5], mask1, mask2, &key[5]);\n+\tget_ipv6_5tuple(m[6], mask1, mask2, &key[6]);\n+\tget_ipv6_5tuple(m[7], mask1, mask2, &key[7]);\n+\n+\tconst void *key_array[8] = {&key[0], &key[1], &key[2], &key[3],\n+\t\t\t\t&key[4], &key[5], &key[6], &key[7]};\n \n-\tconst void *key_array[4] = {&key[0], &key[1], &key[2],&key[3]};\n \trte_hash_lookup_multi(qconf->ipv6_lookup_struct, &key_array[0], 4, ret);\n-\tdst_port[0] = (uint8_t) ((ret[0] < 0)? portid:ipv6_l3fwd_out_if[ret[0]]);\n-\tdst_port[1] = (uint8_t) ((ret[1] < 0)? portid:ipv6_l3fwd_out_if[ret[1]]);\n-\tdst_port[2] = (uint8_t) ((ret[2] < 0)? portid:ipv6_l3fwd_out_if[ret[2]]);\n-\tdst_port[3] = (uint8_t) ((ret[3] < 0)? portid:ipv6_l3fwd_out_if[ret[3]]);\n+\tdst_port[0] = (uint8_t) ((ret[0] < 0) ? portid:ipv6_l3fwd_out_if[ret[0]]);\n+\tdst_port[1] = (uint8_t) ((ret[1] < 0) ? portid:ipv6_l3fwd_out_if[ret[1]]);\n+\tdst_port[2] = (uint8_t) ((ret[2] < 0) ? portid:ipv6_l3fwd_out_if[ret[2]]);\n+\tdst_port[3] = (uint8_t) ((ret[3] < 0) ? portid:ipv6_l3fwd_out_if[ret[3]]);\n+\tdst_port[4] = (uint8_t) ((ret[4] < 0) ? portid:ipv6_l3fwd_out_if[ret[4]]);\n+\tdst_port[5] = (uint8_t) ((ret[5] < 0) ? portid:ipv6_l3fwd_out_if[ret[5]]);\n+\tdst_port[6] = (uint8_t) ((ret[6] < 0) ? portid:ipv6_l3fwd_out_if[ret[6]]);\n+\tdst_port[7] = (uint8_t) ((ret[7] < 0) ? portid:ipv6_l3fwd_out_if[ret[7]]);\n \n \tif (dst_port[0] >= RTE_MAX_ETHPORTS || (enabled_port_mask & 1 << dst_port[0]) == 0)\n \t\tdst_port[0] = portid;\n@@ -909,23 +1021,43 @@ simple_ipv6_fwd_4pkts(struct rte_mbuf* m[4], uint8_t portid, struct lcore_conf *\n \t\tdst_port[2] = portid;\n \tif (dst_port[3] >= RTE_MAX_ETHPORTS || (enabled_port_mask & 1 << dst_port[3]) == 0)\n \t\tdst_port[3] = portid;\n+\tif (dst_port[4] >= RTE_MAX_ETHPORTS || (enabled_port_mask & 1 << dst_port[4]) == 0)\n+\t\tdst_port[4] = portid;\n+\tif (dst_port[5] >= RTE_MAX_ETHPORTS || (enabled_port_mask & 1 << dst_port[5]) == 0)\n+\t\tdst_port[5] = portid;\n+\tif (dst_port[6] >= RTE_MAX_ETHPORTS || (enabled_port_mask & 1 << dst_port[6]) == 0)\n+\t\tdst_port[6] = portid;\n+\tif (dst_port[7] >= RTE_MAX_ETHPORTS || (enabled_port_mask & 1 << dst_port[7]) == 0)\n+\t\tdst_port[7] = portid;\n \n \t/* dst addr */\n \t*(uint64_t *)&eth_hdr[0]->d_addr = dest_eth_addr[dst_port[0]];\n \t*(uint64_t *)&eth_hdr[1]->d_addr = dest_eth_addr[dst_port[1]];\n \t*(uint64_t *)&eth_hdr[2]->d_addr = dest_eth_addr[dst_port[2]];\n \t*(uint64_t *)&eth_hdr[3]->d_addr = dest_eth_addr[dst_port[3]];\n+\t*(uint64_t *)&eth_hdr[4]->d_addr = dest_eth_addr[dst_port[4]];\n+\t*(uint64_t *)&eth_hdr[5]->d_addr = dest_eth_addr[dst_port[5]];\n+\t*(uint64_t *)&eth_hdr[6]->d_addr = dest_eth_addr[dst_port[6]];\n+\t*(uint64_t *)&eth_hdr[7]->d_addr = dest_eth_addr[dst_port[7]];\n \n \t/* src addr */\n \tether_addr_copy(&ports_eth_addr[dst_port[0]], &eth_hdr[0]->s_addr);\n \tether_addr_copy(&ports_eth_addr[dst_port[1]], &eth_hdr[1]->s_addr);\n \tether_addr_copy(&ports_eth_addr[dst_port[2]], &eth_hdr[2]->s_addr);\n \tether_addr_copy(&ports_eth_addr[dst_port[3]], &eth_hdr[3]->s_addr);\n+\tether_addr_copy(&ports_eth_addr[dst_port[4]], &eth_hdr[4]->s_addr);\n+\tether_addr_copy(&ports_eth_addr[dst_port[5]], &eth_hdr[5]->s_addr);\n+\tether_addr_copy(&ports_eth_addr[dst_port[6]], &eth_hdr[6]->s_addr);\n+\tether_addr_copy(&ports_eth_addr[dst_port[7]], &eth_hdr[7]->s_addr);\n \n \tsend_single_packet(m[0], (uint8_t)dst_port[0]);\n \tsend_single_packet(m[1], (uint8_t)dst_port[1]);\n \tsend_single_packet(m[2], (uint8_t)dst_port[2]);\n \tsend_single_packet(m[3], (uint8_t)dst_port[3]);\n+\tsend_single_packet(m[4], (uint8_t)dst_port[4]);\n+\tsend_single_packet(m[5], (uint8_t)dst_port[5]);\n+\tsend_single_packet(m[6], (uint8_t)dst_port[6]);\n+\tsend_single_packet(m[7], (uint8_t)dst_port[7]);\n \n }\n #endif /* APP_LOOKUP_METHOD */\n@@ -1548,19 +1680,23 @@ main_loop(__attribute__((unused)) void *dummy)\n #if (APP_LOOKUP_METHOD == APP_LOOKUP_EXACT_MATCH)\n \t\t\t{\n \t\t\t\t/*\n-\t\t\t\t * Send nb_rx - nb_rx%4 packets\n-\t\t\t\t * in groups of 4.\n+\t\t\t\t * Send nb_rx - nb_rx%8 packets\n+\t\t\t\t * in groups of 8.\n \t\t\t\t */\n-\t\t\t\tint32_t n = RTE_ALIGN_FLOOR(nb_rx, 4);\n-\t\t\t\tfor (j = 0; j < n ; j+=4) {\n+\t\t\t\tint32_t n = RTE_ALIGN_FLOOR(nb_rx, 8);\n+\t\t\t\tfor (j = 0; j < n; j+=8) {\n #ifdef RTE_NEXT_ABI\n \t\t\t\t\tuint32_t pkt_type =\n \t\t\t\t\t\tpkts_burst[j]->packet_type &\n \t\t\t\t\t\tpkts_burst[j+1]->packet_type &\n \t\t\t\t\t\tpkts_burst[j+2]->packet_type &\n-\t\t\t\t\t\tpkts_burst[j+3]->packet_type;\n+\t\t\t\t\t\tpkts_burst[j+3]->packet_type &\n+\t\t\t\t\t\tpkts_burst[j+4]->packet_type &\n+\t\t\t\t\t\tpkts_burst[j+5]->packet_type &\n+\t\t\t\t\t\tpkts_burst[j+6]->packet_type &\n+\t\t\t\t\t\tpkts_burst[j+7]->packet_type;\n \t\t\t\t\tif (pkt_type & RTE_PTYPE_L3_IPV4) {\n-\t\t\t\t\t\tsimple_ipv4_fwd_4pkts(\n+\t\t\t\t\t\tsimple_ipv4_fwd_8pkts(\n \t\t\t\t\t\t&pkts_burst[j], portid, qconf);\n \t\t\t\t\t} else if (pkt_type &\n \t\t\t\t\t\tRTE_PTYPE_L3_IPV6) {\n@@ -1568,9 +1704,13 @@ main_loop(__attribute__((unused)) void *dummy)\n \t\t\t\t\tuint32_t ol_flag = pkts_burst[j]->ol_flags\n \t\t\t\t\t\t\t& pkts_burst[j+1]->ol_flags\n \t\t\t\t\t\t\t& pkts_burst[j+2]->ol_flags\n-\t\t\t\t\t\t\t& pkts_burst[j+3]->ol_flags;\n+\t\t\t\t\t\t\t& pkts_burst[j+3]->ol_flags\n+\t\t\t\t\t\t\t& pkts_burst[j+4]->ol_flags\n+\t\t\t\t\t\t\t& pkts_burst[j+5]->ol_flags\n+\t\t\t\t\t\t\t& pkts_burst[j+6]->ol_flags\n+\t\t\t\t\t\t\t& pkts_burst[j+7]->ol_flags;\n \t\t\t\t\tif (ol_flag & PKT_RX_IPV4_HDR ) {\n-\t\t\t\t\t\tsimple_ipv4_fwd_4pkts(&pkts_burst[j],\n+\t\t\t\t\t\tsimple_ipv8_fwd_4pkts(&pkts_burst[j],\n \t\t\t\t\t\t\t\t\tportid, qconf);\n \t\t\t\t\t} else if (ol_flag & PKT_RX_IPV6_HDR) {\n #endif /* RTE_NEXT_ABI */\n@@ -1585,6 +1725,14 @@ main_loop(__attribute__((unused)) void *dummy)\n \t\t\t\t\t\t\t\t\tportid, qconf);\n \t\t\t\t\t\tl3fwd_simple_forward(pkts_burst[j+3],\n \t\t\t\t\t\t\t\t\tportid, qconf);\n+\t\t\t\t\t\tl3fwd_simple_forward(pkts_burst[j+4],\n+\t\t\t\t\t\t\t\t\tportid, qconf);\n+\t\t\t\t\t\tl3fwd_simple_forward(pkts_burst[j+5],\n+\t\t\t\t\t\t\t\t\tportid, qconf);\n+\t\t\t\t\t\tl3fwd_simple_forward(pkts_burst[j+6],\n+\t\t\t\t\t\t\t\t\tportid, qconf);\n+\t\t\t\t\t\tl3fwd_simple_forward(pkts_burst[j+7],\n+\t\t\t\t\t\t\t\t\tportid, qconf);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tfor (; j < nb_rx ; j++) {\n",
    "prefixes": [
        "dpdk-dev"
    ]
}