Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1197404/?format=api
{ "id": 1197404, "url": "http://patchwork.ozlabs.org/api/patches/1197404/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20191119114351.41780-1-sasha.neftin@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": "<20191119114351.41780-1-sasha.neftin@intel.com>", "list_archive_url": null, "date": "2019-11-19T11:43:51", "name": "[v1,03/15] igc: Remove no need declaration of the igc_set_default_mac_filter", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "db2462192b4a4697647e8794db6d5afcd9361fc4", "submitter": { "id": 69860, "url": "http://patchwork.ozlabs.org/api/people/69860/?format=api", "name": "Sasha Neftin", "email": "sasha.neftin@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/20191119114351.41780-1-sasha.neftin@intel.com/mbox/", "series": [ { "id": 143759, "url": "http://patchwork.ozlabs.org/api/series/143759/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=143759", "date": "2019-11-19T11:43:32", "name": "[v1,01/15] igc: Remove no need declaration of the igc_clean_tx_ring", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/143759/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1197404/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1197404/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.136;\n\thelo=silver.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 silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\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 47HP9X24dTz9sPj\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 19 Nov 2019 22:44:00 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id CADA022744;\n\tTue, 19 Nov 2019 11:43:58 +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 NORBMtKz-i1v; Tue, 19 Nov 2019 11:43:56 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 393372266F;\n\tTue, 19 Nov 2019 11:43:56 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 450C01BF83B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 19 Nov 2019 11:43:54 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 4192986508\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 19 Nov 2019 11:43:54 +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 zyYi9BFF5HXi for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 19 Nov 2019 11:43:53 +0000 (UTC)", "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 85E3986505\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 19 Nov 2019 11:43:53 +0000 (UTC)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t19 Nov 2019 03:43:53 -0800", "from ccdlinuxdev08.iil.intel.com ([143.185.161.150])\n\tby fmsmga001.fm.intel.com with ESMTP; 19 Nov 2019 03:43:52 -0800" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.68,322,1569308400\"; d=\"scan'208\";a=\"215524411\"", "From": "Sasha Neftin <sasha.neftin@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Tue, 19 Nov 2019 13:43:51 +0200", "Message-Id": "<20191119114351.41780-1-sasha.neftin@intel.com>", "X-Mailer": "git-send-email 2.11.0", "Subject": "[Intel-wired-lan] [PATCH v1 03/15] igc: Remove no need declaration\n\tof the igc_set_default_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>", "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": "We want to avoid forward-declarations of function if possible.\nRearrange the igc_set_default_mac_filter function implementation.\n\nSigned-off-by: Sasha Neftin <sasha.neftin@intel.com>\n---\n drivers/net/ethernet/intel/igc/igc_main.c | 91 +++++++++++++++----------------\n 1 file changed, 45 insertions(+), 46 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c\nindex 87823a04427e..4484e7ab0a53 100644\n--- a/drivers/net/ethernet/intel/igc/igc_main.c\n+++ b/drivers/net/ethernet/intel/igc/igc_main.c\n@@ -54,7 +54,6 @@ MODULE_DEVICE_TABLE(pci, igc_pci_tbl);\n /* forward declaration */\n static int igc_sw_init(struct igc_adapter *);\n static void igc_configure(struct igc_adapter *adapter);\n-static void igc_set_default_mac_filter(struct igc_adapter *adapter);\n static void igc_set_rx_mode(struct net_device *netdev);\n static void igc_write_itr(struct igc_q_vector *q_vector);\n static void igc_assign_vector(struct igc_q_vector *q_vector, int msix_vector);\n@@ -770,6 +769,51 @@ static void igc_setup_tctl(struct igc_adapter *adapter)\n }\n \n /**\n+ * igc_rar_set_index - Sync RAL[index] and RAH[index] registers with MAC table\n+ * @adapter: address of board private structure\n+ * @index: Index of the RAR entry which need to be synced with MAC table\n+ */\n+static void igc_rar_set_index(struct igc_adapter *adapter, u32 index)\n+{\n+\tu8 *addr = adapter->mac_table[index].addr;\n+\tstruct igc_hw *hw = &adapter->hw;\n+\tu32 rar_low, rar_high;\n+\n+\t/* HW expects these to be in network order when they are plugged\n+\t * into the registers which are little endian. In order to guarantee\n+\t * that ordering we need to do an leXX_to_cpup here in order to be\n+\t * ready for the byteswap that occurs with writel\n+\t */\n+\trar_low = le32_to_cpup((__le32 *)(addr));\n+\trar_high = le16_to_cpup((__le16 *)(addr + 4));\n+\n+\t/* Indicate to hardware the Address is Valid. */\n+\tif (adapter->mac_table[index].state & IGC_MAC_STATE_IN_USE) {\n+\t\tif (is_valid_ether_addr(addr))\n+\t\t\trar_high |= IGC_RAH_AV;\n+\n+\t\trar_high |= IGC_RAH_POOL_1 <<\n+\t\t\tadapter->mac_table[index].queue;\n+\t}\n+\n+\twr32(IGC_RAL(index), rar_low);\n+\twrfl();\n+\twr32(IGC_RAH(index), rar_high);\n+\twrfl();\n+}\n+\n+/* Set default MAC address for the PF in the first RAR entry */\n+static void igc_set_default_mac_filter(struct igc_adapter *adapter)\n+{\n+\tstruct igc_mac_addr *mac_table = &adapter->mac_table[0];\n+\n+\tether_addr_copy(mac_table->addr, adapter->hw.mac.addr);\n+\tmac_table->state = IGC_MAC_STATE_DEFAULT | IGC_MAC_STATE_IN_USE;\n+\n+\tigc_rar_set_index(adapter, 0);\n+}\n+\n+/**\n * igc_set_mac - Change the Ethernet Address of the NIC\n * @netdev: network interface device structure\n * @p: pointer to an address structure\n@@ -2430,51 +2474,6 @@ static void igc_configure(struct igc_adapter *adapter)\n \t}\n }\n \n-/**\n- * igc_rar_set_index - Sync RAL[index] and RAH[index] registers with MAC table\n- * @adapter: address of board private structure\n- * @index: Index of the RAR entry which need to be synced with MAC table\n- */\n-static void igc_rar_set_index(struct igc_adapter *adapter, u32 index)\n-{\n-\tu8 *addr = adapter->mac_table[index].addr;\n-\tstruct igc_hw *hw = &adapter->hw;\n-\tu32 rar_low, rar_high;\n-\n-\t/* HW expects these to be in network order when they are plugged\n-\t * into the registers which are little endian. In order to guarantee\n-\t * that ordering we need to do an leXX_to_cpup here in order to be\n-\t * ready for the byteswap that occurs with writel\n-\t */\n-\trar_low = le32_to_cpup((__le32 *)(addr));\n-\trar_high = le16_to_cpup((__le16 *)(addr + 4));\n-\n-\t/* Indicate to hardware the Address is Valid. */\n-\tif (adapter->mac_table[index].state & IGC_MAC_STATE_IN_USE) {\n-\t\tif (is_valid_ether_addr(addr))\n-\t\t\trar_high |= IGC_RAH_AV;\n-\n-\t\trar_high |= IGC_RAH_POOL_1 <<\n-\t\t\tadapter->mac_table[index].queue;\n-\t}\n-\n-\twr32(IGC_RAL(index), rar_low);\n-\twrfl();\n-\twr32(IGC_RAH(index), rar_high);\n-\twrfl();\n-}\n-\n-/* Set default MAC address for the PF in the first RAR entry */\n-static void igc_set_default_mac_filter(struct igc_adapter *adapter)\n-{\n-\tstruct igc_mac_addr *mac_table = &adapter->mac_table[0];\n-\n-\tether_addr_copy(mac_table->addr, adapter->hw.mac.addr);\n-\tmac_table->state = IGC_MAC_STATE_DEFAULT | IGC_MAC_STATE_IN_USE;\n-\n-\tigc_rar_set_index(adapter, 0);\n-}\n-\n /* If the filter to be added and an already existing filter express\n * the same address and address type, it should be possible to only\n * override the other configurations, for example the queue to steer\n", "prefixes": [ "v1", "03/15" ] }