Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1008307/?format=api
{ "id": 1008307, "url": "http://patchwork.ozlabs.org/api/patches/1008307/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20181205135426.26431-1-ross.lagerwall@citrix.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": "<20181205135426.26431-1-ross.lagerwall@citrix.com>", "list_archive_url": null, "date": "2018-12-05T13:54:26", "name": "ixgbe: Fix race when the VF driver does a reset", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "e1c1b8bf3b5f7c6401974966734c5b15d260b562", "submitter": { "id": 66365, "url": "http://patchwork.ozlabs.org/api/people/66365/?format=api", "name": "Ross Lagerwall", "email": "ross.lagerwall@citrix.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/20181205135426.26431-1-ross.lagerwall@citrix.com/mbox/", "series": [ { "id": 79939, "url": "http://patchwork.ozlabs.org/api/series/79939/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=79939", "date": "2018-12-05T13:54:26", "name": "ixgbe: Fix race when the VF driver does a reset", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/79939/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1008307/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1008307/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=citrix.com" ], "Received": [ "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\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 4392qV0bnzz9s3Z\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 6 Dec 2018 02:35:17 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 629CA87987;\n\tWed, 5 Dec 2018 15:35:16 +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 NVNVn4xWNxMz; Wed, 5 Dec 2018 15:35:13 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id ACCD6879A3;\n\tWed, 5 Dec 2018 15:35:11 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id E7F621BF2FA\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 5 Dec 2018 14:04:18 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id E347587EB8\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 5 Dec 2018 14:04:18 +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 krlgn2-fTmnE for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 5 Dec 2018 14:04:17 +0000 (UTC)", "from SMTP03.CITRIX.COM (smtp03.citrix.com [162.221.156.55])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 2E22A87EA2\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 5 Dec 2018 14:04:17 +0000 (UTC)" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "delayed 00:09:43 by SQLgrey-1.7.6", "X-IronPort-AV": "E=Sophos;i=\"5.56,317,1539648000\"; d=\"scan'208\";a=\"72417361\"", "From": "Ross Lagerwall <ross.lagerwall@citrix.com>", "To": "<netdev@vger.kernel.org>, <intel-wired-lan@lists.osuosl.org>", "Date": "Wed, 5 Dec 2018 13:54:26 +0000", "Message-ID": "<20181205135426.26431-1-ross.lagerwall@citrix.com>", "X-Mailer": "git-send-email 2.17.1", "MIME-Version": "1.0", "X-Mailman-Approved-At": "Wed, 05 Dec 2018 15:35:09 +0000", "Subject": "[Intel-wired-lan] [PATCH] ixgbe: Fix race when the VF driver does a\n\treset", "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>", "Cc": "Ross Lagerwall <ross.lagerwall@citrix.com>,\n\t\"David S. Miller\" <davem@davemloft.net>", "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": "When the VF driver does a reset, it (at least the Linux one) writes to\nthe VFCTRL register to issue a reset and then immediately sends a reset\nmessage using the mailbox API. This is racy because when the PF driver\ndetects that the VFCTRL register reset pin has been asserted, it clears\nthe mailbox memory. Depending on ordering, the reset message sent by\nthe VF could be cleared by the PF driver. It then responds to the\ncleared message with a NACK which causes the VF driver to malfunction.\nFix this by deferring clearing the mailbox memory until the reset\nmessage is received.\n\nFixes: 939b701ad633 (\"ixgbe: fix driver behaviour after issuing VFLR\")\nSigned-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 11 ++++++++++-\n 1 file changed, 10 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c\nindex 5dacfc870259..345701af7749 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c\n@@ -700,7 +700,6 @@ static inline void ixgbe_vf_reset_event(struct ixgbe_adapter *adapter, u32 vf)\n \tu8 num_tcs = adapter->hw_tcs;\n \tu32 reg_val;\n \tu32 queue;\n-\tu32 word;\n \n \t/* remove VLAN filters beloning to this VF */\n \tixgbe_clear_vf_vlans(adapter, vf);\n@@ -758,6 +757,14 @@ static inline void ixgbe_vf_reset_event(struct ixgbe_adapter *adapter, u32 vf)\n \t\t}\n \t}\n \n+\tIXGBE_WRITE_FLUSH(hw);\n+}\n+\n+static void ixgbe_vf_clear_mbx(struct ixgbe_adapter *adapter, u32 vf)\n+{\n+\tstruct ixgbe_hw *hw = &adapter->hw;\n+\tu32 word;\n+\n \t/* Clear VF's mailbox memory */\n \tfor (word = 0; word < IXGBE_VFMAILBOX_SIZE; word++)\n \t\tIXGBE_WRITE_REG_ARRAY(hw, IXGBE_PFMBMEM(vf), word, 0);\n@@ -831,6 +838,8 @@ static int ixgbe_vf_reset_msg(struct ixgbe_adapter *adapter, u32 vf)\n \t/* reset the filters for the device */\n \tixgbe_vf_reset_event(adapter, vf);\n \n+\tixgbe_vf_clear_mbx(adapter, vf);\n+\n \t/* set vf mac address */\n \tif (!is_zero_ether_addr(vf_mac))\n \t\tixgbe_set_vf_mac(adapter, vf, vf_mac);\n", "prefixes": [] }