Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1257848/?format=api
{ "id": 1257848, "url": "http://patchwork.ozlabs.org/api/patches/1257848/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200318230102.36952-8-andre.guedes@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": "<20200318230102.36952-8-andre.guedes@intel.com>", "list_archive_url": null, "date": "2020-03-18T23:00:57", "name": "[07/12] igc: Remove 'queue' check in igc_del_mac_filter()", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "65b230357bc47e3cd2e4ed363b54a653f84e99fa", "submitter": { "id": 72323, "url": "http://patchwork.ozlabs.org/api/people/72323/?format=api", "name": "Andre Guedes", "email": "andre.guedes@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/20200318230102.36952-8-andre.guedes@intel.com/mbox/", "series": [ { "id": 165243, "url": "http://patchwork.ozlabs.org/api/series/165243/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=165243", "date": "2020-03-18T23:00:52", "name": "igc: Refactor MAC address filtering code", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/165243/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1257848/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1257848/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; spf=pass (sender SPF authorized)\n\tsmtp.mailfrom=osuosl.org (client-ip=140.211.166.133;\n\thelo=hemlock.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdmarc=fail (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 ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 48jQXp6SnHz9sPF\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 19 Mar 2020 10:02:18 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 9985587985;\n\tWed, 18 Mar 2020 23:02:16 +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 sSwDl1fre1Ev; Wed, 18 Mar 2020 23:02:14 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id EBC29878F7;\n\tWed, 18 Mar 2020 23:02:14 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 55BAA1BF335\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 18 Mar 2020 23:02:11 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 535CC86644\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 18 Mar 2020 23:02:11 +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 NBYSBRfTCNbr for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 18 Mar 2020 23:02:10 +0000 (UTC)", "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id C6ECE86637\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 18 Mar 2020 23:02:10 +0000 (UTC)", "from orsmga006.jf.intel.com ([10.7.209.51])\n\tby fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; \n\t18 Mar 2020 16:02:10 -0700", "from ymtomada-mobl.amr.corp.intel.com ([10.251.21.179])\n\tby orsmga006.jf.intel.com with ESMTP; 18 Mar 2020 16:02:09 -0700" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "IronPort-SDR": [ "2WQ6qSk9bJHTlzPVRf1n6VrWidDINLqBDPb1oMGamE9R60zspuk530nXiZGHnyWW08NLdQJckH\n\tXL54mhKsD1eA==", "YXvbqGJmU5qRzct76QEu0HpABUgHzMMhj1M+jEMLtBhOVYSVwzqdu50mbo0hnTEi6LS7AS+SFo\n\tUavEwqnQl5Jg==" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.70,569,1574150400\"; d=\"scan'208\";a=\"248341780\"", "From": "Andre Guedes <andre.guedes@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Wed, 18 Mar 2020 16:00:57 -0700", "Message-Id": "<20200318230102.36952-8-andre.guedes@intel.com>", "X-Mailer": "git-send-email 2.25.0", "In-Reply-To": "<20200318230102.36952-1-andre.guedes@intel.com>", "References": "<20200318230102.36952-1-andre.guedes@intel.com>", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [PATCH 07/12] igc: Remove 'queue' check in\n\tigc_del_mac_filter()", "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>", "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": "igc_add_mac_filter() doesn't allow us to have more than one entry with\nthe same address and address type in adapter->mac_table so checking if\n'queue' matches in igc_del_mac_filter() isn't necessary. This patch\nremoves that check.\n\nThis patch also takes the opportunity to improve the igc_del_mac_filter\ndocumentation and remove comment which is not applicable to this I225\ncontroller.\n\nSigned-off-by: Andre Guedes <andre.guedes@intel.com>\n---\n drivers/net/ethernet/intel/igc/igc_main.c | 27 ++++++++++-------------\n 1 file changed, 12 insertions(+), 15 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c\nindex a71f1a5ca27c..8a3cae2367d4 100644\n--- a/drivers/net/ethernet/intel/igc/igc_main.c\n+++ b/drivers/net/ethernet/intel/igc/igc_main.c\n@@ -2234,14 +2234,17 @@ static int igc_add_mac_filter(struct igc_adapter *adapter, const u8 *addr,\n \treturn -ENOSPC;\n }\n \n-/* Remove a MAC filter for 'addr' directing matching traffic to\n- * 'queue', 'flags' is used to indicate what kind of match need to be\n- * removed, match is by default for the destination address, if\n- * matching by source address is to be removed the flag\n- * IGC_MAC_STATE_SRC_ADDR can be used.\n- */\n+/* Delete MAC address filter from adapter.\n+ *\n+ * @adapter: Pointer to adapter where the filter should be deleted from.\n+ * @addr: MAC address.\n+ * @flags: Set IGC_MAC_STATE_SRC_ADDR bit to indicate @address is a source\n+ * address.\n+ *\n+ * In case of success, returns 0. Otherwise, it returns a negative errno code.\n+ */\n static int igc_del_mac_filter(struct igc_adapter *adapter, const u8 *addr,\n-\t\t\t const u8 queue, const u8 flags)\n+\t\t\t const u8 flags)\n {\n \tstruct igc_hw *hw = &adapter->hw;\n \tint rar_entries = hw->mac.rar_entry_count;\n@@ -2250,17 +2253,11 @@ static int igc_del_mac_filter(struct igc_adapter *adapter, const u8 *addr,\n \tif (!is_valid_ether_addr(addr))\n \t\treturn -EINVAL;\n \n-\t/* Search for matching entry in the MAC table based on given address\n-\t * and queue. Do not touch entries at the end of the table reserved\n-\t * for the VF MAC addresses.\n-\t */\n \tfor (i = 0; i < rar_entries; i++) {\n \t\tif (!(adapter->mac_table[i].state & IGC_MAC_STATE_IN_USE))\n \t\t\tcontinue;\n \t\tif (flags && (adapter->mac_table[i].state & flags) != flags)\n \t\t\tcontinue;\n-\t\tif (adapter->mac_table[i].queue != queue)\n-\t\t\tcontinue;\n \t\tif (!ether_addr_equal(adapter->mac_table[i].addr, addr))\n \t\t\tcontinue;\n \n@@ -2296,7 +2293,7 @@ static int igc_uc_unsync(struct net_device *netdev, const unsigned char *addr)\n {\n \tstruct igc_adapter *adapter = netdev_priv(netdev);\n \n-\treturn igc_del_mac_filter(adapter, addr, adapter->num_rx_queues, 0);\n+\treturn igc_del_mac_filter(adapter, addr, 0);\n }\n \n /**\n@@ -3741,7 +3738,7 @@ int igc_add_mac_steering_filter(struct igc_adapter *adapter,\n int igc_del_mac_steering_filter(struct igc_adapter *adapter,\n \t\t\t\tconst u8 *addr, u8 queue, u8 flags)\n {\n-\treturn igc_del_mac_filter(adapter, addr, queue,\n+\treturn igc_del_mac_filter(adapter, addr,\n \t\t\t\t IGC_MAC_STATE_QUEUE_STEERING | flags);\n }\n \n", "prefixes": [ "07/12" ] }