Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/750181/?format=api
{ "id": 750181, "url": "http://patchwork.ozlabs.org/api/patches/750181/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170412203522.57743-1-anthony.l.nguyen@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": "<20170412203522.57743-1-anthony.l.nguyen@intel.com>", "list_archive_url": null, "date": "2017-04-12T20:35:22", "name": "ixgbe: Allow setting zero MAC address for VF", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "387199cdfd70f1b3bac8773168f1029f88638b58", "submitter": { "id": 68875, "url": "http://patchwork.ozlabs.org/api/people/68875/?format=api", "name": "Tony Nguyen", "email": "anthony.l.nguyen@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/20170412203522.57743-1-anthony.l.nguyen@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/750181/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/750181/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@lists.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" ], "Received": [ "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\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 3w3HV11tXPz9s7f\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 13 Apr 2017 07:43:20 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id B2A4D3049E;\n\tWed, 12 Apr 2017 21:43:18 +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 JzAURYg8Z35f; Wed, 12 Apr 2017 21:43:17 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 983CC30ADC;\n\tWed, 12 Apr 2017 21:43:17 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 53B131C2754\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 12 Apr 2017 21:43:16 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 4A90730ADC\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 12 Apr 2017 21:43:16 +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 flMHX726v+Pa for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 12 Apr 2017 21:43:14 +0000 (UTC)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby silver.osuosl.org (Postfix) with ESMTPS id CDED93049E\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 12 Apr 2017 21:43:14 +0000 (UTC)", "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t12 Apr 2017 14:43:14 -0700", "from unknown (HELO localhost.jf.intel.com) ([10.166.152.56])\n\tby fmsmga006.fm.intel.com with ESMTP; 12 Apr 2017 14:43:13 -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-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.37,191,1488873600\"; d=\"scan'208\";a=\"88398655\"", "From": "Tony Nguyen <anthony.l.nguyen@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Wed, 12 Apr 2017 13:35:22 -0700", "Message-Id": "<20170412203522.57743-1-anthony.l.nguyen@intel.com>", "X-Mailer": "git-send-email 2.9.3", "Subject": "[Intel-wired-lan] [PATCH] ixgbe: Allow setting zero MAC address for\n\tVF", "X-BeenThere": "intel-wired-lan@lists.osuosl.org", "X-Mailman-Version": "2.1.18-1", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.lists.osuosl.org>", "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>", "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.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@lists.osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>" }, "content": "Currently, there is no logic that allows a VF's MAC address to be removed\nfrom the RAR table.\n\nAllow the user to specify a zero MAC address in order to clear the VF's\nMAC address from the RAR table. This functionality is also utilized by\nlibvirt when removing VFs.\n\nSigned-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 28 +++++++++++++++++---------\n 1 file changed, 18 insertions(+), 10 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c\nindex c45de53..58897d9 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c\n@@ -1347,18 +1347,26 @@ void ixgbe_ping_all_vfs(struct ixgbe_adapter *adapter)\n int ixgbe_ndo_set_vf_mac(struct net_device *netdev, int vf, u8 *mac)\n {\n \tstruct ixgbe_adapter *adapter = netdev_priv(netdev);\n-\tif (!is_valid_ether_addr(mac) || (vf >= adapter->num_vfs))\n+\n+\tif (vf >= adapter->num_vfs)\n+\t\treturn -EINVAL;\n+\n+\tif (is_zero_ether_addr(mac)) {\n+\t\tadapter->vfinfo[vf].pf_set_mac = false;\n+\t\tdev_info(&adapter->pdev->dev, \"removing MAC on VF %d\\n\", vf);\n+\t} else if (is_valid_ether_addr(mac)) {\n+\t\tadapter->vfinfo[vf].pf_set_mac = true;\n+\t\tdev_info(&adapter->pdev->dev, \"setting MAC %pM on VF %d\\n\",\n+\t\t\t mac, vf);\n+\t\tdev_info(&adapter->pdev->dev, \"Reload the VF driver to make this change effective.\");\n+\t\tif (test_bit(__IXGBE_DOWN, &adapter->state)) {\n+\t\t\tdev_warn(&adapter->pdev->dev, \"The VF MAC address has been set, but the PF device is not up.\\n\");\n+\t\t\tdev_warn(&adapter->pdev->dev, \"Bring the PF device up before attempting to use the VF device.\\n\");\n+\t\t}\n+\t} else {\n \t\treturn -EINVAL;\n-\tadapter->vfinfo[vf].pf_set_mac = true;\n-\tdev_info(&adapter->pdev->dev, \"setting MAC %pM on VF %d\\n\", mac, vf);\n-\tdev_info(&adapter->pdev->dev, \"Reload the VF driver to make this\"\n-\t\t\t\t \" change effective.\");\n-\tif (test_bit(__IXGBE_DOWN, &adapter->state)) {\n-\t\tdev_warn(&adapter->pdev->dev, \"The VF MAC address has been set,\"\n-\t\t\t \" but the PF device is not up.\\n\");\n-\t\tdev_warn(&adapter->pdev->dev, \"Bring the PF device up before\"\n-\t\t\t \" attempting to use the VF device.\\n\");\n \t}\n+\n \treturn ixgbe_set_vf_mac(adapter, vf, mac);\n }\n \n", "prefixes": [] }