Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/972032/?format=api
{ "id": 972032, "url": "http://patchwork.ozlabs.org/api/patches/972032/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180920002319.10971-15-anirudh.venkataramanan@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": "<20180920002319.10971-15-anirudh.venkataramanan@intel.com>", "list_archive_url": null, "date": "2018-09-20T00:23:17", "name": "[14/16] ice: Implement ethtool hook for RSS switch", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "f8450df729b9e7c99487e4d47664b00daa0f984a", "submitter": { "id": 73601, "url": "http://patchwork.ozlabs.org/api/people/73601/?format=api", "name": "Anirudh Venkataramanan", "email": "anirudh.venkataramanan@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/20180920002319.10971-15-anirudh.venkataramanan@intel.com/mbox/", "series": [ { "id": 66525, "url": "http://patchwork.ozlabs.org/api/series/66525/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=66525", "date": "2018-09-20T00:23:03", "name": "Implementation updates for ice", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/66525/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/972032/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/972032/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;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.137; helo=fraxinus.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 fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\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 42FyBd1MXtz9s9J\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 20 Sep 2018 10:23:37 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id C327287701;\n\tThu, 20 Sep 2018 00:23:35 +0000 (UTC)", "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id fuQPVxyCX28r; Thu, 20 Sep 2018 00:23:35 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 27852876DB;\n\tThu, 20 Sep 2018 00:23:35 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 0418A1C08AF\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 20 Sep 2018 00:23:31 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 01CD7227F5\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 20 Sep 2018 00:23:31 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id SYR7uU2tCAfi for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 20 Sep 2018 00:23:29 +0000 (UTC)", "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 19F1330968\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 20 Sep 2018 00:23:25 +0000 (UTC)", "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t19 Sep 2018 17:23:24 -0700", "from shasta.jf.intel.com ([10.166.241.11])\n\tby fmsmga006.fm.intel.com with ESMTP; 19 Sep 2018 17:23:20 -0700" ], "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.53,396,1531810800\"; d=\"scan'208\";a=\"265057706\"", "From": "Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Wed, 19 Sep 2018 17:23:17 -0700", "Message-Id": "<20180920002319.10971-15-anirudh.venkataramanan@intel.com>", "X-Mailer": "git-send-email 2.14.3", "In-Reply-To": "<20180920002319.10971-1-anirudh.venkataramanan@intel.com>", "References": "<20180920002319.10971-1-anirudh.venkataramanan@intel.com>", "Subject": "[Intel-wired-lan] [PATCH 14/16] ice: Implement ethtool hook for RSS\n\tswitch", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.24", "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>", "MIME-Version": "1.0", "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\nThis patch implements ethtool hook for enabling/disabling\nRSS. While disabling RSS, the LUT should be cleared. And\nthe LUT should be reconfigured while enabling RSS.\n\nSigned-off-by: Md Fahad Iqbal Polash <md.fahad.iqbal.polash@intel.com>\nSigned-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>\n---\n drivers/net/ethernet/intel/ice/ice_lib.c | 32 +++++++++++++++++++++++++++++++\n drivers/net/ethernet/intel/ice/ice_lib.h | 2 ++\n drivers/net/ethernet/intel/ice/ice_main.c | 6 ++++++\n 3 files changed, 40 insertions(+)", "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c\nindex 92bbbe99120c..0d341652fb92 100644\n--- a/drivers/net/ethernet/intel/ice/ice_lib.c\n+++ b/drivers/net/ethernet/intel/ice/ice_lib.c\n@@ -1222,6 +1222,38 @@ static void ice_vsi_map_rings_to_vectors(struct ice_vsi *vsi)\n \t}\n }\n \n+/**\n+ * ice_vsi_manage_rss_lut - disable/enable RSS\n+ * @vsi: the VSI being changed\n+ * @ena: boolean value indicating if this is an enable or disable request\n+ *\n+ * In the event of disable request for RSS, this function will zero out RSS\n+ * LUT, while in the event of enable request for RSS, it will reconfigure RSS\n+ * LUT.\n+ */\n+int ice_vsi_manage_rss_lut(struct ice_vsi *vsi, bool ena)\n+{\n+\tint err = 0;\n+\tu8 *lut;\n+\n+\tlut = devm_kzalloc(&vsi->back->pdev->dev, vsi->rss_table_size,\n+\t\t\t GFP_KERNEL);\n+\tif (!lut)\n+\t\treturn -ENOMEM;\n+\n+\tif (ena) {\n+\t\tif (vsi->rss_lut_user)\n+\t\t\tmemcpy(lut, vsi->rss_lut_user, vsi->rss_table_size);\n+\t\telse\n+\t\t\tice_fill_rss_lut(lut, vsi->rss_table_size,\n+\t\t\t\t\t vsi->rss_size);\n+\t}\n+\n+\terr = ice_set_rss(vsi, NULL, lut, vsi->rss_table_size);\n+\tdevm_kfree(&vsi->back->pdev->dev, lut);\n+\treturn err;\n+}\n+\n /**\n * ice_vsi_cfg_rss_lut_key - Configure RSS params for a VSI\n * @vsi: VSI to be configured\ndiff --git a/drivers/net/ethernet/intel/ice/ice_lib.h b/drivers/net/ethernet/intel/ice/ice_lib.h\nindex 4265464ee3d3..2617afe01c82 100644\n--- a/drivers/net/ethernet/intel/ice/ice_lib.h\n+++ b/drivers/net/ethernet/intel/ice/ice_lib.h\n@@ -70,5 +70,7 @@ void ice_vsi_free_tx_rings(struct ice_vsi *vsi);\n \n int ice_vsi_cfg_tc(struct ice_vsi *vsi, u8 ena_tc);\n \n+int ice_vsi_manage_rss_lut(struct ice_vsi *vsi, bool ena);\n+\n irqreturn_t ice_msix_clean_rings(int __always_unused irq, void *data);\n #endif /* !_ICE_LIB_H_ */\ndiff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c\nindex 9d9c963982ca..b8d274f92e42 100644\n--- a/drivers/net/ethernet/intel/ice/ice_main.c\n+++ b/drivers/net/ethernet/intel/ice/ice_main.c\n@@ -2412,6 +2412,12 @@ static int ice_set_features(struct net_device *netdev,\n \tstruct ice_vsi *vsi = np->vsi;\n \tint ret = 0;\n \n+\tif (features & NETIF_F_RXHASH && !(netdev->features & NETIF_F_RXHASH))\n+\t\tret = ice_vsi_manage_rss_lut(vsi, true);\n+\telse if (!(features & NETIF_F_RXHASH) &&\n+\t\t netdev->features & NETIF_F_RXHASH)\n+\t\tret = ice_vsi_manage_rss_lut(vsi, false);\n+\n \tif ((features & NETIF_F_HW_VLAN_CTAG_RX) &&\n \t !(netdev->features & NETIF_F_HW_VLAN_CTAG_RX))\n \t\tret = ice_vsi_manage_vlan_stripping(vsi, true);\n", "prefixes": [ "14/16" ] }