Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/511035/?format=api
{ "id": 511035, "url": "http://patchwork.ozlabs.org/api/patches/511035/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1440616461-110869-15-git-send-email-catherine.sullivan@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": "<1440616461-110869-15-git-send-email-catherine.sullivan@intel.com>", "list_archive_url": null, "date": "2015-08-26T19:14:20", "name": "[next,S11,14/15] i40e/i40evf: fix unicast mac address add", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "718788dc62d3eaa3896051829d7028f7d1d0711e", "submitter": { "id": 13931, "url": "http://patchwork.ozlabs.org/api/people/13931/?format=api", "name": "Catherine Sullivan", "email": "catherine.sullivan@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/1440616461-110869-15-git-send-email-catherine.sullivan@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/511035/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/511035/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 fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ozlabs.org (Postfix) with ESMTP id 94607140311\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 27 Aug 2015 05:13:59 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id E7E0CA2BB5;\n\tWed, 26 Aug 2015 19:13:58 +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 EtJVafmkhiNR; Wed, 26 Aug 2015 19:13:57 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 5B379A2D75;\n\tWed, 26 Aug 2015 19:13:56 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 965A61C1550\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 26 Aug 2015 19:13:55 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 9249794F69\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 26 Aug 2015 19:13:55 +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 XpSsH0928W7q for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 26 Aug 2015 19:13:55 +0000 (UTC)", "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 029BE94F37\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 26 Aug 2015 19:13:54 +0000 (UTC)", "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby fmsmga103.fm.intel.com with ESMTP; 26 Aug 2015 12:13:54 -0700", "from catheri1-tigger.jf.intel.com ([134.134.176.92])\n\tby orsmga003.jf.intel.com with ESMTP; 26 Aug 2015 12:13:54 -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.17,418,1437462000\"; d=\"scan'208\";a=\"632786497\"", "From": "Catherine Sullivan <catherine.sullivan@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Wed, 26 Aug 2015 15:14:20 -0400", "Message-Id": "<1440616461-110869-15-git-send-email-catherine.sullivan@intel.com>", "X-Mailer": "git-send-email 1.9.3", "In-Reply-To": "<1440616461-110869-1-git-send-email-catherine.sullivan@intel.com>", "References": "<1440616461-110869-1-git-send-email-catherine.sullivan@intel.com>", "Subject": "[Intel-wired-lan] [next PATCH S11 14/15] i40e/i40evf: fix unicast\n\tmac address add", "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": "From: Shannon Nelson <shannon.nelson@intel.com>\n\nWhen using something like \"ip maddr add ...\" to add another unicast mac\naddress to the netdev, the mac address comes into the set_rx_mode handler\nin the multicast list whether it is a unicast or multicast address.\nThis was confusing the code when it was trying to search for addresses\nthat needed to be deleted from the VSI, because it was looking for the\nVSI unicast address in the netdev unicast list. The result was that a\nnew unicast address would get added to the VSI list and then immediately\nremoved, and would never actually make it down into the hardware.\n\nThis patch removes the separation from unicast and multicast in the search\nfor filters to be deleted. It also simplifies the logic a little with a\njump to the bottom of the loop when an address is found. Now it doesn't\nmatter which netdev list the address is hiding in, we'll check them all.\n\nSigned-off-by: Shannon Nelson <shannon.nelson@intel.com>\nChange-ID: Ie3685a92427ae7d2212bf948919ce295bc7a874c\n---\n drivers/net/ethernet/intel/i40e/i40e_main.c | 41 +++++++++-------------\n drivers/net/ethernet/intel/i40evf/i40evf_main.c | 45 ++++++++++++-------------\n 2 files changed, 38 insertions(+), 48 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex 1165460..2b0a5ce 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -1643,36 +1643,27 @@ static void i40e_set_rx_mode(struct net_device *netdev)\n \n \t/* remove filter if not in netdev list */\n \tlist_for_each_entry_safe(f, ftmp, &vsi->mac_filter_list, list) {\n-\t\tbool found = false;\n \n \t\tif (!f->is_netdev)\n \t\t\tcontinue;\n \n-\t\tif (is_multicast_ether_addr(f->macaddr)) {\n-\t\t\tnetdev_for_each_mc_addr(mca, netdev) {\n-\t\t\t\tif (ether_addr_equal(mca->addr, f->macaddr)) {\n-\t\t\t\t\tfound = true;\n-\t\t\t\t\tbreak;\n-\t\t\t\t}\n-\t\t\t}\n-\t\t} else {\n-\t\t\tnetdev_for_each_uc_addr(uca, netdev) {\n-\t\t\t\tif (ether_addr_equal(uca->addr, f->macaddr)) {\n-\t\t\t\t\tfound = true;\n-\t\t\t\t\tbreak;\n-\t\t\t\t}\n-\t\t\t}\n+\t\tnetdev_for_each_mc_addr(mca, netdev)\n+\t\t\tif (ether_addr_equal(mca->addr, f->macaddr))\n+\t\t\t\tgoto bottom_of_search_loop;\n \n-\t\t\tfor_each_dev_addr(netdev, ha) {\n-\t\t\t\tif (ether_addr_equal(ha->addr, f->macaddr)) {\n-\t\t\t\t\tfound = true;\n-\t\t\t\t\tbreak;\n-\t\t\t\t}\n-\t\t\t}\n-\t\t}\n-\t\tif (!found)\n-\t\t\ti40e_del_filter(\n-\t\t\t vsi, f->macaddr, I40E_VLAN_ANY, false, true);\n+\t\tnetdev_for_each_uc_addr(uca, netdev)\n+\t\t\tif (ether_addr_equal(uca->addr, f->macaddr))\n+\t\t\t\tgoto bottom_of_search_loop;\n+\n+\t\tfor_each_dev_addr(netdev, ha)\n+\t\t\tif (ether_addr_equal(ha->addr, f->macaddr))\n+\t\t\t\tgoto bottom_of_search_loop;\n+\n+\t\t/* f->macaddr wasn't found in uc, mc, or ha list so delete it */\n+\t\ti40e_del_filter(vsi, f->macaddr, I40E_VLAN_ANY, false, true);\n+\n+bottom_of_search_loop:\n+\t\tcontinue;\n \t}\n \n \t/* check for other flag changes */\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\nindex 3fc5606..b2d07f2 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n@@ -777,6 +777,7 @@ static void i40evf_set_rx_mode(struct net_device *netdev)\n \tstruct i40evf_mac_filter *f, *ftmp;\n \tstruct netdev_hw_addr *uca;\n \tstruct netdev_hw_addr *mca;\n+\tstruct netdev_hw_addr *ha;\n \tint count = 50;\n \n \t/* add addr if not already in the filter list */\n@@ -798,29 +799,27 @@ static void i40evf_set_rx_mode(struct net_device *netdev)\n \t}\n \t/* remove filter if not in netdev list */\n \tlist_for_each_entry_safe(f, ftmp, &adapter->mac_filter_list, list) {\n-\t\tbool found = false;\n-\n-\t\tif (is_multicast_ether_addr(f->macaddr)) {\n-\t\t\tnetdev_for_each_mc_addr(mca, netdev) {\n-\t\t\t\tif (ether_addr_equal(mca->addr, f->macaddr)) {\n-\t\t\t\t\tfound = true;\n-\t\t\t\t\tbreak;\n-\t\t\t\t}\n-\t\t\t}\n-\t\t} else {\n-\t\t\tnetdev_for_each_uc_addr(uca, netdev) {\n-\t\t\t\tif (ether_addr_equal(uca->addr, f->macaddr)) {\n-\t\t\t\t\tfound = true;\n-\t\t\t\t\tbreak;\n-\t\t\t\t}\n-\t\t\t}\n-\t\t\tif (ether_addr_equal(f->macaddr, adapter->hw.mac.addr))\n-\t\t\t\tfound = true;\n-\t\t}\n-\t\tif (!found) {\n-\t\t\tf->remove = true;\n-\t\t\tadapter->aq_required |= I40EVF_FLAG_AQ_DEL_MAC_FILTER;\n-\t\t}\n+\t\tnetdev_for_each_mc_addr(mca, netdev)\n+\t\t\tif (ether_addr_equal(mca->addr, f->macaddr))\n+\t\t\t\tgoto bottom_of_search_loop;\n+\n+\t\tnetdev_for_each_uc_addr(uca, netdev)\n+\t\t\tif (ether_addr_equal(uca->addr, f->macaddr))\n+\t\t\t\tgoto bottom_of_search_loop;\n+\n+\t\tfor_each_dev_addr(netdev, ha)\n+\t\t\tif (ether_addr_equal(ha->addr, f->macaddr))\n+\t\t\t\tgoto bottom_of_search_loop;\n+\n+\t\tif (ether_addr_equal(f->macaddr, adapter->hw.mac.addr))\n+\t\t\tgoto bottom_of_search_loop;\n+\n+\t\t/* f->macaddr wasn't found in uc, mc, or ha list so delete it */\n+\t\tf->remove = true;\n+\t\tadapter->aq_required |= I40EVF_FLAG_AQ_DEL_MAC_FILTER;\n+\n+bottom_of_search_loop:\n+\t\tcontinue;\n \t}\n \tclear_bit(__I40EVF_IN_CRITICAL_TASK, &adapter->crit_section);\n }\n", "prefixes": [ "next", "S11", "14/15" ] }