get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 88091,
    "url": "http://patchwork.dpdk.org/api/patches/88091/",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210223031058.89669-1-leyi.rong@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/projects/1/",
        "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": "<20210223031058.89669-1-leyi.rong@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210223031058.89669-1-leyi.rong@intel.com",
    "date": "2021-02-23T03:10:58",
    "name": "net/iavf: fix the VLAN tag extraction handling",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "c825dfe1d86bf06546f8fc71fbf6fe87395f1607",
    "submitter": {
        "id": 1204,
        "url": "http://patchwork.dpdk.org/api/people/1204/",
        "name": "Rong, Leyi",
        "email": "leyi.rong@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patchwork.dpdk.org/api/users/1540/",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20210223031058.89669-1-leyi.rong@intel.com/mbox/",
    "series": [
        {
            "id": 15335,
            "url": "http://patchwork.dpdk.org/api/series/15335/",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=15335",
            "date": "2021-02-23T03:10:58",
            "name": "net/iavf: fix the VLAN tag extraction handling",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/15335/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/88091/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/88091/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Subject": "[dpdk-dev] [PATCH] net/iavf: fix the VLAN tag extraction handling",
        "List-Post": "<mailto:dev@dpdk.org>",
        "X-Mailer": "git-send-email 2.17.1",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Cc": "dev@dpdk.org, Haiyue Wang <haiyue.wang@intel.com>,\n Leyi Rong <leyi.rong@intel.com>",
        "From": "Leyi Rong <leyi.rong@intel.com>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-BeenThere": "dev@dpdk.org",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Date": "Tue, 23 Feb 2021 11:10:58 +0800",
        "Precedence": "list",
        "Message-Id": "<20210223031058.89669-1-leyi.rong@intel.com>",
        "X-Mailman-Version": "2.1.29",
        "Errors-To": "dev-bounces@dpdk.org",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 2FFA2A034F;\n\tTue, 23 Feb 2021 04:34:19 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9FB264067A;\n\tTue, 23 Feb 2021 04:34:18 +0100 (CET)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by mails.dpdk.org (Postfix) with ESMTP id C5B1440041\n for <dev@dpdk.org>; Tue, 23 Feb 2021 04:34:16 +0100 (CET)",
            "from orsmga008.jf.intel.com ([10.7.209.65])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 22 Feb 2021 19:34:15 -0800",
            "from dpdk-lrong-srv-04.sh.intel.com ([10.67.119.221])\n by orsmga008.jf.intel.com with ESMTP; 22 Feb 2021 19:34:12 -0800"
        ],
        "IronPort-SDR": [
            "\n rW+dWuMPhVoutcdJ+5n75WoZfhkWdkYqucd+JrYr6RJKhLx1b2Z10629awYjvq+WzKBsFzMyQE\n JMRSkcRYeRFQ==",
            "\n HRdNC3F11qrJNOdQvmJvw8492EsQ/VRgi4rZ1finXwzxACMJGYp1DgElS2ZS+RozVB+aymt9fw\n Ci5I+FBqzoow=="
        ],
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "X-ExtLoop1": "1",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "To": "qi.z.zhang@intel.com,\n\twenzhuo.lu@intel.com,\n\tbeilei.xing@intel.com",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9903\"; a=\"172333634\"",
            "E=Sophos;i=\"5.81,199,1610438400\"; d=\"scan'208\";a=\"172333634\"",
            "E=Sophos;i=\"5.81,199,1610438400\"; d=\"scan'208\";a=\"402927874\""
        ]
    },
    "content": "From: Haiyue Wang <haiyue.wang@intel.com>\n\nThe new VIRTCHNL_VF_OFFLOAD_VLAN_V2 capability added support that allows\nthe PF to set the location of the RX VLAN tag for stripping offloads.\n\nSo the VF needs to extract the VLAN tag according to the location flags.\n\nFixes: 1c301e8c3cff (\"net/iavf: support new VLAN capabilities\")\n\nSigned-off-by: Haiyue Wang <haiyue.wang@intel.com>\nSigned-off-by: Leyi Rong <leyi.rong@intel.com>\n---\n drivers/net/iavf/iavf_rxtx.c          |  62 +++++----\n drivers/net/iavf/iavf_rxtx.h          |   3 +\n drivers/net/iavf/iavf_rxtx_vec_avx2.c | 179 ++++++++++++++++++++------\n 3 files changed, 182 insertions(+), 62 deletions(-)",
    "diff": "diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c\nindex af5a28d84d..41409e1525 100644\n--- a/drivers/net/iavf/iavf_rxtx.c\n+++ b/drivers/net/iavf/iavf_rxtx.c\n@@ -543,6 +543,24 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,\n \t\trxq->proto_xtr = IAVF_PROTO_XTR_NONE;\n \t}\n \n+\tif (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN_V2) {\n+\t\tstruct virtchnl_vlan_supported_caps *stripping_support =\n+\t\t\t\t&vf->vlan_v2_caps.offloads.stripping_support;\n+\t\tuint32_t stripping_cap;\n+\n+\t\tif (stripping_support->outer)\n+\t\t\tstripping_cap = stripping_support->outer;\n+\t\telse\n+\t\t\tstripping_cap = stripping_support->inner;\n+\n+\t\tif (stripping_cap & VIRTCHNL_VLAN_TAG_LOCATION_L2TAG1)\n+\t\t\trxq->rx_flags = IAVF_RX_FLAGS_VLAN_TAG_LOC_L2TAG1;\n+\t\telse if (stripping_cap & VIRTCHNL_VLAN_TAG_LOCATION_L2TAG2_2)\n+\t\t\trxq->rx_flags = IAVF_RX_FLAGS_VLAN_TAG_LOC_L2TAG2_2;\n+\t} else {\n+\t\trxq->rx_flags = IAVF_RX_FLAGS_VLAN_TAG_LOC_L2TAG1;\n+\t}\n+\n \tiavf_select_rxd_to_pkt_fields_handler(rxq, rxq->rxdid);\n \n \trxq->mp = mp;\n@@ -972,31 +990,27 @@ iavf_rxd_to_vlan_tci(struct rte_mbuf *mb, volatile union iavf_rx_desc *rxdp)\n \n static inline void\n iavf_flex_rxd_to_vlan_tci(struct rte_mbuf *mb,\n-\t\t\t  volatile union iavf_rx_flex_desc *rxdp)\n+\t\t\t  volatile union iavf_rx_flex_desc *rxdp,\n+\t\t\t  uint8_t rx_flags)\n {\n-\tif (rte_le_to_cpu_64(rxdp->wb.status_error0) &\n-\t\t(1 << IAVF_RX_FLEX_DESC_STATUS0_L2TAG1P_S)) {\n-\t\tmb->ol_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;\n-\t\tmb->vlan_tci =\n-\t\t\trte_le_to_cpu_16(rxdp->wb.l2tag1);\n-\t} else {\n-\t\tmb->vlan_tci = 0;\n-\t}\n+\tuint16_t vlan_tci = 0;\n+\n+\tif (rx_flags & IAVF_RX_FLAGS_VLAN_TAG_LOC_L2TAG1 &&\n+\t    rte_le_to_cpu_64(rxdp->wb.status_error0) &\n+\t    (1 << IAVF_RX_FLEX_DESC_STATUS0_L2TAG1P_S))\n+\t\tvlan_tci = rte_le_to_cpu_16(rxdp->wb.l2tag1);\n \n #ifndef RTE_LIBRTE_IAVF_16BYTE_RX_DESC\n-\tif (rte_le_to_cpu_16(rxdp->wb.status_error1) &\n-\t    (1 << IAVF_RX_FLEX_DESC_STATUS1_L2TAG2P_S)) {\n-\t\tmb->ol_flags |= PKT_RX_QINQ_STRIPPED | PKT_RX_QINQ |\n-\t\t\t\tPKT_RX_VLAN_STRIPPED | PKT_RX_VLAN;\n-\t\tmb->vlan_tci_outer = mb->vlan_tci;\n-\t\tmb->vlan_tci = rte_le_to_cpu_16(rxdp->wb.l2tag2_2nd);\n-\t\tPMD_RX_LOG(DEBUG, \"Descriptor l2tag2_1: %u, l2tag2_2: %u\",\n-\t\t\t   rte_le_to_cpu_16(rxdp->wb.l2tag2_1st),\n-\t\t\t   rte_le_to_cpu_16(rxdp->wb.l2tag2_2nd));\n-\t} else {\n-\t\tmb->vlan_tci_outer = 0;\n-\t}\n+\tif (rx_flags & IAVF_RX_FLAGS_VLAN_TAG_LOC_L2TAG2_2 &&\n+\t    rte_le_to_cpu_16(rxdp->wb.status_error1) &\n+\t    (1 << IAVF_RX_FLEX_DESC_STATUS1_L2TAG2P_S))\n+\t\tvlan_tci = rte_le_to_cpu_16(rxdp->wb.l2tag2_2nd);\n #endif\n+\n+\tif (vlan_tci) {\n+\t\tmb->ol_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;\n+\t\tmb->vlan_tci = vlan_tci;\n+\t}\n }\n \n /* Translate the rx descriptor status and error fields to pkt flags */\n@@ -1314,7 +1328,7 @@ iavf_recv_pkts_flex_rxd(void *rx_queue,\n \t\trxm->ol_flags = 0;\n \t\trxm->packet_type = ptype_tbl[IAVF_RX_FLEX_DESC_PTYPE_M &\n \t\t\trte_le_to_cpu_16(rxd.wb.ptype_flex_flags0)];\n-\t\tiavf_flex_rxd_to_vlan_tci(rxm, &rxd);\n+\t\tiavf_flex_rxd_to_vlan_tci(rxm, &rxd, rxq->rx_flags);\n \t\trxq->rxd_to_pkt_fields(rxq, rxm, &rxd);\n \t\tpkt_flags = iavf_flex_rxd_error_to_pkt_flags(rx_stat_err0);\n \t\trxm->ol_flags |= pkt_flags;\n@@ -1455,7 +1469,7 @@ iavf_recv_scattered_pkts_flex_rxd(void *rx_queue, struct rte_mbuf **rx_pkts,\n \t\tfirst_seg->ol_flags = 0;\n \t\tfirst_seg->packet_type = ptype_tbl[IAVF_RX_FLEX_DESC_PTYPE_M &\n \t\t\trte_le_to_cpu_16(rxd.wb.ptype_flex_flags0)];\n-\t\tiavf_flex_rxd_to_vlan_tci(first_seg, &rxd);\n+\t\tiavf_flex_rxd_to_vlan_tci(first_seg, &rxd, rxq->rx_flags);\n \t\trxq->rxd_to_pkt_fields(rxq, first_seg, &rxd);\n \t\tpkt_flags = iavf_flex_rxd_error_to_pkt_flags(rx_stat_err0);\n \n@@ -1692,7 +1706,7 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq)\n \n \t\t\tmb->packet_type = ptype_tbl[IAVF_RX_FLEX_DESC_PTYPE_M &\n \t\t\t\trte_le_to_cpu_16(rxdp[j].wb.ptype_flex_flags0)];\n-\t\t\tiavf_flex_rxd_to_vlan_tci(mb, &rxdp[j]);\n+\t\t\tiavf_flex_rxd_to_vlan_tci(mb, &rxdp[j], rxq->rx_flags);\n \t\t\trxq->rxd_to_pkt_fields(rxq, mb, &rxdp[j]);\n \t\t\tstat_err0 = rte_le_to_cpu_16(rxdp[j].wb.status_error0);\n \t\t\tpkt_flags = iavf_flex_rxd_error_to_pkt_flags(stat_err0);\ndiff --git a/drivers/net/iavf/iavf_rxtx.h b/drivers/net/iavf/iavf_rxtx.h\nindex d583badd98..922ddadad1 100644\n--- a/drivers/net/iavf/iavf_rxtx.h\n+++ b/drivers/net/iavf/iavf_rxtx.h\n@@ -190,6 +190,9 @@ struct iavf_rx_queue {\n \tbool q_set;             /* if rx queue has been configured */\n \tbool rx_deferred_start; /* don't start this queue in dev start */\n \tconst struct iavf_rxq_ops *ops;\n+\tuint8_t rx_flags;\n+#define IAVF_RX_FLAGS_VLAN_TAG_LOC_L2TAG1     BIT(0)\n+#define IAVF_RX_FLAGS_VLAN_TAG_LOC_L2TAG2_2   BIT(1)\n \tuint8_t proto_xtr; /* protocol extraction type */\n \tuint64_t xtr_ol_flag;\n \t\t/* flexible descriptor metadata extraction offload flag */\ndiff --git a/drivers/net/iavf/iavf_rxtx_vec_avx2.c b/drivers/net/iavf/iavf_rxtx_vec_avx2.c\nindex 8f28afc8c5..f443300f54 100644\n--- a/drivers/net/iavf/iavf_rxtx_vec_avx2.c\n+++ b/drivers/net/iavf/iavf_rxtx_vec_avx2.c\n@@ -777,20 +777,32 @@ _iavf_recv_raw_pkts_vec_avx2_flex_rxd(struct iavf_rx_queue *rxq,\n \t * If RSS(bit12)/VLAN(bit13) are set,\n \t * shuffle moves appropriate flags in place.\n \t */\n-\tconst __m256i rss_vlan_flags_shuf = _mm256_set_epi8(0, 0, 0, 0,\n+\tconst __m256i rss_flags_shuf = _mm256_set_epi8(0, 0, 0, 0,\n \t\t\t0, 0, 0, 0,\n \t\t\t0, 0, 0, 0,\n-\t\t\tPKT_RX_RSS_HASH | PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED,\n-\t\t\tPKT_RX_VLAN | PKT_RX_VLAN_STRIPPED,\n+\t\t\tPKT_RX_RSS_HASH, 0,\n \t\t\tPKT_RX_RSS_HASH, 0,\n \t\t\t/* end up 128-bits */\n \t\t\t0, 0, 0, 0,\n \t\t\t0, 0, 0, 0,\n \t\t\t0, 0, 0, 0,\n-\t\t\tPKT_RX_RSS_HASH | PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED,\n-\t\t\tPKT_RX_VLAN | PKT_RX_VLAN_STRIPPED,\n+\t\t\tPKT_RX_RSS_HASH, 0,\n \t\t\tPKT_RX_RSS_HASH, 0);\n \n+\tconst __m256i vlan_flags_shuf = _mm256_set_epi8(0, 0, 0, 0,\n+\t\t\t0, 0, 0, 0,\n+\t\t\t0, 0, 0, 0,\n+\t\t\tPKT_RX_VLAN | PKT_RX_VLAN_STRIPPED,\n+\t\t\tPKT_RX_VLAN | PKT_RX_VLAN_STRIPPED,\n+\t\t\t0, 0,\n+\t\t\t/* end up 128-bits */\n+\t\t\t0, 0, 0, 0,\n+\t\t\t0, 0, 0, 0,\n+\t\t\t0, 0, 0, 0,\n+\t\t\tPKT_RX_VLAN | PKT_RX_VLAN_STRIPPED,\n+\t\t\tPKT_RX_VLAN | PKT_RX_VLAN_STRIPPED,\n+\t\t\t0, 0);\n+\n \tuint16_t i, received;\n \n \tfor (i = 0, received = 0; i < nb_pkts;\n@@ -938,13 +950,24 @@ _iavf_recv_raw_pkts_vec_avx2_flex_rxd(struct iavf_rx_queue *rxq,\n \t\t\t\t_mm256_srli_epi32(flag_bits, 4));\n \t\tl3_l4_flags = _mm256_slli_epi32(l3_l4_flags, 1);\n \t\tl3_l4_flags = _mm256_and_si256(l3_l4_flags, cksum_mask);\n+\n \t\t/* set rss and vlan flags */\n \t\tconst __m256i rss_vlan_flag_bits =\n \t\t\t_mm256_srli_epi32(flag_bits, 12);\n-\t\tconst __m256i rss_vlan_flags =\n-\t\t\t_mm256_shuffle_epi8(rss_vlan_flags_shuf,\n+\t\tconst __m256i rss_flags =\n+\t\t\t_mm256_shuffle_epi8(rss_flags_shuf,\n \t\t\t\t\t    rss_vlan_flag_bits);\n \n+\t\t__m256i vlan_flags = _mm256_setzero_si256();\n+\n+\t\tif (rxq->rx_flags == IAVF_RX_FLAGS_VLAN_TAG_LOC_L2TAG1)\n+\t\t\tvlan_flags =\n+\t\t\t\t_mm256_shuffle_epi8(vlan_flags_shuf,\n+\t\t\t\t\t\t    rss_vlan_flag_bits);\n+\n+\t\tconst __m256i rss_vlan_flags =\n+\t\t\t_mm256_or_si256(rss_flags, vlan_flags);\n+\n \t\t/* merge flags */\n \t\t__m256i mbuf_flags = _mm256_or_si256(l3_l4_flags,\n \t\t\t\trss_vlan_flags);\n@@ -997,7 +1020,8 @@ _iavf_recv_raw_pkts_vec_avx2_flex_rxd(struct iavf_rx_queue *rxq,\n \t\t * will cause performance drop to get into this context.\n \t\t */\n \t\tif (rxq->vsi->adapter->eth_dev->data->dev_conf.rxmode.offloads &\n-\t\t\t\tDEV_RX_OFFLOAD_RSS_HASH) {\n+\t\t\t\tDEV_RX_OFFLOAD_RSS_HASH ||\n+\t\t\t\trxq->rx_flags & IAVF_RX_FLAGS_VLAN_TAG_LOC_L2TAG2_2) {\n \t\t\t/* load bottom half of every 32B desc */\n \t\t\tconst __m128i raw_desc_bh7 =\n \t\t\t\t_mm_load_si128\n@@ -1048,36 +1072,115 @@ _iavf_recv_raw_pkts_vec_avx2_flex_rxd(struct iavf_rx_queue *rxq,\n \t\t\t\t\t(_mm256_castsi128_si256(raw_desc_bh0),\n \t\t\t\t\traw_desc_bh1, 1);\n \n-\t\t\t/**\n-\t\t\t * to shift the 32b RSS hash value to the\n-\t\t\t * highest 32b of each 128b before mask\n-\t\t\t */\n-\t\t\t__m256i rss_hash6_7 =\n-\t\t\t\t_mm256_slli_epi64(raw_desc_bh6_7, 32);\n-\t\t\t__m256i rss_hash4_5 =\n-\t\t\t\t_mm256_slli_epi64(raw_desc_bh4_5, 32);\n-\t\t\t__m256i rss_hash2_3 =\n-\t\t\t\t_mm256_slli_epi64(raw_desc_bh2_3, 32);\n-\t\t\t__m256i rss_hash0_1 =\n-\t\t\t\t_mm256_slli_epi64(raw_desc_bh0_1, 32);\n-\n-\t\t\t__m256i rss_hash_msk =\n-\t\t\t\t_mm256_set_epi32(0xFFFFFFFF, 0, 0, 0,\n-\t\t\t\t\t\t 0xFFFFFFFF, 0, 0, 0);\n-\n-\t\t\trss_hash6_7 = _mm256_and_si256\n-\t\t\t\t\t(rss_hash6_7, rss_hash_msk);\n-\t\t\trss_hash4_5 = _mm256_and_si256\n-\t\t\t\t\t(rss_hash4_5, rss_hash_msk);\n-\t\t\trss_hash2_3 = _mm256_and_si256\n-\t\t\t\t\t(rss_hash2_3, rss_hash_msk);\n-\t\t\trss_hash0_1 = _mm256_and_si256\n-\t\t\t\t\t(rss_hash0_1, rss_hash_msk);\n-\n-\t\t\tmb6_7 = _mm256_or_si256(mb6_7, rss_hash6_7);\n-\t\t\tmb4_5 = _mm256_or_si256(mb4_5, rss_hash4_5);\n-\t\t\tmb2_3 = _mm256_or_si256(mb2_3, rss_hash2_3);\n-\t\t\tmb0_1 = _mm256_or_si256(mb0_1, rss_hash0_1);\n+\t\t\tif (rxq->vsi->adapter->eth_dev->data->dev_conf.rxmode.offloads &\n+\t\t\t\t\tDEV_RX_OFFLOAD_RSS_HASH) {\n+\t\t\t\t/**\n+\t\t\t\t * to shift the 32b RSS hash value to the\n+\t\t\t\t * highest 32b of each 128b before mask\n+\t\t\t\t */\n+\t\t\t\t__m256i rss_hash6_7 =\n+\t\t\t\t\t_mm256_slli_epi64(raw_desc_bh6_7, 32);\n+\t\t\t\t__m256i rss_hash4_5 =\n+\t\t\t\t\t_mm256_slli_epi64(raw_desc_bh4_5, 32);\n+\t\t\t\t__m256i rss_hash2_3 =\n+\t\t\t\t\t_mm256_slli_epi64(raw_desc_bh2_3, 32);\n+\t\t\t\t__m256i rss_hash0_1 =\n+\t\t\t\t\t_mm256_slli_epi64(raw_desc_bh0_1, 32);\n+\n+\t\t\t\tconst __m256i rss_hash_msk =\n+\t\t\t\t\t_mm256_set_epi32(0xFFFFFFFF, 0, 0, 0,\n+\t\t\t\t\t\t\t 0xFFFFFFFF, 0, 0, 0);\n+\n+\t\t\t\trss_hash6_7 = _mm256_and_si256\n+\t\t\t\t\t\t(rss_hash6_7, rss_hash_msk);\n+\t\t\t\trss_hash4_5 = _mm256_and_si256\n+\t\t\t\t\t\t(rss_hash4_5, rss_hash_msk);\n+\t\t\t\trss_hash2_3 = _mm256_and_si256\n+\t\t\t\t\t\t(rss_hash2_3, rss_hash_msk);\n+\t\t\t\trss_hash0_1 = _mm256_and_si256\n+\t\t\t\t\t\t(rss_hash0_1, rss_hash_msk);\n+\n+\t\t\t\tmb6_7 = _mm256_or_si256(mb6_7, rss_hash6_7);\n+\t\t\t\tmb4_5 = _mm256_or_si256(mb4_5, rss_hash4_5);\n+\t\t\t\tmb2_3 = _mm256_or_si256(mb2_3, rss_hash2_3);\n+\t\t\t\tmb0_1 = _mm256_or_si256(mb0_1, rss_hash0_1);\n+\t\t\t}\n+\n+\t\t\tif (rxq->rx_flags & IAVF_RX_FLAGS_VLAN_TAG_LOC_L2TAG2_2) {\n+\t\t\t\t/* merge the status/error-1 bits into one register */\n+\t\t\t\tconst __m256i status1_4_7 =\n+\t\t\t\t\t_mm256_unpacklo_epi32(raw_desc_bh6_7,\n+\t\t\t\t\t\t\t      raw_desc_bh4_5);\n+\t\t\t\tconst __m256i status1_0_3 =\n+\t\t\t\t\t_mm256_unpacklo_epi32(raw_desc_bh2_3,\n+\t\t\t\t\t\t\t      raw_desc_bh0_1);\n+\n+\t\t\t\tconst __m256i status1_0_7 =\n+\t\t\t\t\t_mm256_unpacklo_epi64(status1_4_7,\n+\t\t\t\t\t\t\t      status1_0_3);\n+\n+\t\t\t\tconst __m256i l2tag2p_flag_mask =\n+\t\t\t\t\t_mm256_set1_epi32\n+\t\t\t\t\t(1 << IAVF_RX_FLEX_DESC_STATUS1_L2TAG2P_S);\n+\n+\t\t\t\t__m256i l2tag2p_flag_bits =\n+\t\t\t\t\t_mm256_and_si256\n+\t\t\t\t\t(status1_0_7, l2tag2p_flag_mask);\n+\n+\t\t\t\tl2tag2p_flag_bits =\n+\t\t\t\t\t_mm256_srli_epi32(l2tag2p_flag_bits,\n+\t\t\t\t\t\tIAVF_RX_FLEX_DESC_STATUS1_L2TAG2P_S);\n+\n+\t\t\t\tconst __m256i l2tag2_flags_shuf =\n+\t\t\t\t\t_mm256_set_epi8(0, 0, 0, 0,\n+\t\t\t\t\t\t\t0, 0, 0, 0,\n+\t\t\t\t\t\t\t0, 0, 0, 0,\n+\t\t\t\t\t\t\t0, 0, 0, 0,\n+\t\t\t\t\t\t\t/* end up 128-bits */\n+\t\t\t\t\t\t\t0, 0, 0, 0,\n+\t\t\t\t\t\t\t0, 0, 0, 0,\n+\t\t\t\t\t\t\t0, 0, 0, 0,\n+\t\t\t\t\t\t\t0, 0,\n+\t\t\t\t\t\t\tPKT_RX_VLAN |\n+\t\t\t\t\t\t\tPKT_RX_VLAN_STRIPPED,\n+\t\t\t\t\t\t\t0);\n+\n+\t\t\t\tvlan_flags =\n+\t\t\t\t\t_mm256_shuffle_epi8(l2tag2_flags_shuf,\n+\t\t\t\t\t\t\t    l2tag2p_flag_bits);\n+\n+\t\t\t\t/* merge with vlan_flags */\n+\t\t\t\tmbuf_flags = _mm256_or_si256\n+\t\t\t\t\t\t(mbuf_flags, vlan_flags);\n+\n+\t\t\t\t/* L2TAG2_2 */\n+\t\t\t\t__m256i vlan_tci6_7 =\n+\t\t\t\t\t_mm256_slli_si256(raw_desc_bh6_7, 4);\n+\t\t\t\t__m256i vlan_tci4_5 =\n+\t\t\t\t\t_mm256_slli_si256(raw_desc_bh4_5, 4);\n+\t\t\t\t__m256i vlan_tci2_3 =\n+\t\t\t\t\t_mm256_slli_si256(raw_desc_bh2_3, 4);\n+\t\t\t\t__m256i vlan_tci0_1 =\n+\t\t\t\t\t_mm256_slli_si256(raw_desc_bh0_1, 4);\n+\n+\t\t\t\tconst __m256i vlan_tci_msk =\n+\t\t\t\t\t_mm256_set_epi32(0, 0xFFFF0000, 0, 0,\n+\t\t\t\t\t\t\t 0, 0xFFFF0000, 0, 0);\n+\n+\t\t\t\tvlan_tci6_7 = _mm256_and_si256\n+\t\t\t\t\t\t(vlan_tci6_7, vlan_tci_msk);\n+\t\t\t\tvlan_tci4_5 = _mm256_and_si256\n+\t\t\t\t\t\t(vlan_tci4_5, vlan_tci_msk);\n+\t\t\t\tvlan_tci2_3 = _mm256_and_si256\n+\t\t\t\t\t\t(vlan_tci2_3, vlan_tci_msk);\n+\t\t\t\tvlan_tci0_1 = _mm256_and_si256\n+\t\t\t\t\t\t(vlan_tci0_1, vlan_tci_msk);\n+\n+\t\t\t\tmb6_7 = _mm256_or_si256(mb6_7, vlan_tci6_7);\n+\t\t\t\tmb4_5 = _mm256_or_si256(mb4_5, vlan_tci4_5);\n+\t\t\t\tmb2_3 = _mm256_or_si256(mb2_3, vlan_tci2_3);\n+\t\t\t\tmb0_1 = _mm256_or_si256(mb0_1, vlan_tci0_1);\n+\t\t\t}\n \t\t} /* if() on RSS hash parsing */\n #endif\n \n",
    "prefixes": []
}