get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 81651,
    "url": "http://patches.dpdk.org/api/patches/81651/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201020224846.1592682-20-qi.z.zhang@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": "<20201020224846.1592682-20-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201020224846.1592682-20-qi.z.zhang@intel.com",
    "date": "2020-10-20T22:48:44",
    "name": "[19/21] net/ice/base: refactor RSS configure API",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "14caa0c5d467ff1ac7e8fa61922dd7b9f7bbf9c9",
    "submitter": {
        "id": 504,
        "url": "http://patches.dpdk.org/api/people/504/?format=api",
        "name": "Qi Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20201020224846.1592682-20-qi.z.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 13156,
            "url": "http://patches.dpdk.org/api/series/13156/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13156",
            "date": "2020-10-20T22:48:25",
            "name": "ice: update base code",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/13156/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/81651/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/81651/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.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 CE677A04DD;\n\tWed, 21 Oct 2020 00:51:15 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E4128AD2E;\n\tWed, 21 Oct 2020 00:45:40 +0200 (CEST)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n by dpdk.org (Postfix) with ESMTP id A2E00ACEC\n for <dev@dpdk.org>; Wed, 21 Oct 2020 00:45:20 +0200 (CEST)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 20 Oct 2020 15:45:18 -0700",
            "from dpdk51.sh.intel.com ([10.67.111.142])\n by orsmga005.jf.intel.com with ESMTP; 20 Oct 2020 15:45:17 -0700"
        ],
        "IronPort-SDR": [
            "\n a/Axf2+PMnMvL3ES2nT+EkuwWgPPy6c8DiBcwPadnexa3oM6J7O3TQ+RVSCWG7LvlKYfnh0MPV\n e+Bx386I1hKg==",
            "\n pJBv4JNwZof1OJTD7Kz3u5ntxSKfmbtQEMGbaXES/xCttO/zG7ZFN3iQbfmN5/uyrE+W+qLZfr\n U+G7X8zDbimQ=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9780\"; a=\"166510638\"",
            "E=Sophos;i=\"5.77,399,1596524400\"; d=\"scan'208\";a=\"166510638\"",
            "E=Sophos;i=\"5.77,399,1596524400\"; d=\"scan'208\";a=\"533254726\""
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "To": "qiming.yang@intel.com",
        "Cc": "dev@dpdk.org,\n\tQi Zhang <qi.z.zhang@intel.com>",
        "Date": "Wed, 21 Oct 2020 06:48:44 +0800",
        "Message-Id": "<20201020224846.1592682-20-qi.z.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.25.4",
        "In-Reply-To": "<20201020224846.1592682-1-qi.z.zhang@intel.com>",
        "References": "<20201020224846.1592682-1-qi.z.zhang@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 19/21] net/ice/base: refactor RSS configure API",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Use struct ice_rss_hash_cfg as parameter for\nice_add_rss_cfg, ice_add_rss_cfg_sync and\nice_rem_rss_cfg, ice_rem_rss_cfg_sync.\n\nIntroduce enmu ice_rss_cfg_hdr_type to allow user specify the more\nflexible RSS configure.\n\nICE_RSS_OUTER_HEADERS - take outer layer as RSS inputset\nICE_RSS_INNER_HEADERS - take inner layer as RSS inputset\nICE_RSS_INNER_HEADERS_W_OUTER_IPV4\n\t- take inner layer as RSS inputset for packet with outer IPV4\nICE_RSS_INNER_HEADERS_W_OUTER_IPV6\n\t- take inner layer as RSS inputset for packet with outer IPV6\nICE_RSS_ANY_HEADERS - try with outer first then inner\n\t\t(same as the behaviour without this change)\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n drivers/net/ice/base/ice_flow.c | 239 ++++++++++++++-----------\n drivers/net/ice/base/ice_flow.h |  34 +++-\n drivers/net/ice/ice_ethdev.c    | 308 +++++++++++++-------------------\n drivers/net/ice/ice_ethdev.h    |  18 +-\n drivers/net/ice/ice_hash.c      |  14 +-\n 5 files changed, 298 insertions(+), 315 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c\nindex 4512b12368..5e38d795c9 100644\n--- a/drivers/net/ice/base/ice_flow.c\n+++ b/drivers/net/ice/base/ice_flow.c\n@@ -3244,37 +3244,49 @@ ice_flow_add_fld_raw(struct ice_flow_seg_info *seg, u16 off, u8 len,\n /**\n  * ice_flow_set_rss_seg_info - setup packet segments for RSS\n  * @segs: pointer to the flow field segment(s)\n- * @hash_fields: fields to be hashed on for the segment(s)\n- * @flow_hdr: protocol header fields within a packet segment\n+ * @seg_cnt: segment count\n+ * @cfg: configure parameters\n  *\n  * Helper function to extract fields from hash bitmap and use flow\n  * header value to set flow field segment for further use in flow\n  * profile entry or removal.\n  */\n static enum ice_status\n-ice_flow_set_rss_seg_info(struct ice_flow_seg_info *segs, u64 hash_fields,\n-\t\t\t  u32 flow_hdr)\n+ice_flow_set_rss_seg_info(struct ice_flow_seg_info *segs, u8 seg_cnt,\n+\t\t\t  const struct ice_rss_hash_cfg *cfg)\n {\n+\tstruct ice_flow_seg_info *seg;\n \tu64 val;\n \tu8 i;\n \n-\tice_for_each_set_bit(i, (ice_bitmap_t *)&hash_fields,\n+\t/* set inner most segment */\n+\tseg = &segs[seg_cnt - 1];\n+\n+\tice_for_each_set_bit(i, (const ice_bitmap_t *)&cfg->hash_flds,\n \t\t\t     ICE_FLOW_FIELD_IDX_MAX)\n-\t\tice_flow_set_fld(segs, (enum ice_flow_field)i,\n+\t\tice_flow_set_fld(seg, (enum ice_flow_field)i,\n \t\t\t\t ICE_FLOW_FLD_OFF_INVAL, ICE_FLOW_FLD_OFF_INVAL,\n \t\t\t\t ICE_FLOW_FLD_OFF_INVAL, false);\n \n-\tICE_FLOW_SET_HDRS(segs, flow_hdr);\n+\tICE_FLOW_SET_HDRS(seg, cfg->addl_hdrs);\n+\n+\t/* set outer most header */\n+\tif (cfg->hdr_type == ICE_RSS_INNER_HEADERS_W_OUTER_IPV4)\n+\t\tsegs[ICE_RSS_OUTER_HEADERS].hdrs |= ICE_FLOW_SEG_HDR_IPV4 |\n+\t\t\t\t\t\t   ICE_FLOW_SEG_HDR_IPV_OTHER;\n+\telse if (cfg->hdr_type == ICE_RSS_INNER_HEADERS_W_OUTER_IPV6)\n+\t\tsegs[ICE_RSS_OUTER_HEADERS].hdrs |= ICE_FLOW_SEG_HDR_IPV6 |\n+\t\t\t\t\t\t   ICE_FLOW_SEG_HDR_IPV_OTHER;\n \n-\tif (segs->hdrs & ~ICE_FLOW_RSS_SEG_HDR_VAL_MASKS &\n+\tif (seg->hdrs & ~ICE_FLOW_RSS_SEG_HDR_VAL_MASKS &\n \t    ~ICE_FLOW_RSS_HDRS_INNER_MASK & ~ICE_FLOW_SEG_HDR_IPV_OTHER)\n \t\treturn ICE_ERR_PARAM;\n \n-\tval = (u64)(segs->hdrs & ICE_FLOW_RSS_SEG_HDR_L3_MASKS);\n+\tval = (u64)(seg->hdrs & ICE_FLOW_RSS_SEG_HDR_L3_MASKS);\n \tif (val && !ice_is_pow2(val))\n \t\treturn ICE_ERR_CFG;\n \n-\tval = (u64)(segs->hdrs & ICE_FLOW_RSS_SEG_HDR_L4_MASKS);\n+\tval = (u64)(seg->hdrs & ICE_FLOW_RSS_SEG_HDR_L4_MASKS);\n \tif (val && !ice_is_pow2(val))\n \t\treturn ICE_ERR_CFG;\n \n@@ -3346,6 +3358,29 @@ enum ice_status ice_rem_vsi_rss_cfg(struct ice_hw *hw, u16 vsi_handle)\n \treturn status;\n }\n \n+/**\n+ * ice_get_rss_hdr_type - get a RSS profile's header type\n+ * @prof: RSS flow profile\n+ */\n+static enum ice_rss_cfg_hdr_type\n+ice_get_rss_hdr_type(struct ice_flow_prof *prof)\n+{\n+\tenum ice_rss_cfg_hdr_type hdr_type = ICE_RSS_ANY_HEADERS;\n+\n+\tif (prof->segs_cnt == ICE_FLOW_SEG_SINGLE) {\n+\t\thdr_type = ICE_RSS_OUTER_HEADERS;\n+\t} else if (prof->segs_cnt == ICE_FLOW_SEG_MAX) {\n+\t\tif (prof->segs[ICE_RSS_OUTER_HEADERS].hdrs == ICE_FLOW_SEG_HDR_NONE)\n+\t\t\thdr_type = ICE_RSS_INNER_HEADERS;\n+\t\tif (prof->segs[ICE_RSS_OUTER_HEADERS].hdrs & ICE_FLOW_SEG_HDR_IPV4)\n+\t\t\thdr_type = ICE_RSS_INNER_HEADERS_W_OUTER_IPV4;\n+\t\tif (prof->segs[ICE_RSS_OUTER_HEADERS].hdrs & ICE_FLOW_SEG_HDR_IPV6)\n+\t\t\thdr_type = ICE_RSS_INNER_HEADERS_W_OUTER_IPV6;\n+\t}\n+\n+\treturn hdr_type;\n+}\n+\n /**\n  * ice_rem_rss_list - remove RSS configuration from list\n  * @hw: pointer to the hardware structure\n@@ -3357,16 +3392,19 @@ enum ice_status ice_rem_vsi_rss_cfg(struct ice_hw *hw, u16 vsi_handle)\n static void\n ice_rem_rss_list(struct ice_hw *hw, u16 vsi_handle, struct ice_flow_prof *prof)\n {\n+\tenum ice_rss_cfg_hdr_type hdr_type;\n \tstruct ice_rss_cfg *r, *tmp;\n \n \t/* Search for RSS hash fields associated to the VSI that match the\n \t * hash configurations associated to the flow profile. If found\n \t * remove from the RSS entry list of the VSI context and delete entry.\n \t */\n+\thdr_type = ice_get_rss_hdr_type(prof);\n \tLIST_FOR_EACH_ENTRY_SAFE(r, tmp, &hw->rss_list_head,\n \t\t\t\t ice_rss_cfg, l_entry)\n-\t\tif (r->hashed_flds == prof->segs[prof->segs_cnt - 1].match &&\n-\t\t    r->packet_hdr == prof->segs[prof->segs_cnt - 1].hdrs) {\n+\t\tif (r->hash.hash_flds == prof->segs[prof->segs_cnt - 1].match &&\n+\t\t    r->hash.addl_hdrs == prof->segs[prof->segs_cnt - 1].hdrs &&\n+\t\t    r->hash.hdr_type == hdr_type) {\n \t\t\tice_clear_bit(vsi_handle, r->vsis);\n \t\t\tif (!ice_is_any_bit_set(r->vsis, ICE_MAX_VSI)) {\n \t\t\t\tLIST_DEL(&r->l_entry);\n@@ -3387,12 +3425,15 @@ ice_rem_rss_list(struct ice_hw *hw, u16 vsi_handle, struct ice_flow_prof *prof)\n static enum ice_status\n ice_add_rss_list(struct ice_hw *hw, u16 vsi_handle, struct ice_flow_prof *prof)\n {\n+\tenum ice_rss_cfg_hdr_type hdr_type;\n \tstruct ice_rss_cfg *r, *rss_cfg;\n \n+\thdr_type = ice_get_rss_hdr_type(prof);\n \tLIST_FOR_EACH_ENTRY(r, &hw->rss_list_head,\n \t\t\t    ice_rss_cfg, l_entry)\n-\t\tif (r->hashed_flds == prof->segs[prof->segs_cnt - 1].match &&\n-\t\t    r->packet_hdr == prof->segs[prof->segs_cnt - 1].hdrs) {\n+\t\tif (r->hash.hash_flds == prof->segs[prof->segs_cnt - 1].match &&\n+\t\t    r->hash.addl_hdrs == prof->segs[prof->segs_cnt - 1].hdrs &&\n+\t\t    r->hash.hdr_type == hdr_type) {\n \t\t\tice_set_bit(vsi_handle, r->vsis);\n \t\t\treturn ICE_SUCCESS;\n \t\t}\n@@ -3401,9 +3442,10 @@ ice_add_rss_list(struct ice_hw *hw, u16 vsi_handle, struct ice_flow_prof *prof)\n \tif (!rss_cfg)\n \t\treturn ICE_ERR_NO_MEMORY;\n \n-\trss_cfg->hashed_flds = prof->segs[prof->segs_cnt - 1].match;\n-\trss_cfg->packet_hdr = prof->segs[prof->segs_cnt - 1].hdrs;\n-\trss_cfg->symm = prof->cfg.symm;\n+\trss_cfg->hash.hash_flds = prof->segs[prof->segs_cnt - 1].match;\n+\trss_cfg->hash.addl_hdrs = prof->segs[prof->segs_cnt - 1].hdrs;\n+\trss_cfg->hash.hdr_type = hdr_type;\n+\trss_cfg->hash.symm = prof->cfg.symm;\n \tice_set_bit(vsi_handle, rss_cfg->vsis);\n \n \tLIST_ADD_TAIL(&rss_cfg->l_entry, &hw->rss_list_head);\n@@ -3415,21 +3457,22 @@ ice_add_rss_list(struct ice_hw *hw, u16 vsi_handle, struct ice_flow_prof *prof)\n #define ICE_FLOW_PROF_HASH_M\t(0xFFFFFFFFULL << ICE_FLOW_PROF_HASH_S)\n #define ICE_FLOW_PROF_HDR_S\t32\n #define ICE_FLOW_PROF_HDR_M\t(0x3FFFFFFFULL << ICE_FLOW_PROF_HDR_S)\n-#define ICE_FLOW_PROF_ENCAP_S\t63\n-#define ICE_FLOW_PROF_ENCAP_M\t(BIT_ULL(ICE_FLOW_PROF_ENCAP_S))\n-\n-#define ICE_RSS_OUTER_HEADERS\t1\n-#define ICE_RSS_INNER_HEADERS\t2\n+#define ICE_FLOW_PROF_ENCAP_S\t62\n+#define ICE_FLOW_PROF_ENCAP_M\t(0x3ULL << ICE_FLOW_PROF_ENCAP_S)\n \n /* Flow profile ID format:\n  * [0:31] - Packet match fields\n- * [32:62] - Protocol header\n- * [63] - Encapsulation flag, 0 if non-tunneled, 1 if tunneled\n+ * [32:61] - Protocol header\n+ * [62:63] - Encapsulation flag:\n+ *\t     0 if non-tunneled\n+ *\t     1 if tunneled\n+ *\t     2 for tunneled with outer ipv4\n+ *\t     3 for tunneled with outer ipv6\n  */\n-#define ICE_FLOW_GEN_PROFID(hash, hdr, segs_cnt) \\\n+#define ICE_FLOW_GEN_PROFID(hash, hdr, encap) \\\n \t(u64)(((u64)(hash) & ICE_FLOW_PROF_HASH_M) | \\\n \t      (((u64)(hdr) << ICE_FLOW_PROF_HDR_S) & ICE_FLOW_PROF_HDR_M) | \\\n-\t      ((u8)((segs_cnt) - 1) ? ICE_FLOW_PROF_ENCAP_M : 0))\n+\t      (((u64)(encap) << ICE_FLOW_PROF_ENCAP_S) & ICE_FLOW_PROF_ENCAP_M))\n \n static void\n ice_rss_config_xor_word(struct ice_hw *hw, u8 prof_id, u8 src, u8 dst)\n@@ -3540,24 +3583,22 @@ ice_rss_update_symm(struct ice_hw *hw,\n  * ice_add_rss_cfg_sync - add an RSS configuration\n  * @hw: pointer to the hardware structure\n  * @vsi_handle: software VSI handle\n- * @hashed_flds: hash bit fields (ICE_FLOW_HASH_*) to configure\n- * @addl_hdrs: protocol header fields\n- * @segs_cnt: packet segment count\n- * @symm: symmetric hash enable/disable\n+ * @cfg: configure parameters\n  *\n  * Assumption: lock has already been acquired for RSS list\n  */\n static enum ice_status\n-ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,\n-\t\t     u32 addl_hdrs, u8 segs_cnt, bool symm)\n+ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle,\n+\t\t     const struct ice_rss_hash_cfg *cfg)\n {\n \tconst enum ice_block blk = ICE_BLK_RSS;\n \tstruct ice_flow_prof *prof = NULL;\n \tstruct ice_flow_seg_info *segs;\n \tenum ice_status status;\n+\tu8 segs_cnt;\n \n-\tif (!segs_cnt || segs_cnt > ICE_FLOW_SEG_MAX)\n-\t\treturn ICE_ERR_PARAM;\n+\tsegs_cnt = (cfg->hdr_type == ICE_RSS_OUTER_HEADERS) ?\n+\t\t\tICE_FLOW_SEG_SINGLE : ICE_FLOW_SEG_MAX;\n \n \tsegs = (struct ice_flow_seg_info *)ice_calloc(hw, segs_cnt,\n \t\t\t\t\t\t      sizeof(*segs));\n@@ -3565,18 +3606,10 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,\n \t\treturn ICE_ERR_NO_MEMORY;\n \n \t/* Construct the packet segment info from the hashed fields */\n-\tstatus = ice_flow_set_rss_seg_info(&segs[segs_cnt - 1], hashed_flds,\n-\t\t\t\t\t   addl_hdrs);\n+\tstatus = ice_flow_set_rss_seg_info(segs, segs_cnt, cfg);\n \tif (status)\n \t\tgoto exit;\n \n-\t/* Don't do RSS for GTPU Outer */\n-\tif (segs_cnt == ICE_RSS_OUTER_HEADERS &&\n-\t    segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU) {\n-\t\tstatus = ICE_SUCCESS;\n-\t\tgoto exit;\n-\t}\n-\n \t/* Search for a flow profile that has matching headers, hash fields\n \t * and has the input VSI associated to it. If found, no further\n \t * operations required and exit.\n@@ -3586,9 +3619,9 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,\n \t\t\t\t\tICE_FLOW_FIND_PROF_CHK_FLDS |\n \t\t\t\t\tICE_FLOW_FIND_PROF_CHK_VSI);\n \tif (prof) {\n-\t\tif (prof->cfg.symm == symm)\n+\t\tif (prof->cfg.symm == cfg->symm)\n \t\t\tgoto exit;\n-\t\tprof->cfg.symm = symm;\n+\t\tprof->cfg.symm = cfg->symm;\n \t\tgoto update_symm;\n \t}\n \n@@ -3621,7 +3654,7 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,\n \t\t\t\t\tvsi_handle,\n \t\t\t\t\tICE_FLOW_FIND_PROF_CHK_FLDS);\n \tif (prof) {\n-\t\tif (prof->cfg.symm == symm) {\n+\t\tif (prof->cfg.symm == cfg->symm) {\n \t\t\tstatus = ice_flow_assoc_prof(hw, blk, prof,\n \t\t\t\t\t\t     vsi_handle);\n \t\t\tif (!status)\n@@ -3640,9 +3673,9 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,\n \t * segment information.\n \t */\n \tstatus = ice_flow_add_prof(hw, blk, ICE_FLOW_RX,\n-\t\t\t\t   ICE_FLOW_GEN_PROFID(hashed_flds,\n+\t\t\t\t   ICE_FLOW_GEN_PROFID(cfg->hash_flds,\n \t\t\t\t\t\t       segs[segs_cnt - 1].hdrs,\n-\t\t\t\t\t\t       segs_cnt),\n+\t\t\t\t\t\t       cfg->hdr_type),\n \t\t\t\t   segs, segs_cnt, NULL, 0, &prof);\n \tif (status)\n \t\tgoto exit;\n@@ -3658,8 +3691,7 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,\n \n \tstatus = ice_add_rss_list(hw, vsi_handle, prof);\n \n-\tprof->cfg.symm = symm;\n-\n+\tprof->cfg.symm = cfg->symm;\n update_symm:\n \tice_rss_update_symm(hw, prof);\n \n@@ -3672,32 +3704,40 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,\n  * ice_add_rss_cfg - add an RSS configuration with specified hashed fields\n  * @hw: pointer to the hardware structure\n  * @vsi_handle: software VSI handle\n- * @hashed_flds: hash bit fields (ICE_FLOW_HASH_*) to configure\n- * @addl_hdrs: protocol header fields\n- * @symm: symmetric hash enable/disable\n+ * @cfg: configure parameters\n  *\n  * This function will generate a flow profile based on fields associated with\n  * the input fields to hash on, the flow type and use the VSI number to add\n  * a flow entry to the profile.\n  */\n enum ice_status\n-ice_add_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,\n-\t\tu32 addl_hdrs, bool symm)\n+ice_add_rss_cfg(struct ice_hw *hw, u16 vsi_handle,\n+\t\tconst struct ice_rss_hash_cfg *cfg)\n {\n+\tstruct ice_rss_hash_cfg local_cfg;\n \tenum ice_status status;\n \n-\tif (hashed_flds == ICE_HASH_INVALID ||\n-\t    !ice_is_vsi_valid(hw, vsi_handle))\n+\tif (!ice_is_vsi_valid(hw, vsi_handle) ||\n+\t    !cfg || cfg->hdr_type > ICE_RSS_ANY_HEADERS ||\n+\t    cfg->hash_flds == ICE_HASH_INVALID)\n \t\treturn ICE_ERR_PARAM;\n \n-\tice_acquire_lock(&hw->rss_locks);\n-\tstatus = ice_add_rss_cfg_sync(hw, vsi_handle, hashed_flds, addl_hdrs,\n-\t\t\t\t      ICE_RSS_OUTER_HEADERS, symm);\n-\tif (!status)\n-\t\tstatus = ice_add_rss_cfg_sync(hw, vsi_handle, hashed_flds,\n-\t\t\t\t\t      addl_hdrs, ICE_RSS_INNER_HEADERS,\n-\t\t\t\t\t      symm);\n-\tice_release_lock(&hw->rss_locks);\n+\tlocal_cfg = *cfg;\n+\tif (cfg->hdr_type < ICE_RSS_ANY_HEADERS) {\n+\t\tice_acquire_lock(&hw->rss_locks);\n+\t\tstatus = ice_add_rss_cfg_sync(hw, vsi_handle, &local_cfg);\n+\t\tice_release_lock(&hw->rss_locks);\n+\t} else {\n+\t\tice_acquire_lock(&hw->rss_locks);\n+\t\tlocal_cfg.hdr_type = ICE_RSS_OUTER_HEADERS;\n+\t\tstatus = ice_add_rss_cfg_sync(hw, vsi_handle, &local_cfg);\n+\t\tif (!status) {\n+\t\t\tlocal_cfg.hdr_type = ICE_RSS_INNER_HEADERS;\n+\t\t\tstatus = ice_add_rss_cfg_sync(hw, vsi_handle,\n+\t\t\t\t\t\t      &local_cfg);\n+\t\t}\n+\t\tice_release_lock(&hw->rss_locks);\n+\t}\n \n \treturn status;\n }\n@@ -3706,39 +3746,32 @@ ice_add_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,\n  * ice_rem_rss_cfg_sync - remove an existing RSS configuration\n  * @hw: pointer to the hardware structure\n  * @vsi_handle: software VSI handle\n- * @hashed_flds: Packet hash types (ICE_FLOW_HASH_*) to remove\n- * @addl_hdrs: Protocol header fields within a packet segment\n- * @segs_cnt: packet segment count\n+ * @cfg: configure parameters\n  *\n  * Assumption: lock has already been acquired for RSS list\n  */\n static enum ice_status\n-ice_rem_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,\n-\t\t     u32 addl_hdrs, u8 segs_cnt)\n+ice_rem_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle,\n+\t\t     const struct ice_rss_hash_cfg *cfg)\n {\n \tconst enum ice_block blk = ICE_BLK_RSS;\n \tstruct ice_flow_seg_info *segs;\n \tstruct ice_flow_prof *prof;\n \tenum ice_status status;\n+\tu8 segs_cnt;\n \n+\tsegs_cnt = (cfg->hdr_type == ICE_RSS_OUTER_HEADERS) ?\n+\t\t\tICE_FLOW_SEG_SINGLE : ICE_FLOW_SEG_MAX;\n \tsegs = (struct ice_flow_seg_info *)ice_calloc(hw, segs_cnt,\n \t\t\t\t\t\t      sizeof(*segs));\n \tif (!segs)\n \t\treturn ICE_ERR_NO_MEMORY;\n \n \t/* Construct the packet segment info from the hashed fields */\n-\tstatus = ice_flow_set_rss_seg_info(&segs[segs_cnt - 1], hashed_flds,\n-\t\t\t\t\t   addl_hdrs);\n+\tstatus = ice_flow_set_rss_seg_info(segs, segs_cnt, cfg);\n \tif (status)\n \t\tgoto out;\n \n-\t/* Don't do RSS for GTPU Outer */\n-\tif (segs_cnt == ICE_RSS_OUTER_HEADERS &&\n-\t    segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU) {\n-\t\tstatus = ICE_SUCCESS;\n-\t\tgoto out;\n-\t}\n-\n \tprof = ice_flow_find_prof_conds(hw, blk, ICE_FLOW_RX, segs, segs_cnt,\n \t\t\t\t\tvsi_handle,\n \t\t\t\t\tICE_FLOW_FIND_PROF_CHK_FLDS);\n@@ -3768,8 +3801,7 @@ ice_rem_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,\n  * ice_rem_rss_cfg - remove an existing RSS config with matching hashed fields\n  * @hw: pointer to the hardware structure\n  * @vsi_handle: software VSI handle\n- * @hashed_flds: Packet hash types (ICE_FLOW_HASH_*) to remove\n- * @addl_hdrs: Protocol header fields within a packet segment\n+ * @cfg: configure parameters\n  *\n  * This function will lookup the flow profile based on the input\n  * hash field bitmap, iterate through the profile entry list of\n@@ -3778,21 +3810,31 @@ ice_rem_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,\n  * turn build or update buffers for RSS XLT1 section.\n  */\n enum ice_status\n-ice_rem_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,\n-\t\tu32 addl_hdrs)\n+ice_rem_rss_cfg(struct ice_hw *hw, u16 vsi_handle,\n+\t\tconst struct ice_rss_hash_cfg *cfg)\n {\n+\tstruct ice_rss_hash_cfg local_cfg;\n \tenum ice_status status;\n \n-\tif (hashed_flds == ICE_HASH_INVALID ||\n-\t    !ice_is_vsi_valid(hw, vsi_handle))\n+\tif (!ice_is_vsi_valid(hw, vsi_handle) ||\n+\t    !cfg || cfg->hdr_type > ICE_RSS_ANY_HEADERS ||\n+\t    cfg->hash_flds == ICE_HASH_INVALID)\n \t\treturn ICE_ERR_PARAM;\n \n \tice_acquire_lock(&hw->rss_locks);\n-\tstatus = ice_rem_rss_cfg_sync(hw, vsi_handle, hashed_flds, addl_hdrs,\n-\t\t\t\t      ICE_RSS_OUTER_HEADERS);\n-\tif (!status)\n-\t\tstatus = ice_rem_rss_cfg_sync(hw, vsi_handle, hashed_flds,\n-\t\t\t\t\t      addl_hdrs, ICE_RSS_INNER_HEADERS);\n+\tlocal_cfg = *cfg;\n+\tif (cfg->hdr_type < ICE_RSS_ANY_HEADERS) {\n+\t\tstatus = ice_rem_rss_cfg_sync(hw, vsi_handle, &local_cfg);\n+\t} else {\n+\t\tlocal_cfg.hdr_type = ICE_RSS_OUTER_HEADERS;\n+\t\tstatus = ice_rem_rss_cfg_sync(hw, vsi_handle, &local_cfg);\n+\n+\t\tif (!status) {\n+\t\t\tlocal_cfg.hdr_type = ICE_RSS_INNER_HEADERS;\n+\t\t\tstatus = ice_rem_rss_cfg_sync(hw, vsi_handle,\n+\t\t\t\t\t\t      &local_cfg);\n+\t\t}\n+\t}\n \tice_release_lock(&hw->rss_locks);\n \n \treturn status;\n@@ -3815,18 +3857,7 @@ enum ice_status ice_replay_rss_cfg(struct ice_hw *hw, u16 vsi_handle)\n \tLIST_FOR_EACH_ENTRY(r, &hw->rss_list_head,\n \t\t\t    ice_rss_cfg, l_entry) {\n \t\tif (ice_is_bit_set(r->vsis, vsi_handle)) {\n-\t\t\tstatus = ice_add_rss_cfg_sync(hw, vsi_handle,\n-\t\t\t\t\t\t      r->hashed_flds,\n-\t\t\t\t\t\t      r->packet_hdr,\n-\t\t\t\t\t\t      ICE_RSS_OUTER_HEADERS,\n-\t\t\t\t\t\t      r->symm);\n-\t\t\tif (status)\n-\t\t\t\tbreak;\n-\t\t\tstatus = ice_add_rss_cfg_sync(hw, vsi_handle,\n-\t\t\t\t\t\t      r->hashed_flds,\n-\t\t\t\t\t\t      r->packet_hdr,\n-\t\t\t\t\t\t      ICE_RSS_INNER_HEADERS,\n-\t\t\t\t\t\t      r->symm);\n+\t\t\tstatus = ice_add_rss_cfg_sync(hw, vsi_handle, &r->hash);\n \t\t\tif (status)\n \t\t\t\tbreak;\n \t\t}\n@@ -3858,8 +3889,8 @@ u64 ice_get_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u32 hdrs)\n \tLIST_FOR_EACH_ENTRY(r, &hw->rss_list_head,\n \t\t\t    ice_rss_cfg, l_entry)\n \t\tif (ice_is_bit_set(r->vsis, vsi_handle) &&\n-\t\t    r->packet_hdr == hdrs) {\n-\t\t\trss_hash = r->hashed_flds;\n+\t\t    r->hash.addl_hdrs == hdrs) {\n+\t\t\trss_hash = r->hash.hash_flds;\n \t\t\tbreak;\n \t\t}\n \tice_release_lock(&hw->rss_locks);\ndiff --git a/drivers/net/ice/base/ice_flow.h b/drivers/net/ice/base/ice_flow.h\nindex 698a2303bc..2a9ae66454 100644\n--- a/drivers/net/ice/base/ice_flow.h\n+++ b/drivers/net/ice/base/ice_flow.h\n@@ -323,6 +323,24 @@ enum ice_flow_avf_hdr_field {\n \tBIT_ULL(ICE_AVF_FLOW_FIELD_UNICAST_IPV6_UDP) | \\\n \tBIT_ULL(ICE_AVF_FLOW_FIELD_MULTICAST_IPV6_UDP))\n \n+enum ice_rss_cfg_hdr_type {\n+\tICE_RSS_OUTER_HEADERS, /* take outer headers as inputset. */\n+\tICE_RSS_INNER_HEADERS, /* take inner headers as inputset. */\n+\t/* take inner headers as inputset for packet with outer ipv4. */\n+\tICE_RSS_INNER_HEADERS_W_OUTER_IPV4,\n+\t/* take inner headers as inputset for packet with outer ipv6. */\n+\tICE_RSS_INNER_HEADERS_W_OUTER_IPV6,\n+\t/* take outer headers first then inner headers as inputset */\n+\tICE_RSS_ANY_HEADERS\n+};\n+\n+struct ice_rss_hash_cfg {\n+\tu32 addl_hdrs; /* protocol header fields */\n+\tu64 hash_flds; /* hash bit field (ICE_FLOW_HASH_*) to configure */\n+\tenum ice_rss_cfg_hdr_type hdr_type; /* to specify inner or outer */\n+\tbool symm; /* symmetric or asymmetric hash */\n+};\n+\n enum ice_flow_dir {\n \tICE_FLOW_DIR_UNDEFINED\t= 0,\n \tICE_FLOW_TX\t\t= 0x01,\n@@ -336,6 +354,7 @@ enum ice_flow_priority {\n \tICE_FLOW_PRIO_HIGH\n };\n \n+#define ICE_FLOW_SEG_SINGLE\t\t1\n #define ICE_FLOW_SEG_MAX\t\t2\n #define ICE_FLOW_SEG_RAW_FLD_MAX\t2\n #define ICE_FLOW_PROFILE_MAX\t\t1024\n@@ -440,8 +459,7 @@ struct ice_flow_prof {\n \t\tstruct ice_acl_scen *scen;\n \t\t/* struct fd */\n \t\tu32 data;\n-\t\t/* Symmetric Hash for RSS */\n-\t\tbool symm;\n+\t\tbool symm; /* Symmetric Hash for RSS */\n \t} cfg;\n \n \t/* Default actions */\n@@ -452,9 +470,7 @@ struct ice_rss_cfg {\n \tstruct LIST_ENTRY_TYPE l_entry;\n \t/* bitmap of VSIs added to the RSS entry */\n \tice_declare_bitmap(vsis, ICE_MAX_VSI);\n-\tu64 hashed_flds;\n-\tu32 packet_hdr;\n-\tbool symm;\n+\tstruct ice_rss_hash_cfg hash;\n };\n \n enum ice_flow_action_type {\n@@ -531,10 +547,10 @@ enum ice_status\n ice_add_avf_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds);\n enum ice_status ice_rem_vsi_rss_cfg(struct ice_hw *hw, u16 vsi_handle);\n enum ice_status\n-ice_add_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,\n-\t\tu32 addl_hdrs, bool symm);\n+ice_add_rss_cfg(struct ice_hw *hw, u16 vsi_handle,\n+\t\tconst struct ice_rss_hash_cfg *cfg);\n enum ice_status\n-ice_rem_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,\n-\t\tu32 addl_hdrs);\n+ice_rem_rss_cfg(struct ice_hw *hw, u16 vsi_handle,\n+\t\tconst struct ice_rss_hash_cfg *cfg);\n u64 ice_get_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u32 hdrs);\n #endif /* _ICE_FLOW_H_ */\ndiff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c\nindex 51b99c6506..6d6c24c5d2 100644\n--- a/drivers/net/ice/ice_ethdev.c\n+++ b/drivers/net/ice/ice_ethdev.c\n@@ -2433,21 +2433,13 @@ ice_dev_uninit(struct rte_eth_dev *dev)\n \treturn 0;\n }\n \n-static bool\n-is_hash_cfg_valid(struct ice_rss_hash_cfg *cfg)\n-{\n-\treturn ((cfg->hash_func >= ICE_RSS_HASH_TOEPLITZ &&\n-\t\t cfg->hash_func <= ICE_RSS_HASH_JHASH) &&\n-\t\t(cfg->hash_flds != 0 && cfg->addl_hdrs != 0)) ?\n-\t\ttrue : false;\n-}\n-\n static void\n hash_cfg_reset(struct ice_rss_hash_cfg *cfg)\n {\n \tcfg->hash_flds = 0;\n \tcfg->addl_hdrs = 0;\n-\tcfg->hash_func = 0;\n+\tcfg->symm = 0;\n+\tcfg->hdr_type = ICE_RSS_ANY_HEADERS;\n }\n \n static int\n@@ -2457,11 +2449,7 @@ ice_hash_moveout(struct ice_pf *pf, struct ice_rss_hash_cfg *cfg)\n \tstruct ice_hw *hw = ICE_PF_TO_HW(pf);\n \tstruct ice_vsi *vsi = pf->main_vsi;\n \n-\tif (!is_hash_cfg_valid(cfg))\n-\t\treturn -ENOENT;\n-\n-\tstatus = ice_rem_rss_cfg(hw, vsi->idx, cfg->hash_flds,\n-\t\t\t\t cfg->addl_hdrs);\n+\tstatus = ice_rem_rss_cfg(hw, vsi->idx, cfg);\n \tif (status && status != ICE_ERR_DOES_NOT_EXIST) {\n \t\tPMD_DRV_LOG(ERR,\n \t\t\t    \"ice_rem_rss_cfg failed for VSI:%d, error:%d\\n\",\n@@ -2478,16 +2466,8 @@ ice_hash_moveback(struct ice_pf *pf, struct ice_rss_hash_cfg *cfg)\n \tenum ice_status status = ICE_SUCCESS;\n \tstruct ice_hw *hw = ICE_PF_TO_HW(pf);\n \tstruct ice_vsi *vsi = pf->main_vsi;\n-\tbool symm;\n-\n-\tif (!is_hash_cfg_valid(cfg))\n-\t\treturn -ENOENT;\n \n-\tsymm = (cfg->hash_func == ICE_RSS_HASH_TOEPLITZ_SYMMETRIC) ?\n-\t\ttrue : false;\n-\n-\tstatus = ice_add_rss_cfg(hw, vsi->idx, cfg->hash_flds,\n-\t\t\t\t cfg->addl_hdrs, symm);\n+\tstatus = ice_add_rss_cfg(hw, vsi->idx, cfg);\n \tif (status) {\n \t\tPMD_DRV_LOG(ERR,\n \t\t\t    \"ice_add_rss_cfg failed for VSI:%d, error:%d\\n\",\n@@ -2764,15 +2744,12 @@ ice_add_rss_cfg_pre(struct ice_pf *pf, uint32_t hdr)\n \n static int\n ice_add_rss_cfg_post_gtpu(struct ice_pf *pf, struct ice_hash_gtpu_ctx *ctx,\n-\t\t\t  u32 hdr, u64 fld, bool symm, u8 ctx_idx)\n+\t\t\t  u8 ctx_idx, struct ice_rss_hash_cfg *cfg)\n {\n \tint ret;\n \n-\tif (ctx_idx < ICE_HASH_GTPU_CTX_MAX) {\n-\t\tctx->ctx[ctx_idx].addl_hdrs = hdr;\n-\t\tctx->ctx[ctx_idx].hash_flds = fld;\n-\t\tctx->ctx[ctx_idx].hash_func = symm;\n-\t}\n+\tif (ctx_idx < ICE_HASH_GTPU_CTX_MAX)\n+\t\tctx->ctx[ctx_idx] = *cfg;\n \n \tswitch (ctx_idx) {\n \tcase ICE_HASH_GTPU_CTX_EH_IP:\n@@ -2851,16 +2828,16 @@ ice_add_rss_cfg_post_gtpu(struct ice_pf *pf, struct ice_hash_gtpu_ctx *ctx,\n }\n \n static int\n-ice_add_rss_cfg_post(struct ice_pf *pf, uint32_t hdr, uint64_t fld, bool symm)\n+ice_add_rss_cfg_post(struct ice_pf *pf, struct ice_rss_hash_cfg *cfg)\n {\n-\tu8 gtpu_ctx_idx = calc_gtpu_ctx_idx(hdr);\n+\tu8 gtpu_ctx_idx = calc_gtpu_ctx_idx(cfg->addl_hdrs);\n \n-\tif (hdr & ICE_FLOW_SEG_HDR_IPV4)\n-\t\treturn ice_add_rss_cfg_post_gtpu(pf, &pf->hash_ctx.gtpu4, hdr,\n-\t\t\t\t\t\t fld, symm, gtpu_ctx_idx);\n-\telse if (hdr & ICE_FLOW_SEG_HDR_IPV6)\n-\t\treturn ice_add_rss_cfg_post_gtpu(pf, &pf->hash_ctx.gtpu6, hdr,\n-\t\t\t\t\t\t fld, symm, gtpu_ctx_idx);\n+\tif (cfg->addl_hdrs & ICE_FLOW_SEG_HDR_IPV4)\n+\t\treturn ice_add_rss_cfg_post_gtpu(pf, &pf->hash_ctx.gtpu4,\n+\t\t\t\t\t\t gtpu_ctx_idx, cfg);\n+\telse if (cfg->addl_hdrs & ICE_FLOW_SEG_HDR_IPV6)\n+\t\treturn ice_add_rss_cfg_post_gtpu(pf, &pf->hash_ctx.gtpu6,\n+\t\t\t\t\t\t gtpu_ctx_idx, cfg);\n \n \treturn 0;\n }\n@@ -2881,36 +2858,36 @@ ice_rem_rss_cfg_post(struct ice_pf *pf, uint32_t hdr)\n \n int\n ice_rem_rss_cfg_wrap(struct ice_pf *pf, uint16_t vsi_id,\n-\t\tuint64_t fld, uint32_t hdr)\n+\t\t     struct ice_rss_hash_cfg *cfg)\n {\n \tstruct ice_hw *hw = ICE_PF_TO_HW(pf);\n \tint ret;\n \n-\tret = ice_rem_rss_cfg(hw, vsi_id, fld, hdr);\n+\tret = ice_rem_rss_cfg(hw, vsi_id, cfg);\n \tif (ret && ret != ICE_ERR_DOES_NOT_EXIST)\n \t\tPMD_DRV_LOG(ERR, \"remove rss cfg failed\\n\");\n \n-\tice_rem_rss_cfg_post(pf, hdr);\n+\tice_rem_rss_cfg_post(pf, cfg->addl_hdrs);\n \n \treturn 0;\n }\n \n int\n ice_add_rss_cfg_wrap(struct ice_pf *pf, uint16_t vsi_id,\n-\t\tuint64_t fld, uint32_t hdr, bool symm)\n+\t\t     struct ice_rss_hash_cfg *cfg)\n {\n \tstruct ice_hw *hw = ICE_PF_TO_HW(pf);\n \tint ret;\n \n-\tret = ice_add_rss_cfg_pre(pf, hdr);\n+\tret = ice_add_rss_cfg_pre(pf, cfg->addl_hdrs);\n \tif (ret)\n \t\tPMD_DRV_LOG(ERR, \"add rss cfg pre failed\\n\");\n \n-\tret = ice_add_rss_cfg(hw, vsi_id, fld, hdr, symm);\n+\tret = ice_add_rss_cfg(hw, vsi_id, cfg);\n \tif (ret)\n \t\tPMD_DRV_LOG(ERR, \"add rss cfg failed\\n\");\n \n-\tret = ice_add_rss_cfg_post(pf, hdr, fld, symm);\n+\tret = ice_add_rss_cfg_post(pf, cfg);\n \tif (ret)\n \t\tPMD_DRV_LOG(ERR, \"add rss cfg post failed\\n\");\n \n@@ -2921,13 +2898,16 @@ static void\n ice_rss_hash_set(struct ice_pf *pf, uint64_t rss_hf)\n {\n \tstruct ice_vsi *vsi = pf->main_vsi;\n+\tstruct ice_rss_hash_cfg cfg;\n \tint ret;\n \n+\tcfg.symm = 0;\n+\tcfg.hdr_type = ICE_RSS_ANY_HEADERS;\n \t/* Configure RSS for IPv4 with src/dst addr as input set */\n \tif (rss_hf & ETH_RSS_IPV4) {\n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_FLOW_HASH_IPV4,\n-\t\t\t\t      ICE_FLOW_SEG_HDR_IPV4 |\n-\t\t\t\t      ICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tcfg.hash_flds = ICE_FLOW_HASH_IPV4;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s IPV4 rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n@@ -2935,9 +2915,9 @@ ice_rss_hash_set(struct ice_pf *pf, uint64_t rss_hf)\n \n \t/* Configure RSS for IPv6 with src/dst addr as input set */\n \tif (rss_hf & ETH_RSS_IPV6) {\n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_FLOW_HASH_IPV6,\n-\t\t\t\t      ICE_FLOW_SEG_HDR_IPV6 |\n-\t\t\t\t      ICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tcfg.hash_flds = ICE_FLOW_HASH_IPV6;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s IPV6 rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n@@ -2945,10 +2925,10 @@ ice_rss_hash_set(struct ice_pf *pf, uint64_t rss_hf)\n \n \t/* Configure RSS for udp4 with src/dst addr and port as input set */\n \tif (rss_hf & ETH_RSS_NONFRAG_IPV4_UDP) {\n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_HASH_UDP_IPV4,\n-\t\t\t\t      ICE_FLOW_SEG_HDR_UDP |\n-\t\t\t\t      ICE_FLOW_SEG_HDR_IPV4 |\n-\t\t\t\t      ICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_UDP | ICE_FLOW_SEG_HDR_IPV4 |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tcfg.hash_flds = ICE_HASH_UDP_IPV4;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s UDP_IPV4 rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n@@ -2956,10 +2936,10 @@ ice_rss_hash_set(struct ice_pf *pf, uint64_t rss_hf)\n \n \t/* Configure RSS for udp6 with src/dst addr and port as input set */\n \tif (rss_hf & ETH_RSS_NONFRAG_IPV6_UDP) {\n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_HASH_UDP_IPV6,\n-\t\t\t\t      ICE_FLOW_SEG_HDR_UDP |\n-\t\t\t\t      ICE_FLOW_SEG_HDR_IPV6 |\n-\t\t\t\t      ICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_UDP | ICE_FLOW_SEG_HDR_IPV6 |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tcfg.hash_flds = ICE_HASH_UDP_IPV6;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s UDP_IPV6 rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n@@ -2967,10 +2947,10 @@ ice_rss_hash_set(struct ice_pf *pf, uint64_t rss_hf)\n \n \t/* Configure RSS for tcp4 with src/dst addr and port as input set */\n \tif (rss_hf & ETH_RSS_NONFRAG_IPV4_TCP) {\n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_HASH_TCP_IPV4,\n-\t\t\t\t      ICE_FLOW_SEG_HDR_TCP |\n-\t\t\t\t      ICE_FLOW_SEG_HDR_IPV4 |\n-\t\t\t\t      ICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_TCP | ICE_FLOW_SEG_HDR_IPV4 |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tcfg.hash_flds = ICE_HASH_TCP_IPV4;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s TCP_IPV4 rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n@@ -2978,10 +2958,10 @@ ice_rss_hash_set(struct ice_pf *pf, uint64_t rss_hf)\n \n \t/* Configure RSS for tcp6 with src/dst addr and port as input set */\n \tif (rss_hf & ETH_RSS_NONFRAG_IPV6_TCP) {\n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_HASH_TCP_IPV6,\n-\t\t\t\t      ICE_FLOW_SEG_HDR_TCP |\n-\t\t\t\t      ICE_FLOW_SEG_HDR_IPV6 |\n-\t\t\t\t      ICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_TCP | ICE_FLOW_SEG_HDR_IPV6 |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tcfg.hash_flds = ICE_HASH_TCP_IPV6;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s TCP_IPV6 rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n@@ -2989,10 +2969,10 @@ ice_rss_hash_set(struct ice_pf *pf, uint64_t rss_hf)\n \n \t/* Configure RSS for sctp4 with src/dst addr and port as input set */\n \tif (rss_hf & ETH_RSS_NONFRAG_IPV4_SCTP) {\n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_HASH_SCTP_IPV4,\n-\t\t\t\t      ICE_FLOW_SEG_HDR_SCTP |\n-\t\t\t\t      ICE_FLOW_SEG_HDR_IPV4 |\n-\t\t\t\t      ICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_SCTP | ICE_FLOW_SEG_HDR_IPV4 |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tcfg.hash_flds = ICE_HASH_SCTP_IPV4;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s SCTP_IPV4 rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n@@ -3000,218 +2980,188 @@ ice_rss_hash_set(struct ice_pf *pf, uint64_t rss_hf)\n \n \t/* Configure RSS for sctp6 with src/dst addr and port as input set */\n \tif (rss_hf & ETH_RSS_NONFRAG_IPV6_SCTP) {\n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_HASH_SCTP_IPV6,\n-\t\t\t\t      ICE_FLOW_SEG_HDR_SCTP |\n-\t\t\t\t      ICE_FLOW_SEG_HDR_IPV6 |\n-\t\t\t\t      ICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_SCTP | ICE_FLOW_SEG_HDR_IPV6 |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tcfg.hash_flds = ICE_HASH_SCTP_IPV6;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s SCTP_IPV6 rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n \t}\n \n \tif (rss_hf & ETH_RSS_IPV4) {\n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_FLOW_HASH_IPV4,\n-\t\t\t\tICE_FLOW_SEG_HDR_GTPU_IP |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV4 |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_GTPU_IP | ICE_FLOW_SEG_HDR_IPV4 |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tcfg.hash_flds = ICE_FLOW_HASH_IPV4;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_IPV4 rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n \n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_FLOW_HASH_IPV4,\n-\t\t\t\tICE_FLOW_SEG_HDR_GTPU_EH |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV4 |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_GTPU_EH | ICE_FLOW_SEG_HDR_IPV4 |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\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 \n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_FLOW_HASH_IPV4,\n-\t\t\t\tICE_FLOW_SEG_HDR_PPPOE |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV4 |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_PPPOE | ICE_FLOW_SEG_HDR_IPV4 |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s PPPoE_IPV4 rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n \t}\n \n \tif (rss_hf & ETH_RSS_IPV6) {\n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_FLOW_HASH_IPV6,\n-\t\t\t\tICE_FLOW_SEG_HDR_GTPU_IP |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV6 |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_GTPU_IP | ICE_FLOW_SEG_HDR_IPV6 |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tcfg.hash_flds = ICE_FLOW_HASH_IPV6;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_IPV6 rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n \n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_FLOW_HASH_IPV6,\n-\t\t\t\tICE_FLOW_SEG_HDR_GTPU_EH |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV6 |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_GTPU_EH | ICE_FLOW_SEG_HDR_IPV6 |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\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 \n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_FLOW_HASH_IPV6,\n-\t\t\t\tICE_FLOW_SEG_HDR_PPPOE |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV6 |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_PPPOE | ICE_FLOW_SEG_HDR_IPV6 |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s PPPoE_IPV6 rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n \t}\n \n \tif (rss_hf & ETH_RSS_NONFRAG_IPV4_UDP) {\n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_HASH_UDP_IPV4,\n-\t\t\t\tICE_FLOW_SEG_HDR_GTPU_IP |\n-\t\t\t\tICE_FLOW_SEG_HDR_UDP |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV4 |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_GTPU_IP | ICE_FLOW_SEG_HDR_UDP |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tcfg.hash_flds = ICE_FLOW_HASH_IPV4;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_IPV4_UDP rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n \n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_HASH_UDP_IPV4,\n-\t\t\t\tICE_FLOW_SEG_HDR_GTPU_EH |\n-\t\t\t\tICE_FLOW_SEG_HDR_UDP |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV4 |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_GTPU_EH | ICE_FLOW_SEG_HDR_UDP |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\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 \n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_HASH_UDP_IPV4,\n-\t\t\t\tICE_FLOW_SEG_HDR_PPPOE |\n-\t\t\t\tICE_FLOW_SEG_HDR_UDP |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV4 |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_PPPOE | ICE_FLOW_SEG_HDR_UDP |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s PPPoE_IPV4_UDP rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n \t}\n \n \tif (rss_hf & ETH_RSS_NONFRAG_IPV6_UDP) {\n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_HASH_UDP_IPV6,\n-\t\t\t\tICE_FLOW_SEG_HDR_GTPU_IP |\n-\t\t\t\tICE_FLOW_SEG_HDR_UDP |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV6 |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_GTPU_IP | ICE_FLOW_SEG_HDR_UDP |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tcfg.hash_flds = ICE_FLOW_HASH_IPV6;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_IPV6_UDP rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n \n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_HASH_UDP_IPV6,\n-\t\t\t\tICE_FLOW_SEG_HDR_GTPU_EH |\n-\t\t\t\tICE_FLOW_SEG_HDR_UDP |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV6 |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_GTPU_EH | ICE_FLOW_SEG_HDR_UDP |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\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 \n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_HASH_UDP_IPV6,\n-\t\t\t\tICE_FLOW_SEG_HDR_PPPOE |\n-\t\t\t\tICE_FLOW_SEG_HDR_UDP |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV6 |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_PPPOE | ICE_FLOW_SEG_HDR_UDP |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s PPPoE_IPV6_UDP rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n \t}\n \n \tif (rss_hf & ETH_RSS_NONFRAG_IPV4_TCP) {\n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_HASH_TCP_IPV4,\n-\t\t\t\tICE_FLOW_SEG_HDR_GTPU_IP |\n-\t\t\t\tICE_FLOW_SEG_HDR_TCP |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV4 |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_GTPU_IP | ICE_FLOW_SEG_HDR_TCP |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tcfg.hash_flds = ICE_FLOW_HASH_IPV4;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_IPV4_TCP rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n \n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_HASH_TCP_IPV4,\n-\t\t\t\tICE_FLOW_SEG_HDR_GTPU_EH |\n-\t\t\t\tICE_FLOW_SEG_HDR_TCP |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV4 |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_GTPU_EH | ICE_FLOW_SEG_HDR_TCP |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\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 \n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_HASH_TCP_IPV4,\n-\t\t\t\tICE_FLOW_SEG_HDR_PPPOE |\n-\t\t\t\tICE_FLOW_SEG_HDR_TCP |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV4 |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_PPPOE | ICE_FLOW_SEG_HDR_TCP |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s PPPoE_IPV4_TCP rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n \t}\n \n \tif (rss_hf & ETH_RSS_NONFRAG_IPV6_TCP) {\n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_HASH_TCP_IPV6,\n-\t\t\t\tICE_FLOW_SEG_HDR_GTPU_IP |\n-\t\t\t\tICE_FLOW_SEG_HDR_TCP |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV6 |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_GTPU_IP | ICE_FLOW_SEG_HDR_TCP |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tcfg.hash_flds = ICE_FLOW_HASH_IPV6;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_IPV6_TCP rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n \n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_HASH_TCP_IPV6,\n-\t\t\t\tICE_FLOW_SEG_HDR_GTPU_EH |\n-\t\t\t\tICE_FLOW_SEG_HDR_TCP |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV6 |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_GTPU_EH | ICE_FLOW_SEG_HDR_TCP |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\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 \n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_HASH_TCP_IPV6,\n-\t\t\t\tICE_FLOW_SEG_HDR_PPPOE |\n-\t\t\t\tICE_FLOW_SEG_HDR_TCP |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV6 |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_PPPOE | ICE_FLOW_SEG_HDR_TCP |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s PPPoE_IPV6_TCP rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n \t}\n \n \tif (rss_hf & ETH_RSS_NONFRAG_IPV4_SCTP) {\n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_HASH_SCTP_IPV4,\n-\t\t\t\tICE_FLOW_SEG_HDR_GTPU_IP |\n-\t\t\t\tICE_FLOW_SEG_HDR_SCTP |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV4 |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_GTPU_IP | ICE_FLOW_SEG_HDR_SCTP |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tcfg.hash_flds = ICE_FLOW_HASH_IPV4;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_IPV4_SCTP rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n \n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_HASH_SCTP_IPV4,\n-\t\t\t\tICE_FLOW_SEG_HDR_GTPU_EH |\n-\t\t\t\tICE_FLOW_SEG_HDR_SCTP |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV4 |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_GTPU_EH | ICE_FLOW_SEG_HDR_SCTP |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_EH_IPV4_SCTP rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n \t}\n \n \tif (rss_hf & ETH_RSS_NONFRAG_IPV6_SCTP) {\n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_HASH_SCTP_IPV6,\n-\t\t\t\tICE_FLOW_SEG_HDR_GTPU_IP |\n-\t\t\t\tICE_FLOW_SEG_HDR_SCTP |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV6 |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_GTPU_IP | ICE_FLOW_SEG_HDR_SCTP |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tcfg.hash_flds = ICE_FLOW_HASH_IPV6;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_IPV6_SCTP rss flow fail %d\",\n \t\t\t\t    __func__, ret);\n \n-\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_HASH_SCTP_IPV6,\n-\t\t\t\tICE_FLOW_SEG_HDR_GTPU_EH |\n-\t\t\t\tICE_FLOW_SEG_HDR_SCTP |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV6 |\n-\t\t\t\tICE_FLOW_SEG_HDR_IPV_OTHER, 0);\n+\t\tcfg.addl_hdrs = ICE_FLOW_SEG_HDR_GTPU_EH | ICE_FLOW_SEG_HDR_SCTP |\n+\t\t\t\tICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER;\n+\t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx, &cfg);\n \t\tif (ret)\n \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_EH_IPV6_SCTP rss flow fail %d\",\n \t\t\t\t    __func__, ret);\ndiff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h\nindex 05218af05e..71d1454685 100644\n--- a/drivers/net/ice/ice_ethdev.h\n+++ b/drivers/net/ice/ice_ethdev.h\n@@ -11,6 +11,7 @@\n \n #include \"base/ice_common.h\"\n #include \"base/ice_adminq_cmd.h\"\n+#include \"base/ice_flow.h\"\n \n #define ICE_VLAN_TAG_SIZE        4\n \n@@ -378,19 +379,6 @@ struct ice_fdir_info {\n #define ICE_HASH_GTPU_CTX_DW_IP_TCP\t8\n #define ICE_HASH_GTPU_CTX_MAX\t\t9\n \n-enum ice_rss_hash_func {\n-\tICE_RSS_HASH_TOEPLITZ\t\t\t= 0,\n-\tICE_RSS_HASH_TOEPLITZ_SYMMETRIC\t\t= 1,\n-\tICE_RSS_HASH_XOR\t\t\t= 2,\n-\tICE_RSS_HASH_JHASH\t\t\t= 3,\n-};\n-\n-struct ice_rss_hash_cfg {\n-\tu32 addl_hdrs;\n-\tu64 hash_flds;\n-\tenum ice_rss_hash_func hash_func;\n-};\n-\n struct ice_hash_gtpu_ctx {\n \tstruct ice_rss_hash_cfg ctx[ICE_HASH_GTPU_CTX_MAX];\n };\n@@ -542,9 +530,9 @@ void ice_vsi_enable_queues_intr(struct ice_vsi *vsi);\n void ice_vsi_disable_queues_intr(struct ice_vsi *vsi);\n void ice_vsi_queues_bind_intr(struct ice_vsi *vsi);\n int ice_add_rss_cfg_wrap(struct ice_pf *pf, uint16_t vsi_id,\n-\t\tuint64_t hash_fld, uint32_t pkt_hdr, bool symm);\n+\t\t\t struct ice_rss_hash_cfg *cfg);\n int ice_rem_rss_cfg_wrap(struct ice_pf *pf, uint16_t vsi_id,\n-\t\tuint64_t hash_fld, uint32_t pkt_hdr);\n+\t\t\t struct ice_rss_hash_cfg *cfg);\n \n static inline int\n ice_align_floor(int n)\ndiff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c\nindex 45c69e6bfd..fe3e06c579 100644\n--- a/drivers/net/ice/ice_hash.c\n+++ b/drivers/net/ice/ice_hash.c\n@@ -1274,16 +1274,15 @@ ice_hash_create(struct ice_adapter *ad,\n \n \t\tgoto out;\n \t} else {\n-\t\tfilter_ptr->rss_cfg.packet_hdr = headermask;\n-\t\tfilter_ptr->rss_cfg.hashed_flds = hash_field;\n-\t\tfilter_ptr->rss_cfg.symm =\n+\t\tfilter_ptr->rss_cfg.hash.addl_hdrs = headermask;\n+\t\tfilter_ptr->rss_cfg.hash.hash_flds = hash_field;\n+\t\tfilter_ptr->rss_cfg.hash.symm =\n \t\t\t(hash_function ==\n \t\t\t\tRTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ);\n+\t\tfilter_ptr->rss_cfg.hash.hdr_type = ICE_RSS_ANY_HEADERS;\n \n \t\tret = ice_add_rss_cfg_wrap(pf, vsi->idx,\n-\t\t\t\tfilter_ptr->rss_cfg.hashed_flds,\n-\t\t\t\tfilter_ptr->rss_cfg.packet_hdr,\n-\t\t\t\tfilter_ptr->rss_cfg.symm);\n+\t\t\t\t\t   &filter_ptr->rss_cfg.hash);\n \t\tif (ret) {\n \t\t\trte_flow_error_set(error, EINVAL,\n \t\t\t\t\tRTE_FLOW_ERROR_TYPE_HANDLE, NULL,\n@@ -1325,8 +1324,7 @@ ice_hash_destroy(struct ice_adapter *ad,\n \t\tICE_WRITE_REG(hw, VSIQF_HASH_CTL(vsi->vsi_id), reg);\n \t} else {\n \t\tret = ice_rem_rss_cfg_wrap(pf, vsi->idx,\n-\t\t\t\tfilter_ptr->rss_cfg.hashed_flds,\n-\t\t\t\tfilter_ptr->rss_cfg.packet_hdr);\n+\t\t\t\t\t   &filter_ptr->rss_cfg.hash);\n \t\t/* Fixme: Ignore the error if a rule does not exist.\n \t\t * Currently a rule for inputset change or symm turn on/off\n \t\t * will overwrite an exist rule, while application still\n",
    "prefixes": [
        "19/21"
    ]
}