Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/815879/?format=api
{ "id": 815879, "url": "http://patchwork.ozlabs.org/api/patches/815879/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1505828454-2826-1-git-send-email-zhangshengju@cmss.chinamobile.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": "<1505828454-2826-1-git-send-email-zhangshengju@cmss.chinamobile.com>", "list_archive_url": null, "date": "2017-09-19T13:40:54", "name": "[net-next,RESEND] igb: add function to get maximum RSS queues", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "18c85e74b6a6d4b676d4a00972e457a04e45302e", "submitter": { "id": 66922, "url": "http://patchwork.ozlabs.org/api/people/66922/?format=api", "name": "Zhang Shengju", "email": "zhangshengju@cmss.chinamobile.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/1505828454-2826-1-git-send-email-zhangshengju@cmss.chinamobile.com/mbox/", "series": [ { "id": 3977, "url": "http://patchwork.ozlabs.org/api/series/3977/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=3977", "date": "2017-09-19T13:40:54", "name": "[net-next,RESEND] igb: add function to get maximum RSS queues", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/3977/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/815879/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/815879/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.137; helo=fraxinus.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\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 3xxcVz6R92z9sBW\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 20 Sep 2017 08:10:02 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id E0C2184057;\n\tTue, 19 Sep 2017 22:10:00 +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 IBMirZ_9smLS; Tue, 19 Sep 2017 22:09:58 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 95EEF86C19;\n\tTue, 19 Sep 2017 22:09:58 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 7C7371C0240\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 19 Sep 2017 13:50:12 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 71B9788882\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 19 Sep 2017 13:50:12 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id wXphlBnWsT+5 for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 19 Sep 2017 13:50:10 +0000 (UTC)", "from cmccmta3.chinamobile.com (cmccmta3.chinamobile.com\n\t[221.176.66.81])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 226788887F\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 19 Sep 2017 13:50:08 +0000 (UTC)", "from spf.mail.chinamobile.com (unknown[172.16.121.3]) by\n\trmmx-syy-dmz-app09-12009 (RichMail) with SMTP id\n\t2ee959c11e6ca91-bae72; Tue, 19 Sep 2017 21:41:00 +0800 (CST)", "from promote.cache-dns.local (unknown[183.209.110.153])\n\tby rmsmtp-syy-appsvr02-12002 (RichMail) with SMTP id\n\t2ee259c11e66789-6ab11; Tue, 19 Sep 2017 21:40:59 +0800 (CST)" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "delayed 00:09:05 by SQLgrey-1.7.6", "X-RM-TRANSID": [ "2ee959c11e6ca91-bae72", "2ee259c11e66789-6ab11" ], "X-RM-SPAM-FLAG": "00000000", "From": "Zhang Shengju <zhangshengju@cmss.chinamobile.com>", "To": "jeffrey.t.kirsher@intel.com, intel-wired-lan@lists.osuosl.org,\n\tnetdev@vger.kernel.org", "Date": "Tue, 19 Sep 2017 21:40:54 +0800", "Message-Id": "<1505828454-2826-1-git-send-email-zhangshengju@cmss.chinamobile.com>", "X-Mailer": "git-send-email 1.8.3.1", "X-Mailman-Approved-At": "Tue, 19 Sep 2017 22:09:58 +0000", "Subject": "[Intel-wired-lan] [net-next,\n\tRESEND] igb: add function to get maximum RSS queues", "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 new function igb_get_max_rss_queues() to get maximum\nRSS queues, this will reduce duplicate code and facilitate future\nmaintenance.\n\nSigned-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>\n---\n drivers/net/ethernet/intel/igb/igb.h | 1 +\n drivers/net/ethernet/intel/igb/igb_ethtool.c | 32 +---------------------------\n drivers/net/ethernet/intel/igb/igb_main.c | 12 +++++++++--\n 3 files changed, 12 insertions(+), 33 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h\nindex 06ffb2b..ca94eff 100644\n--- a/drivers/net/ethernet/intel/igb/igb.h\n+++ b/drivers/net/ethernet/intel/igb/igb.h\n@@ -684,6 +684,7 @@ void igb_ptp_rx_pktstamp(struct igb_q_vector *q_vector, void *va,\n int igb_ptp_set_ts_config(struct net_device *netdev, struct ifreq *ifr);\n int igb_ptp_get_ts_config(struct net_device *netdev, struct ifreq *ifr);\n void igb_set_flag_queue_pairs(struct igb_adapter *, const u32);\n+unsigned int igb_get_max_rss_queues(struct igb_adapter *);\n #ifdef CONFIG_IGB_HWMON\n void igb_sysfs_exit(struct igb_adapter *adapter);\n int igb_sysfs_init(struct igb_adapter *adapter);\ndiff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c\nindex d06a8db..606e676 100644\n--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c\n+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c\n@@ -3338,37 +3338,7 @@ static int igb_set_rxfh(struct net_device *netdev, const u32 *indir,\n \n static unsigned int igb_max_channels(struct igb_adapter *adapter)\n {\n-\tstruct e1000_hw *hw = &adapter->hw;\n-\tunsigned int max_combined = 0;\n-\n-\tswitch (hw->mac.type) {\n-\tcase e1000_i211:\n-\t\tmax_combined = IGB_MAX_RX_QUEUES_I211;\n-\t\tbreak;\n-\tcase e1000_82575:\n-\tcase e1000_i210:\n-\t\tmax_combined = IGB_MAX_RX_QUEUES_82575;\n-\t\tbreak;\n-\tcase e1000_i350:\n-\t\tif (!!adapter->vfs_allocated_count) {\n-\t\t\tmax_combined = 1;\n-\t\t\tbreak;\n-\t\t}\n-\t\t/* fall through */\n-\tcase e1000_82576:\n-\t\tif (!!adapter->vfs_allocated_count) {\n-\t\t\tmax_combined = 2;\n-\t\t\tbreak;\n-\t\t}\n-\t\t/* fall through */\n-\tcase e1000_82580:\n-\tcase e1000_i354:\n-\tdefault:\n-\t\tmax_combined = IGB_MAX_RX_QUEUES;\n-\t\tbreak;\n-\t}\n-\n-\treturn max_combined;\n+\treturn igb_get_max_rss_queues(adapter);\n }\n \n static void igb_get_channels(struct net_device *netdev,\ndiff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c\nindex ec62410..e6cc6b5 100644\n--- a/drivers/net/ethernet/intel/igb/igb_main.c\n+++ b/drivers/net/ethernet/intel/igb/igb_main.c\n@@ -3026,10 +3026,10 @@ static void igb_probe_vfs(struct igb_adapter *adapter)\n #endif /* CONFIG_PCI_IOV */\n }\n \n-static void igb_init_queue_configuration(struct igb_adapter *adapter)\n+unsigned int igb_get_max_rss_queues(struct igb_adapter *adapter)\n {\n \tstruct e1000_hw *hw = &adapter->hw;\n-\tu32 max_rss_queues;\n+\tunsigned int max_rss_queues;\n \n \t/* Determine the maximum number of RSS queues supported. */\n \tswitch (hw->mac.type) {\n@@ -3060,6 +3060,14 @@ static void igb_init_queue_configuration(struct igb_adapter *adapter)\n \t\tbreak;\n \t}\n \n+\treturn max_rss_queues;\n+}\n+\n+static void igb_init_queue_configuration(struct igb_adapter *adapter)\n+{\n+\tu32 max_rss_queues;\n+\n+\tmax_rss_queues = igb_get_max_rss_queues(adapter);\n \tadapter->rss_queues = min_t(u32, max_rss_queues, num_online_cpus());\n \n \tigb_set_flag_queue_pairs(adapter, max_rss_queues);\n", "prefixes": [ "net-next", "RESEND" ] }