Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1158230/?format=api
{ "id": 1158230, "url": "http://patchwork.ozlabs.org/api/patches/1158230/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190905063422.28743-1-sassmann@kpanic.de/", "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": "<20190905063422.28743-1-sassmann@kpanic.de>", "list_archive_url": null, "date": "2019-09-05T06:34:22", "name": "iavf: fix MAC address setting for VFs when filter is rejected", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "4cf71e8aa27492e13b273ac79167de3fffbf524a", "submitter": { "id": 7508, "url": "http://patchwork.ozlabs.org/api/people/7508/?format=api", "name": "Stefan Assmann", "email": "sassmann@kpanic.de" }, "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/20190905063422.28743-1-sassmann@kpanic.de/mbox/", "series": [ { "id": 129114, "url": "http://patchwork.ozlabs.org/api/series/129114/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=129114", "date": "2019-09-05T06:34:22", "name": "iavf: fix MAC address setting for VFs when filter is rejected", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/129114/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1158230/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1158230/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=none (p=none dis=none) header.from=kpanic.de" ], "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 46P9sH1VxHz9s4Y\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 5 Sep 2019 16:34:42 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 1B919853C3;\n\tThu, 5 Sep 2019 06:34:40 +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 qQYD4fXxaveh; Thu, 5 Sep 2019 06:34:39 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 9ABA28547D;\n\tThu, 5 Sep 2019 06:34:39 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 4FAFB1BF423\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 5 Sep 2019 06:34:38 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 44AEB853C3\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 5 Sep 2019 06:34:38 +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 Oj5QN3vNsyaY for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 5 Sep 2019 06:34:37 +0000 (UTC)", "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 7979C845C5\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 5 Sep 2019 06:34:37 +0000 (UTC)", "from smtp.corp.redhat.com\n\t(int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id A9C0AC05E740;\n\tThu, 5 Sep 2019 06:34:36 +0000 (UTC)", "from p50.redhat.com (ovpn-117-224.ams2.redhat.com [10.36.117.224])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 25D296060D;\n\tThu, 5 Sep 2019 06:34:34 +0000 (UTC)" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": [ "from auto-whitelisted by SQLgrey-1.7.6", "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.31]); Thu, 05 Sep 2019 06:34:36 +0000 (UTC)" ], "From": "Stefan Assmann <sassmann@kpanic.de>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Thu, 5 Sep 2019 08:34:22 +0200", "Message-Id": "<20190905063422.28743-1-sassmann@kpanic.de>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.13", "Subject": "[Intel-wired-lan] [PATCH] iavf: fix MAC address setting for VFs\n\twhen filter is rejected", "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": "netdev@vger.kernel.org, davem@davemloft.net, sassmann@kpanic.de", "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": "Currently iavf unconditionally applies MAC address change requests. This\nbrings the VF in a state where it is no longer able to pass traffic if\nthe PF rejects a MAC filter change for the VF.\nA typical scenario for a rejected MAC filter is for an untrusted VF to\nrequest to change the MAC address when an administratively set MAC is\npresent.\n\nTo keep iavf working in this scenario the MAC filter handling in iavf\nneeds to act on the PF reply regarding the MAC filter change. In the\ncase of an ack the new MAC address gets set, whereas in the case of a\nnack the previous MAC address needs to stay in place.\n\nSigned-off-by: Stefan Assmann <sassmann@kpanic.de>\n---\n drivers/net/ethernet/intel/iavf/iavf_main.c | 1 -\n drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 7 +++++++\n 2 files changed, 7 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c\nindex 39cc67cde89e..9e571a657fe7 100644\n--- a/drivers/net/ethernet/intel/iavf/iavf_main.c\n+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c\n@@ -826,7 +826,6 @@ static int iavf_set_mac(struct net_device *netdev, void *p)\n \n \tif (f) {\n \t\tether_addr_copy(hw->mac.addr, addr->sa_data);\n-\t\tether_addr_copy(netdev->dev_addr, adapter->hw.mac.addr);\n \t}\n \n \treturn (f == NULL) ? -ENOMEM : 0;\ndiff --git a/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c b/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c\nindex d49d58a6de80..c46770eba320 100644\n--- a/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c\n+++ b/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c\n@@ -1252,6 +1252,8 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,\n \t\tcase VIRTCHNL_OP_ADD_ETH_ADDR:\n \t\t\tdev_err(&adapter->pdev->dev, \"Failed to add MAC filter, error %s\\n\",\n \t\t\t\tiavf_stat_str(&adapter->hw, v_retval));\n+\t\t\t/* restore administratively set MAC address */\n+\t\t\tether_addr_copy(adapter->hw.mac.addr, netdev->dev_addr);\n \t\t\tbreak;\n \t\tcase VIRTCHNL_OP_DEL_VLAN:\n \t\t\tdev_err(&adapter->pdev->dev, \"Failed to delete VLAN filter, error %s\\n\",\n@@ -1319,6 +1321,11 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,\n \t\t}\n \t}\n \tswitch (v_opcode) {\n+\tcase VIRTCHNL_OP_ADD_ETH_ADDR: {\n+\t\tif (!ether_addr_equal(netdev->dev_addr, adapter->hw.mac.addr))\n+\t\t\tether_addr_copy(netdev->dev_addr, adapter->hw.mac.addr);\n+\t\t}\n+\t\tbreak;\n \tcase VIRTCHNL_OP_GET_STATS: {\n \t\tstruct iavf_eth_stats *stats =\n \t\t\t(struct iavf_eth_stats *)msg;\n", "prefixes": [] }