Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1225073/?format=api
{ "id": 1225073, "url": "http://patchwork.ozlabs.org/api/patches/1225073/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200117153919.50321-6-anthony.l.nguyen@intel.com/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20200117153919.50321-6-anthony.l.nguyen@intel.com>", "list_archive_url": null, "date": "2020-01-17T15:39:17", "name": "[S36,6/8] ice: Initilialize VF RSS tables", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "e49af5346fd2b2777f6a3715629870ae45d981c8", "submitter": { "id": 68875, "url": "http://patchwork.ozlabs.org/api/people/68875/?format=api", "name": "Tony Nguyen", "email": "anthony.l.nguyen@intel.com" }, "delegate": { "id": 68, "url": "http://patchwork.ozlabs.org/api/users/68/?format=api", "username": "jtkirshe", "first_name": "Jeff", "last_name": "Kirsher", "email": "jeffrey.t.kirsher@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200117153919.50321-6-anthony.l.nguyen@intel.com/mbox/", "series": [ { "id": 153932, "url": "http://patchwork.ozlabs.org/api/series/153932/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=153932", "date": "2020-01-17T15:39:19", "name": "[S36,1/8] ice: Enable writing hardware filtering tables", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/153932/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1225073/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1225073/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Authentication-Results": [ "ozlabs.org; spf=pass (sender SPF authorized)\n\tsmtp.mailfrom=osuosl.org (client-ip=140.211.166.133;\n\thelo=hemlock.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=intel.com" ], "Received": [ "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 47zyzX4XWNz9sR4\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 18 Jan 2020 11:12:07 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 5F97A88182;\n\tSat, 18 Jan 2020 00:12:05 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id jHEnmgntrXjE; Sat, 18 Jan 2020 00:12:03 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id D945887E94;\n\tSat, 18 Jan 2020 00:12:03 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 3B5FB1BF9BA\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tSat, 18 Jan 2020 00:12:01 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 3781F86E26\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tSat, 18 Jan 2020 00:12:01 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id BJHphkrhUkaA for <intel-wired-lan@lists.osuosl.org>;\n\tSat, 18 Jan 2020 00:11:58 +0000 (UTC)", "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 9BEA986E33\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tSat, 18 Jan 2020 00:11:58 +0000 (UTC)", "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t17 Jan 2020 16:11:56 -0800", "from unknown (HELO localhost.jf.intel.com) ([10.166.244.174])\n\tby orsmga005.jf.intel.com with ESMTP; 17 Jan 2020 16:11:55 -0800" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.70,332,1574150400\"; d=\"scan'208\";a=\"398818588\"", "From": "Tony Nguyen <anthony.l.nguyen@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Fri, 17 Jan 2020 07:39:17 -0800", "Message-Id": "<20200117153919.50321-6-anthony.l.nguyen@intel.com>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20200117153919.50321-1-anthony.l.nguyen@intel.com>", "References": "<20200117153919.50321-1-anthony.l.nguyen@intel.com>", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [PATCH S36 6/8] ice: Initilialize VF RSS tables", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "From: Md Fahad Iqbal Polash <md.fahad.iqbal.polash@intel.com>\n\nSet configuration for hardware RSS tables for VFs.\n\nSigned-off-by: Md Fahad Iqbal Polash <md.fahad.iqbal.polash@intel.com>\nSigned-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>\n---\n drivers/net/ethernet/intel/ice/ice_flow.c | 135 ++++++++++++++++++\n drivers/net/ethernet/intel/ice/ice_flow.h | 59 ++++++++\n drivers/net/ethernet/intel/ice/ice_lib.c | 31 +++-\n .../ethernet/intel/ice/ice_protocol_type.h | 1 +\n 4 files changed, 225 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice_flow.c b/drivers/net/ethernet/intel/ice/ice_flow.c\nindex 3cd270d96fb8..d160695c22e0 100644\n--- a/drivers/net/ethernet/intel/ice/ice_flow.c\n+++ b/drivers/net/ethernet/intel/ice/ice_flow.c\n@@ -38,6 +38,11 @@ struct ice_flow_field_info ice_flds_info[ICE_FLOW_FIELD_IDX_MAX] = {\n \tICE_FLOW_FLD_INFO(ICE_FLOW_SEG_HDR_UDP, 0, sizeof(__be16)),\n \t/* ICE_FLOW_FIELD_IDX_UDP_DST_PORT */\n \tICE_FLOW_FLD_INFO(ICE_FLOW_SEG_HDR_UDP, 2, sizeof(__be16)),\n+\t/* ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT */\n+\tICE_FLOW_FLD_INFO(ICE_FLOW_SEG_HDR_SCTP, 0, sizeof(__be16)),\n+\t/* ICE_FLOW_FIELD_IDX_SCTP_DST_PORT */\n+\tICE_FLOW_FLD_INFO(ICE_FLOW_SEG_HDR_SCTP, 2, sizeof(__be16)),\n+\n };\n \n /* Bitmaps indicating relevant packet types for a particular protocol header\n@@ -266,6 +271,10 @@ ice_flow_xtract_fld(struct ice_hw *hw, struct ice_flow_prof_params *params,\n \tcase ICE_FLOW_FIELD_IDX_UDP_DST_PORT:\n \t\tprot_id = ICE_PROT_UDP_IL_OR_S;\n \t\tbreak;\n+\tcase ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT:\n+\tcase ICE_FLOW_FIELD_IDX_SCTP_DST_PORT:\n+\t\tprot_id = ICE_PROT_SCTP_IL;\n+\t\tbreak;\n \tdefault:\n \t\treturn ICE_ERR_NOT_IMPL;\n \t}\n@@ -1081,6 +1090,132 @@ ice_add_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,\n \treturn status;\n }\n \n+/* Mapping of AVF hash bit fields to an L3-L4 hash combination.\n+ * As the ice_flow_avf_hdr_field represent individual bit shifts in a hash,\n+ * convert its values to their appropriate flow L3, L4 values.\n+ */\n+#define ICE_FLOW_AVF_RSS_IPV4_MASKS \\\n+\t(BIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_OTHER) | \\\n+\t BIT_ULL(ICE_AVF_FLOW_FIELD_FRAG_IPV4))\n+#define ICE_FLOW_AVF_RSS_TCP_IPV4_MASKS \\\n+\t(BIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_TCP_SYN_NO_ACK) | \\\n+\t BIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_TCP))\n+#define ICE_FLOW_AVF_RSS_UDP_IPV4_MASKS \\\n+\t(BIT_ULL(ICE_AVF_FLOW_FIELD_UNICAST_IPV4_UDP) | \\\n+\t BIT_ULL(ICE_AVF_FLOW_FIELD_MULTICAST_IPV4_UDP) | \\\n+\t BIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_UDP))\n+#define ICE_FLOW_AVF_RSS_ALL_IPV4_MASKS \\\n+\t(ICE_FLOW_AVF_RSS_TCP_IPV4_MASKS | ICE_FLOW_AVF_RSS_UDP_IPV4_MASKS | \\\n+\t ICE_FLOW_AVF_RSS_IPV4_MASKS | BIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_SCTP))\n+\n+#define ICE_FLOW_AVF_RSS_IPV6_MASKS \\\n+\t(BIT_ULL(ICE_AVF_FLOW_FIELD_IPV6_OTHER) | \\\n+\t BIT_ULL(ICE_AVF_FLOW_FIELD_FRAG_IPV6))\n+#define ICE_FLOW_AVF_RSS_UDP_IPV6_MASKS \\\n+\t(BIT_ULL(ICE_AVF_FLOW_FIELD_UNICAST_IPV6_UDP) | \\\n+\t BIT_ULL(ICE_AVF_FLOW_FIELD_MULTICAST_IPV6_UDP) | \\\n+\t BIT_ULL(ICE_AVF_FLOW_FIELD_IPV6_UDP))\n+#define ICE_FLOW_AVF_RSS_TCP_IPV6_MASKS \\\n+\t(BIT_ULL(ICE_AVF_FLOW_FIELD_IPV6_TCP_SYN_NO_ACK) | \\\n+\t BIT_ULL(ICE_AVF_FLOW_FIELD_IPV6_TCP))\n+#define ICE_FLOW_AVF_RSS_ALL_IPV6_MASKS \\\n+\t(ICE_FLOW_AVF_RSS_TCP_IPV6_MASKS | ICE_FLOW_AVF_RSS_UDP_IPV6_MASKS | \\\n+\t ICE_FLOW_AVF_RSS_IPV6_MASKS | BIT_ULL(ICE_AVF_FLOW_FIELD_IPV6_SCTP))\n+\n+/**\n+ * ice_add_avf_rss_cfg - add an RSS configuration for AVF driver\n+ * @hw: pointer to the hardware structure\n+ * @vsi_handle: software VSI handle\n+ * @avf_hash: hash bit fields (ICE_AVF_FLOW_FIELD_*) to configure\n+ *\n+ * This function will take the hash bitmap provided by the AVF driver via a\n+ * message, convert it to ICE-compatible values, and configure RSS flow\n+ * profiles.\n+ */\n+enum ice_status\n+ice_add_avf_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 avf_hash)\n+{\n+\tenum ice_status status = 0;\n+\tu64 hash_flds;\n+\n+\tif (avf_hash == ICE_AVF_FLOW_FIELD_INVALID ||\n+\t !ice_is_vsi_valid(hw, vsi_handle))\n+\t\treturn ICE_ERR_PARAM;\n+\n+\t/* Make sure no unsupported bits are specified */\n+\tif (avf_hash & ~(ICE_FLOW_AVF_RSS_ALL_IPV4_MASKS |\n+\t\t\t ICE_FLOW_AVF_RSS_ALL_IPV6_MASKS))\n+\t\treturn ICE_ERR_CFG;\n+\n+\thash_flds = avf_hash;\n+\n+\t/* Always create an L3 RSS configuration for any L4 RSS configuration */\n+\tif (hash_flds & ICE_FLOW_AVF_RSS_ALL_IPV4_MASKS)\n+\t\thash_flds |= ICE_FLOW_AVF_RSS_IPV4_MASKS;\n+\n+\tif (hash_flds & ICE_FLOW_AVF_RSS_ALL_IPV6_MASKS)\n+\t\thash_flds |= ICE_FLOW_AVF_RSS_IPV6_MASKS;\n+\n+\t/* Create the corresponding RSS configuration for each valid hash bit */\n+\twhile (hash_flds) {\n+\t\tu64 rss_hash = ICE_HASH_INVALID;\n+\n+\t\tif (hash_flds & ICE_FLOW_AVF_RSS_ALL_IPV4_MASKS) {\n+\t\t\tif (hash_flds & ICE_FLOW_AVF_RSS_IPV4_MASKS) {\n+\t\t\t\trss_hash = ICE_FLOW_HASH_IPV4;\n+\t\t\t\thash_flds &= ~ICE_FLOW_AVF_RSS_IPV4_MASKS;\n+\t\t\t} else if (hash_flds &\n+\t\t\t\t ICE_FLOW_AVF_RSS_TCP_IPV4_MASKS) {\n+\t\t\t\trss_hash = ICE_FLOW_HASH_IPV4 |\n+\t\t\t\t\tICE_FLOW_HASH_TCP_PORT;\n+\t\t\t\thash_flds &= ~ICE_FLOW_AVF_RSS_TCP_IPV4_MASKS;\n+\t\t\t} else if (hash_flds &\n+\t\t\t\t ICE_FLOW_AVF_RSS_UDP_IPV4_MASKS) {\n+\t\t\t\trss_hash = ICE_FLOW_HASH_IPV4 |\n+\t\t\t\t\tICE_FLOW_HASH_UDP_PORT;\n+\t\t\t\thash_flds &= ~ICE_FLOW_AVF_RSS_UDP_IPV4_MASKS;\n+\t\t\t} else if (hash_flds &\n+\t\t\t\t BIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_SCTP)) {\n+\t\t\t\trss_hash = ICE_FLOW_HASH_IPV4 |\n+\t\t\t\t\tICE_FLOW_HASH_SCTP_PORT;\n+\t\t\t\thash_flds &=\n+\t\t\t\t\t~BIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_SCTP);\n+\t\t\t}\n+\t\t} else if (hash_flds & ICE_FLOW_AVF_RSS_ALL_IPV6_MASKS) {\n+\t\t\tif (hash_flds & ICE_FLOW_AVF_RSS_IPV6_MASKS) {\n+\t\t\t\trss_hash = ICE_FLOW_HASH_IPV6;\n+\t\t\t\thash_flds &= ~ICE_FLOW_AVF_RSS_IPV6_MASKS;\n+\t\t\t} else if (hash_flds &\n+\t\t\t\t ICE_FLOW_AVF_RSS_TCP_IPV6_MASKS) {\n+\t\t\t\trss_hash = ICE_FLOW_HASH_IPV6 |\n+\t\t\t\t\tICE_FLOW_HASH_TCP_PORT;\n+\t\t\t\thash_flds &= ~ICE_FLOW_AVF_RSS_TCP_IPV6_MASKS;\n+\t\t\t} else if (hash_flds &\n+\t\t\t\t ICE_FLOW_AVF_RSS_UDP_IPV6_MASKS) {\n+\t\t\t\trss_hash = ICE_FLOW_HASH_IPV6 |\n+\t\t\t\t\tICE_FLOW_HASH_UDP_PORT;\n+\t\t\t\thash_flds &= ~ICE_FLOW_AVF_RSS_UDP_IPV6_MASKS;\n+\t\t\t} else if (hash_flds &\n+\t\t\t\t BIT_ULL(ICE_AVF_FLOW_FIELD_IPV6_SCTP)) {\n+\t\t\t\trss_hash = ICE_FLOW_HASH_IPV6 |\n+\t\t\t\t\tICE_FLOW_HASH_SCTP_PORT;\n+\t\t\t\thash_flds &=\n+\t\t\t\t\t~BIT_ULL(ICE_AVF_FLOW_FIELD_IPV6_SCTP);\n+\t\t\t}\n+\t\t}\n+\n+\t\tif (rss_hash == ICE_HASH_INVALID)\n+\t\t\treturn ICE_ERR_OUT_OF_RANGE;\n+\n+\t\tstatus = ice_add_rss_cfg(hw, vsi_handle, rss_hash,\n+\t\t\t\t\t ICE_FLOW_SEG_HDR_NONE);\n+\t\tif (status)\n+\t\t\tbreak;\n+\t}\n+\n+\treturn status;\n+}\n+\n /**\n * ice_replay_rss_cfg - replay RSS configurations associated with VSI\n * @hw: pointer to the hardware structure\ndiff --git a/drivers/net/ethernet/intel/ice/ice_flow.h b/drivers/net/ethernet/intel/ice/ice_flow.h\nindex 38669b077209..475a025d3a2d 100644\n--- a/drivers/net/ethernet/intel/ice/ice_flow.h\n+++ b/drivers/net/ethernet/intel/ice/ice_flow.h\n@@ -20,6 +20,9 @@\n #define ICE_FLOW_HASH_UDP_PORT\t\\\n \t(BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT) | \\\n \t BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT))\n+#define ICE_FLOW_HASH_SCTP_PORT\t\\\n+\t(BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT) | \\\n+\t BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT))\n \n #define ICE_HASH_INVALID\t0\n #define ICE_HASH_TCP_IPV4\t(ICE_FLOW_HASH_IPV4 | ICE_FLOW_HASH_TCP_PORT)\n@@ -53,10 +56,64 @@ enum ice_flow_field {\n \tICE_FLOW_FIELD_IDX_TCP_DST_PORT,\n \tICE_FLOW_FIELD_IDX_UDP_SRC_PORT,\n \tICE_FLOW_FIELD_IDX_UDP_DST_PORT,\n+\tICE_FLOW_FIELD_IDX_SCTP_SRC_PORT,\n+\tICE_FLOW_FIELD_IDX_SCTP_DST_PORT,\n \t/* The total number of enums must not exceed 64 */\n \tICE_FLOW_FIELD_IDX_MAX\n };\n \n+/* Flow headers and fields for AVF support */\n+enum ice_flow_avf_hdr_field {\n+\t/* Values 0 - 28 are reserved for future use */\n+\tICE_AVF_FLOW_FIELD_INVALID\t\t= 0,\n+\tICE_AVF_FLOW_FIELD_UNICAST_IPV4_UDP\t= 29,\n+\tICE_AVF_FLOW_FIELD_MULTICAST_IPV4_UDP,\n+\tICE_AVF_FLOW_FIELD_IPV4_UDP,\n+\tICE_AVF_FLOW_FIELD_IPV4_TCP_SYN_NO_ACK,\n+\tICE_AVF_FLOW_FIELD_IPV4_TCP,\n+\tICE_AVF_FLOW_FIELD_IPV4_SCTP,\n+\tICE_AVF_FLOW_FIELD_IPV4_OTHER,\n+\tICE_AVF_FLOW_FIELD_FRAG_IPV4,\n+\t/* Values 37-38 are reserved */\n+\tICE_AVF_FLOW_FIELD_UNICAST_IPV6_UDP\t= 39,\n+\tICE_AVF_FLOW_FIELD_MULTICAST_IPV6_UDP,\n+\tICE_AVF_FLOW_FIELD_IPV6_UDP,\n+\tICE_AVF_FLOW_FIELD_IPV6_TCP_SYN_NO_ACK,\n+\tICE_AVF_FLOW_FIELD_IPV6_TCP,\n+\tICE_AVF_FLOW_FIELD_IPV6_SCTP,\n+\tICE_AVF_FLOW_FIELD_IPV6_OTHER,\n+\tICE_AVF_FLOW_FIELD_FRAG_IPV6,\n+\tICE_AVF_FLOW_FIELD_RSVD47,\n+\tICE_AVF_FLOW_FIELD_FCOE_OX,\n+\tICE_AVF_FLOW_FIELD_FCOE_RX,\n+\tICE_AVF_FLOW_FIELD_FCOE_OTHER,\n+\t/* Values 51-62 are reserved */\n+\tICE_AVF_FLOW_FIELD_L2_PAYLOAD\t\t= 63,\n+\tICE_AVF_FLOW_FIELD_MAX\n+};\n+\n+/* Supported RSS offloads This macro is defined to support\n+ * VIRTCHNL_OP_GET_RSS_HENA_CAPS ops. PF driver sends the RSS hardware\n+ * capabilities to the caller of this ops.\n+ */\n+#define ICE_DEFAULT_RSS_HENA ( \\\n+\tBIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_UDP) | \\\n+\tBIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_SCTP) | \\\n+\tBIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_TCP) | \\\n+\tBIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_OTHER) | \\\n+\tBIT_ULL(ICE_AVF_FLOW_FIELD_FRAG_IPV4) | \\\n+\tBIT_ULL(ICE_AVF_FLOW_FIELD_IPV6_UDP) | \\\n+\tBIT_ULL(ICE_AVF_FLOW_FIELD_IPV6_TCP) | \\\n+\tBIT_ULL(ICE_AVF_FLOW_FIELD_IPV6_SCTP) | \\\n+\tBIT_ULL(ICE_AVF_FLOW_FIELD_IPV6_OTHER) | \\\n+\tBIT_ULL(ICE_AVF_FLOW_FIELD_FRAG_IPV6) | \\\n+\tBIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_TCP_SYN_NO_ACK) | \\\n+\tBIT_ULL(ICE_AVF_FLOW_FIELD_UNICAST_IPV4_UDP) | \\\n+\tBIT_ULL(ICE_AVF_FLOW_FIELD_MULTICAST_IPV4_UDP) | \\\n+\tBIT_ULL(ICE_AVF_FLOW_FIELD_IPV6_TCP_SYN_NO_ACK) | \\\n+\tBIT_ULL(ICE_AVF_FLOW_FIELD_UNICAST_IPV6_UDP) | \\\n+\tBIT_ULL(ICE_AVF_FLOW_FIELD_MULTICAST_IPV6_UDP))\n+\n enum ice_flow_dir {\n \tICE_FLOW_RX\t\t= 0x02,\n };\n@@ -140,6 +197,8 @@ struct ice_rss_cfg {\n enum ice_status ice_flow_rem_entry(struct ice_hw *hw, u64 entry_h);\n void ice_rem_vsi_rss_list(struct ice_hw *hw, u16 vsi_handle);\n enum ice_status ice_replay_rss_cfg(struct ice_hw *hw, u16 vsi_handle);\n+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,\ndiff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c\nindex b65019978335..75159b658098 100644\n--- a/drivers/net/ethernet/intel/ice/ice_lib.c\n+++ b/drivers/net/ethernet/intel/ice/ice_lib.c\n@@ -1124,6 +1124,33 @@ static int ice_vsi_cfg_rss_lut_key(struct ice_vsi *vsi)\n \treturn err;\n }\n \n+/**\n+ * ice_vsi_set_vf_rss_flow_fld - Sets VF VSI RSS input set for different flows\n+ * @vsi: VSI to be configured\n+ *\n+ * This function will only be called during the VF VSI setup. Upon successful\n+ * completion of package download, this function will configure default RSS\n+ * input sets for VF VSI.\n+ */\n+static void ice_vsi_set_vf_rss_flow_fld(struct ice_vsi *vsi)\n+{\n+\tstruct ice_pf *pf = vsi->back;\n+\tenum ice_status status;\n+\tstruct device *dev;\n+\n+\tdev = ice_pf_to_dev(pf);\n+\tif (ice_is_safe_mode(pf)) {\n+\t\tdev_dbg(dev, \"Advanced RSS disabled. Package download failed, vsi num = %d\\n\",\n+\t\t\tvsi->vsi_num);\n+\t\treturn;\n+\t}\n+\n+\tstatus = ice_add_avf_rss_cfg(&pf->hw, vsi->idx, ICE_DEFAULT_RSS_HENA);\n+\tif (status)\n+\t\tdev_dbg(dev, \"ice_add_avf_rss_cfg failed for vsi = %d, error = %d\\n\",\n+\t\t\tvsi->vsi_num, status);\n+}\n+\n /**\n * ice_vsi_set_rss_flow_fld - Sets RSS input set for different flows\n * @vsi: VSI to be configured\n@@ -2072,8 +2099,10 @@ ice_vsi_setup(struct ice_pf *pf, struct ice_port_info *pi,\n \t\t * receive traffic on first queue. Hence no need to capture\n \t\t * return value\n \t\t */\n-\t\tif (test_bit(ICE_FLAG_RSS_ENA, pf->flags))\n+\t\tif (test_bit(ICE_FLAG_RSS_ENA, pf->flags)) {\n \t\t\tice_vsi_cfg_rss_lut_key(vsi);\n+\t\t\tice_vsi_set_vf_rss_flow_fld(vsi);\n+\t\t}\n \t\tbreak;\n \tcase ICE_VSI_LB:\n \t\tret = ice_vsi_alloc_rings(vsi);\ndiff --git a/drivers/net/ethernet/intel/ice/ice_protocol_type.h b/drivers/net/ethernet/intel/ice/ice_protocol_type.h\nindex 97db46ce7a21..71647566964e 100644\n--- a/drivers/net/ethernet/intel/ice/ice_protocol_type.h\n+++ b/drivers/net/ethernet/intel/ice/ice_protocol_type.h\n@@ -18,6 +18,7 @@ enum ice_prot_id {\n \tICE_PROT_IPV6_IL\t= 41,\n \tICE_PROT_TCP_IL\t\t= 49,\n \tICE_PROT_UDP_IL_OR_S\t= 53,\n+\tICE_PROT_SCTP_IL\t= 96,\n \tICE_PROT_META_ID\t= 255, /* when offset == metadata */\n \tICE_PROT_INVALID\t= 255 /* when offset == ICE_FV_OFFSET_INVAL */\n };\n", "prefixes": [ "S36", "6/8" ] }