Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/538024/?format=api
{ "id": 538024, "url": "http://patchwork.ozlabs.org/api/patches/538024/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1446151420-6632-1-git-send-email-jacob.e.keller@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": "<1446151420-6632-1-git-send-email-jacob.e.keller@intel.com>", "list_archive_url": null, "date": "2015-10-29T20:43:40", "name": "[next-queue,v2] fm10k: initialize xps at driver load", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "1d13158758f98c9d5c8afd7ea476d09fa10d4fc3", "submitter": { "id": 9784, "url": "http://patchwork.ozlabs.org/api/people/9784/?format=api", "name": "Jacob Keller", "email": "jacob.e.keller@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/1446151420-6632-1-git-send-email-jacob.e.keller@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/538024/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/538024/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 whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ozlabs.org (Postfix) with ESMTP id 3AA5A141387\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 30 Oct 2015 07:43:46 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 2F16491207;\n\tThu, 29 Oct 2015 20:43:46 +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 x+PX2nkLzvTa; Thu, 29 Oct 2015 20:43:44 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 841349120E;\n\tThu, 29 Oct 2015 20:43:44 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 73D691C0110\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 29 Oct 2015 20:43:43 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 6E068A3F26\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 29 Oct 2015 20:43:43 +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 PqwVK0iYVXal for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 29 Oct 2015 20:43:42 +0000 (UTC)", "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 9490FA3F24\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 29 Oct 2015 20:43:42 +0000 (UTC)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga103.fm.intel.com with ESMTP; 29 Oct 2015 13:43:43 -0700", "from jekeller-desk.amr.corp.intel.com ([134.134.3.123])\n\tby fmsmga001.fm.intel.com with ESMTP; 29 Oct 2015 13:43:43 -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.20,216,1444719600\"; d=\"scan'208\";a=\"822609198\"", "From": "Jacob Keller <jacob.e.keller@intel.com>", "To": "Intel Wired LAN <intel-wired-lan@lists.osuosl.org>", "Date": "Thu, 29 Oct 2015 13:43:40 -0700", "Message-Id": "<1446151420-6632-1-git-send-email-jacob.e.keller@intel.com>", "X-Mailer": "git-send-email 2.6.1.264.gbab76a9", "Subject": "[Intel-wired-lan] [next-queue v2] fm10k: initialize xps at driver\n\tload", "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": "Similar to ixgbe and i40e, initialize XPS on driver load so that we can\ntake advantage of this kernel feature.\n\nSigned-off-by: Jacob Keller <jacob.e.keller@intel.com>\n---\n\n- v2\n* Fix patch application issue\n* Put xps initialization on Tx queues (instead of Rx)\n\nThis patch replaces the previous version currently on the queue, in\nplace.\n\n drivers/net/ethernet/intel/fm10k/fm10k.h | 3 +++\n drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 18 ++++++++++++++++--\n 2 files changed, 19 insertions(+), 2 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/fm10k/fm10k.h b/drivers/net/ethernet/intel/fm10k/fm10k.h\nindex 2920de42441b..5458feefdd55 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k.h\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k.h\n@@ -23,6 +23,7 @@\n \n #include <linux/types.h>\n #include <linux/etherdevice.h>\n+#include <linux/cpumask.h>\n #include <linux/rtnetlink.h>\n #include <linux/if_vlan.h>\n #include <linux/pci.h>\n@@ -66,6 +67,7 @@ struct fm10k_l2_accel {\n enum fm10k_ring_state_t {\n \t__FM10K_TX_DETECT_HANG,\n \t__FM10K_HANG_CHECK_ARMED,\n+\t__FM10K_TX_XPS_INIT_DONE,\n };\n \n #define check_for_tx_hang(ring) \\\n@@ -209,6 +211,7 @@ struct fm10k_q_vector {\n \tstruct fm10k_ring_container rx, tx;\n \n \tstruct napi_struct napi;\n+\tcpumask_t affinity_mask;\n \tchar name[IFNAMSIZ + 9];\n \n #ifdef CONFIG_DEBUG_FS\ndiff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c\nindex 15d8e10c2504..d849e83fdafb 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c\n@@ -600,6 +600,13 @@ static void fm10k_configure_tx_ring(struct fm10k_intfc *interface,\n \tfm10k_write_reg(hw, FM10K_PFVTCTL(reg_idx),\n \t\t\tFM10K_PFVTCTL_FTAG_DESC_ENABLE);\n \n+\t/* Initialize XPS */\n+\tif (!test_and_set_bit(__FM10K_TX_XPS_INIT_DONE, &ring->state) &&\n+\t ring->q_vector)\n+\t\tnetif_set_xps_queue(ring->netdev,\n+\t\t\t\t &ring->q_vector->affinity_mask,\n+\t\t\t\t ring->queue_index);\n+\n \t/* enable queue */\n \tfm10k_write_reg(hw, FM10K_TXDCTL(reg_idx), txdctl);\n }\n@@ -1478,8 +1485,10 @@ void fm10k_qv_free_irq(struct fm10k_intfc *interface)\n \t\tif (!q_vector->tx.count && !q_vector->rx.count)\n \t\t\tcontinue;\n \n-\t\t/* disable interrupts */\n+\t\t/* clear the affinity_mask in the IRQ descriptor */\n+\t\tirq_set_affinity_hint(entry->vector, NULL);\n \n+\t\t/* disable interrupts */\n \t\twritel(FM10K_ITR_MASK_SET, q_vector->itr);\n \n \t\tfree_irq(entry->vector, q_vector);\n@@ -1537,6 +1546,9 @@ int fm10k_qv_request_irq(struct fm10k_intfc *interface)\n \t\t\tgoto err_out;\n \t\t}\n \n+\t\t/* assign the mask for this irq */\n+\t\tirq_set_affinity_hint(entry->vector, &q_vector->affinity_mask);\n+\n \t\t/* Enable q_vector */\n \t\twritel(FM10K_ITR_ENABLE, q_vector->itr);\n \n@@ -1557,8 +1569,10 @@ int fm10k_qv_request_irq(struct fm10k_intfc *interface)\n \t\tif (!q_vector->tx.count && !q_vector->rx.count)\n \t\t\tcontinue;\n \n-\t\t/* disable interrupts */\n+\t\t/* clear the affinity_mask in the IRQ descriptor */\n+\t\tirq_set_affinity_hint(entry->vector, NULL);\n \n+\t\t/* disable interrupts */\n \t\twritel(FM10K_ITR_MASK_SET, q_vector->itr);\n \n \t\tfree_irq(entry->vector, q_vector);\n", "prefixes": [ "next-queue", "v2" ] }