Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/886993/?format=api
{ "id": 886993, "url": "http://patchwork.ozlabs.org/api/patches/886993/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180316082637.49915-6-alice.michael@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": "<20180316082637.49915-6-alice.michael@intel.com>", "list_archive_url": null, "date": "2018-03-16T08:26:35", "name": "[next,S89,6/8] i40e: hold the RTNL lock while changing interrupt schemes", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "ccf0ac6ac96fbbe6167c60dad566638eb52f963f", "submitter": { "id": 71123, "url": "http://patchwork.ozlabs.org/api/people/71123/?format=api", "name": "Michael, Alice", "email": "alice.michael@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/20180316082637.49915-6-alice.michael@intel.com/mbox/", "series": [ { "id": 34226, "url": "http://patchwork.ozlabs.org/api/series/34226/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=34226", "date": "2018-03-16T08:26:33", "name": "[next,S89,1/8] i40e: move I40E_FLAG_FILTER_SYNC to a state bit", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/34226/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/886993/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/886993/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.138; helo=whitealder.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdmarc=none (p=none dis=none) header.from=intel.com" ], "Received": [ "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 402rfB5XYXz9sLw\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 17 Mar 2018 03:34:58 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 5757B89830;\n\tFri, 16 Mar 2018 16:34:57 +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 pwyFpQdFqLvx; Fri, 16 Mar 2018 16:34:56 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 026B089876;\n\tFri, 16 Mar 2018 16:34:56 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 9EFCB1CF050\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 16 Mar 2018 16:34:53 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 9A2C7220CD\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 16 Mar 2018 16:34:53 +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 h-xlns6X-w3c for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 16 Mar 2018 16:34:53 +0000 (UTC)", "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 9227930489\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 16 Mar 2018 16:34:52 +0000 (UTC)", "from fmsmga008.fm.intel.com ([10.253.24.58])\n\tby fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t16 Mar 2018 09:34:47 -0700", "from alicemic-2.jf.intel.com ([10.166.16.121])\n\tby fmsmga008.fm.intel.com with ESMTP; 16 Mar 2018 09:34:47 -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.48,316,1517904000\"; d=\"scan'208\";a=\"25113543\"", "From": "Alice Michael <alice.michael@intel.com>", "To": "alice.michael@intel.com,\n\tintel-wired-lan@lists.osuosl.org", "Date": "Fri, 16 Mar 2018 01:26:35 -0700", "Message-Id": "<20180316082637.49915-6-alice.michael@intel.com>", "X-Mailer": "git-send-email 2.9.5", "In-Reply-To": "<20180316082637.49915-1-alice.michael@intel.com>", "References": "<20180316082637.49915-1-alice.michael@intel.com>", "Subject": "[Intel-wired-lan] [next PATCH S89 6/8] i40e: hold the RTNL lock\n\twhile changing interrupt schemes", "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: Jacob Keller <jacob.e.keller@intel.com>\n\nWhen we suspend and resume, we need to clear and re-enable the interrupt\nscheme. This was previously not done while holding the RTNL lock, which\ncould be problematic, because we are actually destroying and re-creating\nqueues.\n\nHold the RTNL lock for the entire sequence of preparing for reset, and\nwhen resuming. This additionally protects the flags related to interrupt\nscheme under RTNL lock so that their modification is properly threaded.\n\nThis is part of a larger effort to remove the need for cmpxchg64 in\ni40e_set_priv_flags().\n\nSigned-off-by: Jacob Keller <jacob.e.keller@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_main.c | 19 +++++++++++++++++--\n 1 file changed, 17 insertions(+), 2 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex debc3a3..79ab522 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -14348,7 +14348,13 @@ static int __maybe_unused i40e_suspend(struct device *dev)\n \tif (pf->wol_en && (pf->hw_features & I40E_HW_WOL_MC_MAGIC_PKT_WAKE))\n \t\ti40e_enable_mc_magic_wake(pf);\n \n-\ti40e_prep_for_reset(pf, false);\n+\t/* Since we're going to destroy queues during the\n+\t * i40e_clear_interrupt_scheme() we should hold the RTNL lock for this\n+\t * whole section\n+\t */\n+\trtnl_lock();\n+\n+\ti40e_prep_for_reset(pf, true);\n \n \twr32(hw, I40E_PFPM_APM, (pf->wol_en ? I40E_PFPM_APM_APME_MASK : 0));\n \twr32(hw, I40E_PFPM_WUFC, (pf->wol_en ? I40E_PFPM_WUFC_MAG_MASK : 0));\n@@ -14360,6 +14366,8 @@ static int __maybe_unused i40e_suspend(struct device *dev)\n \t */\n \ti40e_clear_interrupt_scheme(pf);\n \n+\trtnl_unlock();\n+\n \treturn 0;\n }\n \n@@ -14377,6 +14385,11 @@ static int __maybe_unused i40e_resume(struct device *dev)\n \tif (!test_bit(__I40E_SUSPENDED, pf->state))\n \t\treturn 0;\n \n+\t/* We need to hold the RTNL lock prior to restoring interrupt schemes,\n+\t * since we're going to be restoring queues\n+\t */\n+\trtnl_lock();\n+\n \t/* We cleared the interrupt scheme when we suspended, so we need to\n \t * restore it now to resume device functionality.\n \t */\n@@ -14387,7 +14400,9 @@ static int __maybe_unused i40e_resume(struct device *dev)\n \t}\n \n \tclear_bit(__I40E_DOWN, pf->state);\n-\ti40e_reset_and_rebuild(pf, false, false);\n+\ti40e_reset_and_rebuild(pf, false, true);\n+\n+\trtnl_unlock();\n \n \t/* Clear suspended state last after everything is recovered */\n \tclear_bit(__I40E_SUSPENDED, pf->state);\n", "prefixes": [ "next", "S89", "6/8" ] }