Show a patch.

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

{
    "id": 74701,
    "url": "https://patches.dpdk.org/api/patches/74701/",
    "web_url": "https://patches.dpdk.org/patch/74701/",
    "project": {
        "id": 1,
        "url": "https://patches.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"
    },
    "msgid": "<1595556601-87800-1-git-send-email-simei.su@intel.com>",
    "date": "2020-07-24T02:10:01",
    "name": "net/ice: fix GTPU down/uplink and extension conflict",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "df69bc4708b996664fe7e2b7c2c06ccbe2c75a82",
    "submitter": {
        "id": 1298,
        "url": "https://patches.dpdk.org/api/people/1298/",
        "name": "Simei Su",
        "email": "simei.su@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "https://patches.dpdk.org/api/users/1540/",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "https://patches.dpdk.org/patch/74701/mbox/",
    "series": [
        {
            "id": 11260,
            "url": "https://patches.dpdk.org/api/series/11260/",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=11260",
            "date": "2020-07-24T02:10:01",
            "name": "net/ice: fix GTPU down/uplink and extension conflict",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/11260/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/74701/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/74701/checks/",
    "tags": {},
    "headers": {
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9691\"; a=\"151941481\"",
            "E=Sophos;i=\"5.75,388,1589266800\"; d=\"scan'208\";a=\"151941481\"",
            "E=Sophos;i=\"5.75,388,1589266800\"; d=\"scan'208\";a=\"288846372\""
        ],
        "IronPort-SDR": [
            "\n IvwMrJXU3fWyjDJ/+w7atGn/pgaQMImjzJa1mPqz7Yt/dT1cLy/ALnRRvoq68soqv6rYjZjC3T\n SASUN7d/0yHg==",
            "\n VlUOFdc8AuQoX8y4oW9fdrwNwp7p3jYrL+aC+ApklRZvPE6I9U9Q+Qo0mCqX9iHYBmeEpttBXv\n HHHVSGYyvb8A=="
        ],
        "X-Amp-File-Uploaded": "False",
        "Precedence": "list",
        "X-Mailman-Version": "2.1.15",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "List-Post": "<mailto:dev@dpdk.org>",
        "X-BeenThere": "dev@dpdk.org",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "Subject": "[dpdk-dev] [PATCH] net/ice: fix GTPU down/uplink and extension\n\tconflict",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 2A697A0518;\n\tFri, 24 Jul 2020 04:13:23 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id AC6A11D530;\n\tFri, 24 Jul 2020 04:13:21 +0200 (CEST)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by dpdk.org (Postfix) with ESMTP id 153731C211\n for <dev@dpdk.org>; Fri, 24 Jul 2020 04:13:18 +0200 (CEST)",
            "from orsmga006.jf.intel.com ([10.7.209.51])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 23 Jul 2020 19:13:17 -0700",
            "from unknown (HELO npg-dpdk-cvl-simeisu-118d193.sh.intel.com)\n ([10.67.110.178])\n by orsmga006.jf.intel.com with ESMTP; 23 Jul 2020 19:13:15 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "X-ExtLoop1": "1",
        "Date": "Fri, 24 Jul 2020 10:10:01 +0800",
        "To": "qi.z.zhang@intel.com,\n\tbeilei.xing@intel.com",
        "From": "Simei Su <simei.su@intel.com>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Cc": "dev@dpdk.org,\n\tjia.guo@intel.com,\n\tSimei Su <simei.su@intel.com>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Message-Id": "<1595556601-87800-1-git-send-email-simei.su@intel.com>",
        "Return-Path": "<dev-bounces@dpdk.org>"
    },
    "content": "When adding a RSS rule with GTPU_DWN/UP, it will search profile\ntable from the top index. If a RSS rule with GTPU_EH already exists,\nthen GTPU_DWN/UP packet will match GTPU_EH profile. This patch solves\nthis issue by removing existed GTPU_EH rule before creating a new\nGTPU_DWN/UP rule.\n\nFixes: 2e2810fc1868 (\"net/ice: fix GTPU RSS\")\n\nSigned-off-by: Simei Su <simei.su@intel.com>\n---\n drivers/net/ice/ice_ethdev.c |  47 +++++++++++++++\n drivers/net/ice/ice_ethdev.h |  15 +++++\n drivers/net/ice/ice_hash.c   | 139 +++++++++++++++++++++++++++++++++++++++++++\n 3 files changed, 201 insertions(+)",
    "diff": "diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c\nindex a4a0390..8839146 100644\n--- a/drivers/net/ice/ice_ethdev.c\n+++ b/drivers/net/ice/ice_ethdev.c\n@@ -2538,6 +2538,11 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_EH_IPV4 rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n+\t\t/* Store hash field and header for gtpu_eh ipv4 */\n+\t\tpf->gtpu_eh.ipv4.hash_fld = ICE_FLOW_HASH_IPV4;\n+\t\tpf->gtpu_eh.ipv4.pkt_hdr = ICE_FLOW_SEG_HDR_GTPU_EH |\n+\t\t\t\t\t   ICE_FLOW_SEG_HDR_IPV4 |\n+\t\t\t\t\t   ICE_FLOW_SEG_HDR_IPV_OTHER;\n \n \t\tret = ice_add_rss_cfg(hw, vsi->idx, ICE_FLOW_HASH_IPV4,\n \t\t\t\tICE_FLOW_SEG_HDR_PPPOE |\n@@ -2564,6 +2569,11 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_EH_IPV6 rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n+\t\t/* Store hash field and header for gtpu_eh ipv6 */\n+\t\tpf->gtpu_eh.ipv6.hash_fld = ICE_FLOW_HASH_IPV6;\n+\t\tpf->gtpu_eh.ipv6.pkt_hdr = ICE_FLOW_SEG_HDR_GTPU_EH |\n+\t\t\t\t\t   ICE_FLOW_SEG_HDR_IPV6 |\n+\t\t\t\t\t   ICE_FLOW_SEG_HDR_IPV_OTHER;\n \n \t\tret = ice_add_rss_cfg(hw, vsi->idx, ICE_FLOW_HASH_IPV6,\n \t\t\t\tICE_FLOW_SEG_HDR_PPPOE |\n@@ -2586,6 +2596,9 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_EH_IPV4_UDP rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n+\t\t/* Store hash field and header for gtpu_eh ipv4_udp */\n+\t\tpf->gtpu_eh.ipv4_udp.hash_fld = ICE_HASH_UDP_IPV4;\n+\t\tpf->gtpu_eh.ipv4_udp.pkt_hdr = ICE_FLOW_SEG_HDR_GTPU_EH;\n \n \t\tret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_UDP_IPV4,\n \t\t\t\tICE_FLOW_SEG_HDR_PPPOE, 0);\n@@ -2606,6 +2619,9 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_EH_IPV6_UDP rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n+\t\t/* Store hash field and header for gtpu_eh ipv6_udp */\n+\t\tpf->gtpu_eh.ipv6_udp.hash_fld = ICE_HASH_UDP_IPV6;\n+\t\tpf->gtpu_eh.ipv6_udp.pkt_hdr = ICE_FLOW_SEG_HDR_GTPU_EH;\n \n \t\tret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_UDP_IPV6,\n \t\t\t\tICE_FLOW_SEG_HDR_PPPOE, 0);\n@@ -2626,6 +2642,9 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_EH_IPV4_TCP rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n+\t\t/* Store hash field and header for gtpu_eh ipv4_tcp */\n+\t\tpf->gtpu_eh.ipv4_tcp.hash_fld = ICE_HASH_TCP_IPV4;\n+\t\tpf->gtpu_eh.ipv4_tcp.pkt_hdr = ICE_FLOW_SEG_HDR_GTPU_EH;\n \n \t\tret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_TCP_IPV4,\n \t\t\t\tICE_FLOW_SEG_HDR_PPPOE, 0);\n@@ -2646,6 +2665,9 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_EH_IPV6_TCP rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n+\t\t/* Store hash field and header for gtpu_eh ipv6_tcp */\n+\t\tpf->gtpu_eh.ipv6_tcp.hash_fld = ICE_HASH_TCP_IPV6;\n+\t\tpf->gtpu_eh.ipv6_tcp.pkt_hdr = ICE_FLOW_SEG_HDR_GTPU_EH;\n \n \t\tret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_TCP_IPV6,\n \t\t\t\tICE_FLOW_SEG_HDR_PPPOE, 0);\n@@ -2695,6 +2717,28 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)\n \t}\n }\n \n+static void\n+ice_rss_ctx_init(struct ice_pf *pf)\n+{\n+\tpf->gtpu_eh.ipv4.hash_fld = 0;\n+\tpf->gtpu_eh.ipv4.pkt_hdr = 0;\n+\n+\tpf->gtpu_eh.ipv6.hash_fld = 0;\n+\tpf->gtpu_eh.ipv6.pkt_hdr = 0;\n+\n+\tpf->gtpu_eh.ipv4_udp.hash_fld = 0;\n+\tpf->gtpu_eh.ipv4_udp.pkt_hdr = 0;\n+\n+\tpf->gtpu_eh.ipv6_udp.hash_fld = 0;\n+\tpf->gtpu_eh.ipv6_udp.pkt_hdr = 0;\n+\n+\tpf->gtpu_eh.ipv4_tcp.hash_fld = 0;\n+\tpf->gtpu_eh.ipv4_tcp.pkt_hdr = 0;\n+\n+\tpf->gtpu_eh.ipv6_tcp.hash_fld = 0;\n+\tpf->gtpu_eh.ipv6_tcp.pkt_hdr = 0;\n+}\n+\n static int ice_init_rss(struct ice_pf *pf)\n {\n \tstruct ice_hw *hw = ICE_PF_TO_HW(pf);\n@@ -2755,6 +2799,9 @@ static int ice_init_rss(struct ice_pf *pf)\n \t\t(1 << VSIQF_HASH_CTL_HASH_SCHEME_S);\n \tICE_WRITE_REG(hw, VSIQF_HASH_CTL(vsi->vsi_id), reg);\n \n+\t/* Initialize RSS context for gtpu_eh */\n+\tice_rss_ctx_init(pf);\n+\n \t/* RSS hash configuration */\n \tice_rss_hash_set(pf, rss_conf->rss_hf);\n \ndiff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h\nindex 87984ef..1baf0b4 100644\n--- a/drivers/net/ice/ice_ethdev.h\n+++ b/drivers/net/ice/ice_ethdev.h\n@@ -358,6 +358,20 @@ struct ice_fdir_info {\n \tstruct ice_fdir_counter_pool_container counter;\n };\n \n+struct ice_gtpu_eh {\n+\tuint32_t pkt_hdr;\n+\tuint64_t hash_fld;\n+};\n+\n+struct ice_hash_gtpu_eh {\n+\tstruct ice_gtpu_eh ipv4;\n+\tstruct ice_gtpu_eh ipv6;\n+\tstruct ice_gtpu_eh ipv4_udp;\n+\tstruct ice_gtpu_eh ipv6_udp;\n+\tstruct ice_gtpu_eh ipv4_tcp;\n+\tstruct ice_gtpu_eh ipv6_tcp;\n+};\n+\n struct ice_pf {\n \tstruct ice_adapter *adapter; /* The adapter this PF associate to */\n \tstruct ice_vsi *main_vsi; /* pointer to main VSI structure */\n@@ -381,6 +395,7 @@ struct ice_pf {\n \tuint16_t fdir_nb_qps; /* The number of queue pairs of Flow Director */\n \tuint16_t fdir_qp_offset;\n \tstruct ice_fdir_info fdir; /* flow director info */\n+\tstruct ice_hash_gtpu_eh gtpu_eh;\n \tuint16_t hw_prof_cnt[ICE_FLTR_PTYPE_MAX][ICE_FD_HW_SEG_MAX];\n \tuint16_t fdir_fltr_cnt[ICE_FLTR_PTYPE_MAX][ICE_FD_HW_SEG_MAX];\n \tstruct ice_hw_port_stats stats_offset;\ndiff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c\nindex e535e4b..dd70353 100644\n--- a/drivers/net/ice/ice_hash.c\n+++ b/drivers/net/ice/ice_hash.c\n@@ -1232,6 +1232,117 @@ struct ice_hash_match_type ice_hash_type_list[] = {\n }\n \n static int\n+ice_add_rss_cfg_pre(struct ice_pf *pf, uint32_t hdr, uint64_t fld)\n+{\n+\tstruct ice_hw *hw = ICE_PF_TO_HW(pf);\n+\tstruct ice_vsi *vsi = pf->main_vsi;\n+\tint ret;\n+\n+\t/**\n+\t * If header field contains GTPU_EH, store gtpu_eh context.\n+\t * If header field contains GTPU_DWN/UP, remove existed gtpu_eh.\n+\t */\n+\tif ((hdr & ICE_FLOW_SEG_HDR_GTPU_EH) &&\n+\t    (hdr & (ICE_FLOW_SEG_HDR_GTPU_DWN |\n+\t\t    ICE_FLOW_SEG_HDR_GTPU_UP)) == 0) {\n+\t\tif ((hdr & ICE_FLOW_SEG_HDR_IPV4) &&\n+\t\t\t(hdr & ICE_FLOW_SEG_HDR_UDP)) {\n+\t\t\tpf->gtpu_eh.ipv4_udp.pkt_hdr = hdr;\n+\t\t\tpf->gtpu_eh.ipv4_udp.hash_fld = fld;\n+\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV6) &&\n+\t\t\t(hdr & ICE_FLOW_SEG_HDR_UDP)) {\n+\t\t\tpf->gtpu_eh.ipv6_udp.pkt_hdr = hdr;\n+\t\t\tpf->gtpu_eh.ipv6_udp.hash_fld = fld;\n+\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV4) &&\n+\t\t\t(hdr & ICE_FLOW_SEG_HDR_TCP)) {\n+\t\t\tpf->gtpu_eh.ipv4_tcp.pkt_hdr = hdr;\n+\t\t\tpf->gtpu_eh.ipv4_tcp.hash_fld = fld;\n+\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV6) &&\n+\t\t\t(hdr & ICE_FLOW_SEG_HDR_TCP)) {\n+\t\t\tpf->gtpu_eh.ipv6_tcp.pkt_hdr = hdr;\n+\t\t\tpf->gtpu_eh.ipv6_tcp.hash_fld = fld;\n+\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV4) &&\n+\t\t\t(hdr & (ICE_FLOW_SEG_HDR_UDP |\n+\t\t\t\tICE_FLOW_SEG_HDR_TCP)) == 0) {\n+\t\t\tpf->gtpu_eh.ipv4.pkt_hdr = hdr;\n+\t\t\tpf->gtpu_eh.ipv4.hash_fld = fld;\n+\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV6) &&\n+\t\t\t(hdr & (ICE_FLOW_SEG_HDR_UDP |\n+\t\t\t\tICE_FLOW_SEG_HDR_TCP)) == 0) {\n+\t\t\tpf->gtpu_eh.ipv6.pkt_hdr = hdr;\n+\t\t\tpf->gtpu_eh.ipv6.hash_fld = fld;\n+\t\t}\n+\t} else if (hdr & (ICE_FLOW_SEG_HDR_GTPU_DWN |\n+\t\t   ICE_FLOW_SEG_HDR_GTPU_UP)) {\n+\t\tif ((hdr & ICE_FLOW_SEG_HDR_IPV4) &&\n+\t\t\t(hdr & ICE_FLOW_SEG_HDR_UDP)) {\n+\t\t\tif (pf->gtpu_eh.ipv4_udp.hash_fld &&\n+\t\t\t\tpf->gtpu_eh.ipv4_udp.pkt_hdr) {\n+\t\t\t\tret = ice_rem_rss_cfg(hw, vsi->idx,\n+\t\t\t\t\tpf->gtpu_eh.ipv4_udp.hash_fld,\n+\t\t\t\t\tpf->gtpu_eh.ipv4_udp.pkt_hdr);\n+\t\t\t\tif (ret)\n+\t\t\t\t\treturn -rte_errno;\n+\t\t\t}\n+\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV6) &&\n+\t\t\t(hdr & ICE_FLOW_SEG_HDR_UDP)) {\n+\t\t\tif (pf->gtpu_eh.ipv6_udp.hash_fld &&\n+\t\t\t\tpf->gtpu_eh.ipv6_udp.pkt_hdr) {\n+\t\t\t\tret = ice_rem_rss_cfg(hw, vsi->idx,\n+\t\t\t\t\tpf->gtpu_eh.ipv6_udp.hash_fld,\n+\t\t\t\t\tpf->gtpu_eh.ipv6_udp.pkt_hdr);\n+\t\t\t\tif (ret)\n+\t\t\t\t\treturn -rte_errno;\n+\t\t\t}\n+\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV4) &&\n+\t\t\t(hdr & ICE_FLOW_SEG_HDR_TCP)) {\n+\t\t\tif (pf->gtpu_eh.ipv4_tcp.hash_fld &&\n+\t\t\t\tpf->gtpu_eh.ipv4_tcp.pkt_hdr) {\n+\t\t\t\tret = ice_rem_rss_cfg(hw, vsi->idx,\n+\t\t\t\t\tpf->gtpu_eh.ipv4_tcp.hash_fld,\n+\t\t\t\t\tpf->gtpu_eh.ipv4_tcp.pkt_hdr);\n+\t\t\t\tif (ret)\n+\t\t\t\t\treturn -rte_errno;\n+\t\t\t}\n+\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV6) &&\n+\t\t\t(hdr & ICE_FLOW_SEG_HDR_TCP)) {\n+\t\t\tif (pf->gtpu_eh.ipv6_tcp.hash_fld &&\n+\t\t\t\tpf->gtpu_eh.ipv6_tcp.pkt_hdr) {\n+\t\t\t\tret = ice_rem_rss_cfg(hw, vsi->idx,\n+\t\t\t\t\tpf->gtpu_eh.ipv6_tcp.hash_fld,\n+\t\t\t\t\tpf->gtpu_eh.ipv6_tcp.pkt_hdr);\n+\t\t\t\tif (ret)\n+\t\t\t\t\treturn -rte_errno;\n+\t\t\t}\n+\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV4) &&\n+\t\t\t(hdr & (ICE_FLOW_SEG_HDR_UDP |\n+\t\t\t\tICE_FLOW_SEG_HDR_TCP)) == 0) {\n+\t\t\tif (pf->gtpu_eh.ipv4.hash_fld &&\n+\t\t\t\tpf->gtpu_eh.ipv4.pkt_hdr) {\n+\t\t\t\tret = ice_rem_rss_cfg(hw, vsi->idx,\n+\t\t\t\t\tpf->gtpu_eh.ipv4.hash_fld,\n+\t\t\t\t\tpf->gtpu_eh.ipv4.pkt_hdr);\n+\t\t\t\tif (ret)\n+\t\t\t\t\treturn -rte_errno;\n+\t\t\t}\n+\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV6) &&\n+\t\t\t(hdr & (ICE_FLOW_SEG_HDR_UDP |\n+\t\t\t\tICE_FLOW_SEG_HDR_TCP)) == 0) {\n+\t\t\tif (pf->gtpu_eh.ipv6.hash_fld &&\n+\t\t\t\tpf->gtpu_eh.ipv6.pkt_hdr) {\n+\t\t\t\tret = ice_rem_rss_cfg(hw, vsi->idx,\n+\t\t\t\t\tpf->gtpu_eh.ipv6.hash_fld,\n+\t\t\t\t\tpf->gtpu_eh.ipv6.pkt_hdr);\n+\t\t\t\tif (ret)\n+\t\t\t\t\treturn -rte_errno;\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int\n ice_hash_create(struct ice_adapter *ad,\n \t\tstruct rte_flow *flow,\n \t\tvoid *meta,\n@@ -1248,6 +1359,10 @@ struct ice_hash_match_type ice_hash_type_list[] = {\n \tuint64_t hash_field = ((struct rss_meta *)meta)->hash_flds;\n \tuint8_t hash_function = ((struct rss_meta *)meta)->hash_function;\n \n+\tret = ice_add_rss_cfg_pre(pf, headermask, hash_field);\n+\tif (ret)\n+\t\treturn -rte_errno;\n+\n \tfilter_ptr = rte_zmalloc(\"ice_rss_filter\",\n \t\t\t\tsizeof(struct ice_hash_flow_cfg), 0);\n \tif (!filter_ptr) {\n@@ -1297,6 +1412,28 @@ struct ice_hash_match_type ice_hash_type_list[] = {\n \treturn -rte_errno;\n }\n \n+static void\n+ice_rem_rss_cfg_post(struct ice_pf *pf)\n+{\n+\tpf->gtpu_eh.ipv4.hash_fld = 0;\n+\tpf->gtpu_eh.ipv4.pkt_hdr = 0;\n+\n+\tpf->gtpu_eh.ipv6.hash_fld = 0;\n+\tpf->gtpu_eh.ipv6.pkt_hdr = 0;\n+\n+\tpf->gtpu_eh.ipv4_udp.hash_fld = 0;\n+\tpf->gtpu_eh.ipv4_udp.pkt_hdr = 0;\n+\n+\tpf->gtpu_eh.ipv6_udp.hash_fld = 0;\n+\tpf->gtpu_eh.ipv6_udp.pkt_hdr = 0;\n+\n+\tpf->gtpu_eh.ipv4_tcp.hash_fld = 0;\n+\tpf->gtpu_eh.ipv4_tcp.pkt_hdr = 0;\n+\n+\tpf->gtpu_eh.ipv6_tcp.hash_fld = 0;\n+\tpf->gtpu_eh.ipv6_tcp.pkt_hdr = 0;\n+}\n+\n static int\n ice_hash_destroy(struct ice_adapter *ad,\n \t\tstruct rte_flow *flow,\n@@ -1334,6 +1471,8 @@ struct ice_hash_match_type ice_hash_type_list[] = {\n \t\t}\n \t}\n \n+\tice_rem_rss_cfg_post(pf);\n+\n \trte_free(filter_ptr);\n \treturn 0;\n \n",
    "prefixes": []
}