Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/791249/?format=api
{ "id": 791249, "url": "http://patchwork.ozlabs.org/api/patches/791249/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170719220026.47784-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": "<20170719220026.47784-1-anthony.l.nguyen@intel.com>", "list_archive_url": null, "date": "2017-07-19T22:00:26", "name": "[v2] ixgbe: Ensure MAC filter was added before setting MACVLAN", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "3b38020561059072955f0c773447a4b4136f640f", "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/20170719220026.47784-1-anthony.l.nguyen@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/791249/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/791249/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.136; helo=silver.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "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 3xCWJq25zxz9t33\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 20 Jul 2017 08:04:09 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 1A3E830959;\n\tWed, 19 Jul 2017 22:04:08 +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 aa0GJ6qGyhza; Wed, 19 Jul 2017 22:04:07 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id AD5AF30935;\n\tWed, 19 Jul 2017 22:04:07 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 8B09E1C0018\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 19 Jul 2017 22:04:06 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 84A4830959\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 19 Jul 2017 22:04:06 +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 BjgR+NCwOheh for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 19 Jul 2017 22:04:05 +0000 (UTC)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 7201730958\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 19 Jul 2017 22:04:05 +0000 (UTC)", "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t19 Jul 2017 15:04:04 -0700", "from unknown (HELO anguy11-linux.jf.intel.com) ([10.165.248.34])\n\tby orsmga005.jf.intel.com with ESMTP; 19 Jul 2017 15:04:04 -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.40,381,1496127600\"; d=\"scan'208\";a=\"127093094\"", "From": "Tony Nguyen <anthony.l.nguyen@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Wed, 19 Jul 2017 15:00:26 -0700", "Message-Id": "<20170719220026.47784-1-anthony.l.nguyen@intel.com>", "X-Mailer": "git-send-email 2.9.3", "Subject": "[Intel-wired-lan] [PATCH v2] ixgbe: Ensure MAC filter was added\n\tbefore setting MACVLAN", "X-BeenThere": "intel-wired-lan@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.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": "This patch adds a check to ensure that adding the MAC filter was\nsuccessful before setting the MACVLAN. If it was unsuccessful, propagate\nthe error.\n\nSigned-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>\n---\nv2: \n Made changes as suggested by Joe Perches.\n - Declared retval as an int\n - Switched logic to return on error\n - Return 0 on success\n\n drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 9 ++++++---\n 1 file changed, 6 insertions(+), 3 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c\nindex 0760bd7..112d24c 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c\n@@ -679,8 +679,9 @@ static void ixgbe_clear_vf_vlans(struct ixgbe_adapter *adapter, u32 vf)\n static int ixgbe_set_vf_macvlan(struct ixgbe_adapter *adapter,\n \t\t\t\tint vf, int index, unsigned char *mac_addr)\n {\n-\tstruct list_head *pos;\n \tstruct vf_macvlans *entry;\n+\tstruct list_head *pos;\n+\tint retval = 0;\n \n \tif (index <= 1) {\n \t\tlist_for_each(pos, &adapter->vf_mvs.l) {\n@@ -721,13 +722,15 @@ static int ixgbe_set_vf_macvlan(struct ixgbe_adapter *adapter,\n \tif (!entry || !entry->free)\n \t\treturn -ENOSPC;\n \n+\tretval = ixgbe_add_mac_filter(adapter, mac_addr, vf);\n+\tif (retval < 0)\n+\t\treturn retval;\n+\n \tentry->free = false;\n \tentry->is_macvlan = true;\n \tentry->vf = vf;\n \tmemcpy(entry->vf_macvlan, mac_addr, ETH_ALEN);\n \n-\tixgbe_add_mac_filter(adapter, mac_addr, vf);\n-\n \treturn 0;\n }\n \n", "prefixes": [ "v2" ] }