Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1315041/?format=api
{ "id": 1315041, "url": "http://patchwork.ozlabs.org/api/patches/1315041/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1592905458-850-3-git-send-email-magnus.karlsson@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": "<1592905458-850-3-git-send-email-magnus.karlsson@intel.com>", "list_archive_url": null, "date": "2020-06-23T09:44:17", "name": "[net-next,v2,2/3] i40e: eliminate division in napi_poll data path", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "b7f6420a12aaf82819dcbff0829e7b0e7986ab8d", "submitter": { "id": 72726, "url": "http://patchwork.ozlabs.org/api/people/72726/?format=api", "name": "Magnus Karlsson", "email": "magnus.karlsson@intel.com" }, "delegate": { "id": 109701, "url": "http://patchwork.ozlabs.org/api/users/109701/?format=api", "username": "anguy11", "first_name": "Anthony", "last_name": "Nguyen", "email": "anthony.l.nguyen@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1592905458-850-3-git-send-email-magnus.karlsson@intel.com/mbox/", "series": [ { "id": 185220, "url": "http://patchwork.ozlabs.org/api/series/185220/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=185220", "date": "2020-06-23T09:44:15", "name": "i40e: improve AF_XDP performance", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/185220/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1315041/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1315041/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 spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=140.211.166.133; helo=hemlock.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=<UNKNOWN>)", "ozlabs.org;\n dmarc=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 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 49rhFf1fTQz9sSF\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 23 Jun 2020 19:44:37 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 6D4B5891C1;\n\tTue, 23 Jun 2020 09:44:36 +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 bgLyVozQN0B2; Tue, 23 Jun 2020 09:44:35 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id BB20988FB0;\n\tTue, 23 Jun 2020 09:44:35 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n by ash.osuosl.org (Postfix) with ESMTP id 333A61BF294\n for <intel-wired-lan@lists.osuosl.org>; Tue, 23 Jun 2020 09:44:35 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by hemlock.osuosl.org (Postfix) with ESMTP id 2FA0E88FB0\n for <intel-wired-lan@lists.osuosl.org>; Tue, 23 Jun 2020 09:44:35 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id Ok-jPjGUihMT for <intel-wired-lan@lists.osuosl.org>;\n Tue, 23 Jun 2020 09:44:34 +0000 (UTC)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by hemlock.osuosl.org (Postfix) with ESMTPS id 785B088D67\n for <intel-wired-lan@lists.osuosl.org>; Tue, 23 Jun 2020 09:44:34 +0000 (UTC)", "from orsmga004.jf.intel.com ([10.7.209.38])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 23 Jun 2020 02:44:34 -0700", "from mkarlsso-mobl.ger.corp.intel.com (HELO localhost.localdomain)\n ([10.252.33.84])\n by orsmga004.jf.intel.com with ESMTP; 23 Jun 2020 02:44:30 -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": [ "\n yKTYFq7p5PDcX+m++sORbSCOifixEBoSMP8B4IFyGn4NdMJ316wZNjcp6zP1wvh9EqyOFMQHvV\n 0YiMenRx/oXw==", "\n Hn3V9jwFxsC9L7pT1RhUnHTCDnUajfh6LvDV2Ea9msK4hJWHWKDam+g2dYaBHcAzbQFVht4DF9\n 1Vt0/RWP9X0w==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9660\"; a=\"162099563\"", "E=Sophos;i=\"5.75,270,1589266800\"; d=\"scan'208\";a=\"162099563\"", "E=Sophos;i=\"5.75,270,1589266800\"; d=\"scan'208\";a=\"422947150\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "Magnus Karlsson <magnus.karlsson@intel.com>", "To": "magnus.karlsson@intel.com, bjorn.topel@intel.com,\n intel-wired-lan@lists.osuosl.org, jeffrey.t.kirsher@intel.com,\n sridhar.samudrala@intel.com", "Date": "Tue, 23 Jun 2020 11:44:17 +0200", "Message-Id": "<1592905458-850-3-git-send-email-magnus.karlsson@intel.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1592905458-850-1-git-send-email-magnus.karlsson@intel.com>", "References": "<1592905458-850-1-git-send-email-magnus.karlsson@intel.com>", "Subject": "[Intel-wired-lan] [PATCH net-next v2 2/3] i40e: eliminate division\n in napi_poll data path", "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 <intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <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 <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "Cc": "maciejromanfijalkowski@gmail.com, maciej.fijalkowski@intel.com,\n netdev@vger.kernel.org", "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": "Eliminate a division in the napi_poll data path. This division is\nexecuted even though it is only needed in the rare case when there are\nnot enough interrupt lines so they have to be shared between queue\npairs. Instead, just test for this case and only execute the division\nif needed. The code has been lifted from the ice driver.\n\nSigned-off-by: Magnus Karlsson <magnus.karlsson@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_txrx.c | 14 ++++++++++----\n 1 file changed, 10 insertions(+), 4 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\nindex 9334abd..60fa102 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n@@ -2595,10 +2595,16 @@ int i40e_napi_poll(struct napi_struct *napi, int budget)\n \tif (budget <= 0)\n \t\tgoto tx_only;\n \n-\t/* We attempt to distribute budget to each Rx queue fairly, but don't\n-\t * allow the budget to go below 1 because that would exit polling early.\n-\t */\n-\tbudget_per_ring = max(budget/q_vector->num_ringpairs, 1);\n+\t/* normally we have 1 Rx ring per q_vector */\n+\tif (unlikely(q_vector->num_ringpairs > 1))\n+\t\t/* We attempt to distribute budget to each Rx queue fairly, but\n+\t\t * don't allow the budget to go below 1 because that would exit\n+\t\t * polling early.\n+\t\t */\n+\t\tbudget_per_ring = max_t(int, budget / q_vector->num_ringpairs, 1);\n+\telse\n+\t\t/* Max of 1 Rx ring in this q_vector so give it the budget */\n+\t\tbudget_per_ring = budget;\n \n \ti40e_for_each_ring(ring, q_vector->rx) {\n \t\tint cleaned = ring->xsk_umem ?\n", "prefixes": [ "net-next", "v2", "2/3" ] }