Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/741218/?format=api
{ "id": 741218, "url": "http://patchwork.ozlabs.org/api/patches/741218/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170320213859.13451.3294.stgit@localhost.localdomain/", "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": "<20170320213859.13451.3294.stgit@localhost.localdomain>", "list_archive_url": null, "date": "2017-03-20T21:43:02", "name": "[net] i40e: Do not enable NAPI on q_vectors that have no rings", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "084321fc321bf861955f6a53fc674927301f65d2", "submitter": { "id": 252, "url": "http://patchwork.ozlabs.org/api/people/252/?format=api", "name": "Alexander Duyck", "email": "alexander.duyck@gmail.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/20170320213859.13451.3294.stgit@localhost.localdomain/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/741218/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/741218/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\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 3vn8ZN6CKZz9s06\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 21 Mar 2017 08:43:08 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 2EE048795A;\n\tMon, 20 Mar 2017 21:43:07 +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 qFpEoQuo0wAT; Mon, 20 Mar 2017 21:43:06 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 5FBC1876A3;\n\tMon, 20 Mar 2017 21:43:06 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 79A991C0CF8\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 20 Mar 2017 21:43:04 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 7272587B72\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 20 Mar 2017 21:43:04 +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 TV775de3IMp8 for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 20 Mar 2017 21:43:03 +0000 (UTC)", "from mail-pg0-f67.google.com (mail-pg0-f67.google.com\n\t[74.125.83.67])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id DA4E087B55\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 20 Mar 2017 21:43:03 +0000 (UTC)", "by mail-pg0-f67.google.com with SMTP id b5so22075155pgg.1\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 20 Mar 2017 14:43:03 -0700 (PDT)", "from localhost.localdomain ([2001:470:b:9c3:9e5c:8eff:fe4f:f2d0])\n\tby smtp.gmail.com with ESMTPSA id\n\th71sm35032994pfj.65.2017.03.20.14.43.02\n\tfor <intel-wired-lan@lists.osuosl.org>\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 20 Mar 2017 14:43:02 -0700 (PDT)" ], "Authentication-Results": "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"mC7FFm3K\"; dkim-atps=neutral", "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=subject:from:to:date:message-id:user-agent:mime-version\n\t:content-transfer-encoding;\n\tbh=PCqxEM7jtSf7tseZQNrErojgsDgev4RsWF/Fau+n/xk=;\n\tb=mC7FFm3K35vhyGjM+uNIyNeaqG2qT8rLEOZTJGqqk0fN8qgtnixmZ3tiM6WJ6jVcGj\n\txbmnZh8gAbFuvS+XLOYTpmVUDLyijgEnIofUia+gOUreJnGprD3Y0JQVq3q97NrkTBSj\n\txaSYWGaoMpiRZkwpJH8StmOZiKx3UGQQaw/+9RsFkqdUa2P4omF5LcTtwpGVWEulV26M\n\tI9GpumHpLExMZT2FJcQbFwZxwEM7EuLTMSs0MgTClzMiiilN8bkCPO0mlFsWqpYWPjbF\n\t+Kokr0Wo4eG0Lt9ixgQ4c1dtujqaKlaXmq3maKA0343TFcvF5Qp8jXqguOKUtDAb/Nsi\n\tJNkw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:from:to:date:message-id:user-agent\n\t:mime-version:content-transfer-encoding;\n\tbh=PCqxEM7jtSf7tseZQNrErojgsDgev4RsWF/Fau+n/xk=;\n\tb=Njz7raUS3ElnMU8E9C8Y41OBxl2nhz0QM+73FfBFZ8Co+DKS5XrVEs6/PFOoek051m\n\txB3uzUfxRl/1R5gXGD2rdY0zwnF02xSf6TGjs0nlY9f2zVtiBmRmKu7vqPMq7c1KAoUl\n\tPbcGZAJ28KkVy7E7sFaLXNlAQk7/diHS43ZScAtkeMVj8yWVu0VxSQmAUW3uBLi5qu8W\n\tvvpDhXrpb/fOpD7Xn15XTHWrZWg6GaJ9mlMLXOF75dV9O0pX2SV1ZTgui+7bgqe5bUlo\n\tktAdl2tN2h0RZYt/5jUJKh5GmQPRcNDAiOuBU+braPINzQmnd+J4YQTfFWABZ+AQw++N\n\tmgDA==", "X-Gm-Message-State": "AFeK/H2J/4JDzsPr3ue0y4+ES4ju/PUsYqQ+6nlPx6G+Os8OD+mTNd1x1zZZH2ZnBHsaaA==", "X-Received": "by 10.84.128.100 with SMTP id 91mr42600137pla.94.1490046183323; \n\tMon, 20 Mar 2017 14:43:03 -0700 (PDT)", "From": "Alexander Duyck <alexander.duyck@gmail.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Mon, 20 Mar 2017 14:43:02 -0700", "Message-ID": "<20170320213859.13451.3294.stgit@localhost.localdomain>", "User-Agent": "StGit/0.17.1-dirty", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [net PATCH] i40e: Do not enable NAPI on q_vectors\n\tthat have no rings", "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>", "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: Alexander Duyck <alexander.h.duyck@intel.com>\n\nWhen testing the epoll w/ busy poll code I found that I could get into a\nstate where the i40e driver had q_vectors w/ active NAPI that had no rings.\nThis was resulting in a divide by zero error. To correct it I am updating\nthe driver code so that we only support NAPI on q_vectors that have 1 or\nmore rings allocated to them.\n\nSigned-off-by: Alexander Duyck <alexander.h.duyck@intel.com>\n---\n\nI am submitting this for net, not next-queue since this fixes an issue that\ncan result in a kernel panic using existing kernel interfaces.\n\nTesting Hints:\n\tI found the issue this fixes while using sockperf with busy poll.\n\tBasically all I did is run a test with sockperf in which busy\n\tpolling was running, stopped the test, changed the number of\n\tqueues via \"ethtool -L\" and the system generated a divide by 0\n\terror.\n\n drivers/net/ethernet/intel/i40e/i40e_main.c | 16 ++++++++++++----\n 1 file changed, 12 insertions(+), 4 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex 9df0d86812e7..1e12248a34ba 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -4440,8 +4440,12 @@ static void i40e_napi_enable_all(struct i40e_vsi *vsi)\n \tif (!vsi->netdev)\n \t\treturn;\n \n-\tfor (q_idx = 0; q_idx < vsi->num_q_vectors; q_idx++)\n-\t\tnapi_enable(&vsi->q_vectors[q_idx]->napi);\n+\tfor (q_idx = 0; q_idx < vsi->num_q_vectors; q_idx++) {\n+\t\tstruct i40e_q_vector *q_vector = vsi->q_vectors[q_idx];\n+\n+\t\tif (q_vector->rx.ring || q_vector->tx.ring)\n+\t\t\tnapi_enable(&q_vector->napi);\n+\t}\n }\n \n /**\n@@ -4455,8 +4459,12 @@ static void i40e_napi_disable_all(struct i40e_vsi *vsi)\n \tif (!vsi->netdev)\n \t\treturn;\n \n-\tfor (q_idx = 0; q_idx < vsi->num_q_vectors; q_idx++)\n-\t\tnapi_disable(&vsi->q_vectors[q_idx]->napi);\n+\tfor (q_idx = 0; q_idx < vsi->num_q_vectors; q_idx++) {\n+\t\tstruct i40e_q_vector *q_vector = vsi->q_vectors[q_idx];\n+\n+\t\tif (q_vector->rx.ring || q_vector->tx.ring)\n+\t\t\tnapi_disable(&q_vector->napi);\n+\t}\n }\n \n /**\n", "prefixes": [ "net" ] }