Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/883388/?format=api
{ "id": 883388, "url": "http://patchwork.ozlabs.org/api/patches/883388/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180308225211.12254-1-jeffrey.t.kirsher@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": "<20180308225211.12254-1-jeffrey.t.kirsher@intel.com>", "list_archive_url": null, "date": "2018-03-08T22:52:05", "name": "[S87,v5,1/7] i40e: Fix attach VF to VM issue", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "a0aa0659c54abc195ab86a65f70a5163c487cdb3", "submitter": { "id": 473, "url": "http://patchwork.ozlabs.org/api/people/473/?format=api", "name": "Kirsher, Jeffrey T", "email": "jeffrey.t.kirsher@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/20180308225211.12254-1-jeffrey.t.kirsher@intel.com/mbox/", "series": [ { "id": 32763, "url": "http://patchwork.ozlabs.org/api/series/32763/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=32763", "date": "2018-03-08T22:52:05", "name": "[S87,v5,1/7] i40e: Fix attach VF to VM issue", "version": 5, "mbox": "http://patchwork.ozlabs.org/series/32763/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/883388/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/883388/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.133; helo=hemlock.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 hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\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 3zy5Nv593Xz9scR\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 9 Mar 2018 09:51:58 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id BBC76849FF;\n\tThu, 8 Mar 2018 22:51:56 +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 SyMgt-Kg0nLt; Thu, 8 Mar 2018 22:51:55 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 6834484B65;\n\tThu, 8 Mar 2018 22:51:55 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 260501C03E8\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 8 Mar 2018 22:51:51 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 2132D2ED25\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 8 Mar 2018 22:51:51 +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 m1JFYuAJXLxA for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 8 Mar 2018 22:51:47 +0000 (UTC)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 6B07C22927\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 8 Mar 2018 22:51:47 +0000 (UTC)", "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t08 Mar 2018 14:51:46 -0800", "from jtkirshe-nuc.jf.intel.com ([134.134.177.59])\n\tby orsmga001.jf.intel.com with ESMTP; 08 Mar 2018 14:51:45 -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.47,442,1515484800\"; d=\"scan'208\";a=\"37164037\"", "From": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Thu, 8 Mar 2018 14:52:05 -0800", "Message-Id": "<20180308225211.12254-1-jeffrey.t.kirsher@intel.com>", "X-Mailer": "git-send-email 2.14.3", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [S87 v5 1/7] i40e: Fix attach VF to VM issue", "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>", "Cc": "=?utf-8?b?UGF3ZcWCIEphYsWCb8WEc2tp?= <pawel.jablonski@intel.com>", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "From: Paweł Jabłoński <pawel.jablonski@intel.com>\n\nFix for \"Resource temporarily unavailable\" problem when virsh is\ntrying to attach a device to VM. When the VF driver is loaded on\nhost and virsh is trying to attach it to the VM and set a MAC\naddress, it ends with a race condition between i40e_reset_vf and\ni40e_ndo_set_vf_mac functions. The bug is fixed by adding polling\nin i40e_ndo_set_vf_mac function For when the VF is in Reset mode.\n\nSigned-off-by: Paweł Jabłoński <pawel.jablonski@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 11 +++++++++++\n 1 file changed, 11 insertions(+)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\nindex 6049a5640f26..8559c099525d 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\n@@ -3742,6 +3742,7 @@ int i40e_ndo_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac)\n \tint ret = 0;\n \tstruct hlist_node *h;\n \tint bkt;\n+\tu8 i;\n \n \t/* validate the request */\n \tif (vf_id >= pf->num_alloc_vfs) {\n@@ -3753,6 +3754,16 @@ int i40e_ndo_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac)\n \n \tvf = &(pf->vf[vf_id]);\n \tvsi = pf->vsi[vf->lan_vsi_idx];\n+\n+\t/* When the VF is resetting wait until it is done.\n+\t * It can take up to 200 milliseconds,\n+\t * but wait for up to 300 milliseconds to be safe.\n+\t */\n+\tfor (i = 0; i < 15; i++) {\n+\t\tif (test_bit(I40E_VF_STATE_INIT, &vf->vf_states))\n+\t\t\tbreak;\n+\t\tmsleep(20);\n+\t}\n \tif (!test_bit(I40E_VF_STATE_INIT, &vf->vf_states)) {\n \t\tdev_err(&pf->pdev->dev, \"VF %d still in reset. Try again.\\n\",\n \t\t\tvf_id);\n", "prefixes": [ "S87", "v5", "1/7" ] }