Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/593064/?format=api
{ "id": 593064, "url": "http://patchwork.ozlabs.org/api/patches/593064/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20160307173003.5682.90872.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": "<20160307173003.5682.90872.stgit@localhost.localdomain>", "list_archive_url": null, "date": "2016-03-07T17:30:03", "name": "[2/5] i40e/i40evf: Add support for bulk free in Tx cleanup", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "afb6fbe9f17ac5813870d92dd3c88a85ae2e013f", "submitter": { "id": 67293, "url": "http://patchwork.ozlabs.org/api/people/67293/?format=api", "name": "Alexander Duyck", "email": "aduyck@mirantis.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/20160307173003.5682.90872.stgit@localhost.localdomain/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/593064/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/593064/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 hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ozlabs.org (Postfix) with ESMTP id 013911401B5\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 8 Mar 2016 04:30:09 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 4D1EE95CF7;\n\tMon, 7 Mar 2016 17:30:09 +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 4UdsoUK-yom7; Mon, 7 Mar 2016 17:30:08 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 82DFF95CA4;\n\tMon, 7 Mar 2016 17:30:08 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id D416A1C1677\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 7 Mar 2016 17:30:06 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id D0950A6271\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 7 Mar 2016 17:30:06 +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 OpB2aUYF3Aor for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 7 Mar 2016 17:30:04 +0000 (UTC)", "from mail-pa0-f48.google.com (mail-pa0-f48.google.com\n\t[209.85.220.48])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id E0A8B895C4\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 7 Mar 2016 17:30:04 +0000 (UTC)", "by mail-pa0-f48.google.com with SMTP id fl4so81806424pad.0\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 07 Mar 2016 09:30:04 -0800 (PST)", "from localhost.localdomain\n\t(static-50-53-29-36.bvtn.or.frontiernet.net. [50.53.29.36])\n\tby smtp.gmail.com with ESMTPSA id\n\ti9sm24697629pfi.95.2016.03.07.09.30.03\n\tfor <intel-wired-lan@lists.osuosl.org>\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 07 Mar 2016 09:30:04 -0800 (PST)" ], "Authentication-Results": "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=mirantis.com header.i=@mirantis.com\n\theader.b=bawQ06ta; dkim-atps=neutral", "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "from auto-whitelisted by SQLgrey-1.7.6", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=mirantis.com;\n\ts=google; \n\th=subject:from:to:date:message-id:in-reply-to:references:user-agent\n\t:mime-version:content-transfer-encoding;\n\tbh=ofWsPKIz5UHBtaKkFFg4y5dbqwcRiwHamYJLf/MQjbU=;\n\tb=bawQ06tarBp2R4rmU8JCWBgS8SYWkkPsL4X7FY2SlAATxdBG16yNWPjOvt24Itc+SL\n\tLSCLj8dZeJEboQRpHZ0rUmxt9ymSZrLfmgeKNBSR33xHhdmRF3/oix6S/dok8qNb0Qgi\n\tHfy64cdqfyELIeXRdBK9m2yv993YkZ3BWfUJ0=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:subject:from:to:date:message-id:in-reply-to\n\t:references:user-agent:mime-version:content-transfer-encoding;\n\tbh=ofWsPKIz5UHBtaKkFFg4y5dbqwcRiwHamYJLf/MQjbU=;\n\tb=bGyba+OtN2H5ELB8qDzVjC47ya11EMjAAcAqWZZN9vxctHMFGVrMDEKUZnFkjuPL7p\n\td1JEMSFfnYUtabrJv+aKRCjIy7hWU3bPsQRupkraJpWijsxEu5b7lUk2lQTujbp/hJcK\n\tBd9eP4VrH3HooJI0uXvBg+T3jphfVxgCWMKh9BABEETVE+vR4GX3XtczAVvE+pQ7hUiz\n\teXXl3H8y2CB0fmFziCF4WwGGEUg4+ULXexAH4je7jwhCsQKCGJRTOj1xgwIgdN6GRR3p\n\tTDaqHa+3AOBaL2q+IyiG7sjdUgkouGV5eK+XhSwhT1f4tcqMSEdIfG0LqOA+Acd+P+RZ\n\taFqw==", "X-Gm-Message-State": "AD7BkJIy3tlBrWsA1BjZ4abSBv172g6tI3VzmfaW4WrXpieeC0yc8Iv82XBfthQVI2K2VC+2", "X-Received": "by 10.66.251.65 with SMTP id zi1mr34891974pac.133.1457371804558; \n\tMon, 07 Mar 2016 09:30:04 -0800 (PST)", "From": "Alexander Duyck <aduyck@mirantis.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Mon, 07 Mar 2016 09:30:03 -0800", "Message-ID": "<20160307173003.5682.90872.stgit@localhost.localdomain>", "In-Reply-To": "<20160307172722.5682.38580.stgit@localhost.localdomain>", "References": "<20160307172722.5682.38580.stgit@localhost.localdomain>", "User-Agent": "StGit/0.17.1-dirty", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [PATCH 2/5] i40e/i40evf: Add support for bulk\n\tfree in Tx cleanup", "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": "This patch enables bulk Tx clean for skbs. In order to enable it we need\nto pass the napi_budget value as that is used to determine if we are truly\nrunning in NAPI mode or if we are simply calling the routine from netpoll\nwith a budget of 0. In order to avoid adding too many more variables I\nthought it best to pass the VSI directly in a fashion similar to what we do\non igb and ixgbe with the q_vector.\n\nSigned-off-by: Alexander Duyck <aduyck@mirantis.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_txrx.c | 20 +++++++++++---------\n drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 20 +++++++++++---------\n 2 files changed, 22 insertions(+), 18 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\nindex 8fb2a966d70e..01cff073f8db 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n@@ -636,19 +636,21 @@ u32 i40e_get_tx_pending(struct i40e_ring *ring, bool in_sw)\n \n /**\n * i40e_clean_tx_irq - Reclaim resources after transmit completes\n- * @tx_ring: tx ring to clean\n- * @budget: how many cleans we're allowed\n+ * @vsi: the VSI we care about\n+ * @tx_ring: Tx ring to clean\n+ * @napi_budget: Used to determine if we are in netpoll\n *\n * Returns true if there's any budget left (e.g. the clean is finished)\n **/\n-static bool i40e_clean_tx_irq(struct i40e_ring *tx_ring, int budget)\n+static bool i40e_clean_tx_irq(struct i40e_vsi *vsi,\n+\t\t\t struct i40e_ring *tx_ring, int napi_budget)\n {\n \tu16 i = tx_ring->next_to_clean;\n \tstruct i40e_tx_buffer *tx_buf;\n \tstruct i40e_tx_desc *tx_head;\n \tstruct i40e_tx_desc *tx_desc;\n-\tunsigned int total_packets = 0;\n-\tunsigned int total_bytes = 0;\n+\tunsigned int total_bytes = 0, total_packets = 0;\n+\tunsigned int budget = vsi->work_limit;\n \n \ttx_buf = &tx_ring->tx_bi[i];\n \ttx_desc = I40E_TX_DESC(tx_ring, i);\n@@ -678,7 +680,7 @@ static bool i40e_clean_tx_irq(struct i40e_ring *tx_ring, int budget)\n \t\ttotal_packets += tx_buf->gso_segs;\n \n \t\t/* free the skb */\n-\t\tdev_consume_skb_any(tx_buf->skb);\n+\t\tnapi_consume_skb(tx_buf->skb, napi_budget);\n \n \t\t/* unmap skb header data */\n \t\tdma_unmap_single(tx_ring->dev,\n@@ -749,7 +751,7 @@ static bool i40e_clean_tx_irq(struct i40e_ring *tx_ring, int budget)\n \n \t\tif (budget &&\n \t\t ((j / (WB_STRIDE + 1)) == 0) && (j != 0) &&\n-\t\t !test_bit(__I40E_DOWN, &tx_ring->vsi->state) &&\n+\t\t !test_bit(__I40E_DOWN, &vsi->state) &&\n \t\t (I40E_DESC_UNUSED(tx_ring) != tx_ring->count))\n \t\t\ttx_ring->arm_wb = true;\n \t}\n@@ -767,7 +769,7 @@ static bool i40e_clean_tx_irq(struct i40e_ring *tx_ring, int budget)\n \t\tsmp_mb();\n \t\tif (__netif_subqueue_stopped(tx_ring->netdev,\n \t\t\t\t\t tx_ring->queue_index) &&\n-\t\t !test_bit(__I40E_DOWN, &tx_ring->vsi->state)) {\n+\t\t !test_bit(__I40E_DOWN, &vsi->state)) {\n \t\t\tnetif_wake_subqueue(tx_ring->netdev,\n \t\t\t\t\t tx_ring->queue_index);\n \t\t\t++tx_ring->tx_stats.restart_queue;\n@@ -1975,7 +1977,7 @@ int i40e_napi_poll(struct napi_struct *napi, int budget)\n \t * budget and be more aggressive about cleaning up the Tx descriptors.\n \t */\n \ti40e_for_each_ring(ring, q_vector->tx) {\n-\t\tif (!i40e_clean_tx_irq(ring, vsi->work_limit)) {\n+\t\tif (!i40e_clean_tx_irq(vsi, ring, budget)) {\n \t\t\tclean_complete = false;\n \t\t\tcontinue;\n \t\t}\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c\nindex 839a6df62f72..9e911363c11b 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c\n@@ -155,19 +155,21 @@ u32 i40evf_get_tx_pending(struct i40e_ring *ring, bool in_sw)\n \n /**\n * i40e_clean_tx_irq - Reclaim resources after transmit completes\n- * @tx_ring: tx ring to clean\n- * @budget: how many cleans we're allowed\n+ * @vsi: the VSI we care about\n+ * @tx_ring: Tx ring to clean\n+ * @napi_budget: Used to determine if we are in netpoll\n *\n * Returns true if there's any budget left (e.g. the clean is finished)\n **/\n-static bool i40e_clean_tx_irq(struct i40e_ring *tx_ring, int budget)\n+static bool i40e_clean_tx_irq(struct i40e_vsi *vsi,\n+\t\t\t struct i40e_ring *tx_ring, int napi_budget)\n {\n \tu16 i = tx_ring->next_to_clean;\n \tstruct i40e_tx_buffer *tx_buf;\n \tstruct i40e_tx_desc *tx_head;\n \tstruct i40e_tx_desc *tx_desc;\n-\tunsigned int total_packets = 0;\n-\tunsigned int total_bytes = 0;\n+\tunsigned int total_bytes = 0, total_packets = 0;\n+\tunsigned int budget = vsi->work_limit;\n \n \ttx_buf = &tx_ring->tx_bi[i];\n \ttx_desc = I40E_TX_DESC(tx_ring, i);\n@@ -197,7 +199,7 @@ static bool i40e_clean_tx_irq(struct i40e_ring *tx_ring, int budget)\n \t\ttotal_packets += tx_buf->gso_segs;\n \n \t\t/* free the skb */\n-\t\tdev_kfree_skb_any(tx_buf->skb);\n+\t\tnapi_consume_skb(tx_buf->skb, napi_budget);\n \n \t\t/* unmap skb header data */\n \t\tdma_unmap_single(tx_ring->dev,\n@@ -267,7 +269,7 @@ static bool i40e_clean_tx_irq(struct i40e_ring *tx_ring, int budget)\n \n \t\tif (budget &&\n \t\t ((j / (WB_STRIDE + 1)) == 0) && (j > 0) &&\n-\t\t !test_bit(__I40E_DOWN, &tx_ring->vsi->state) &&\n+\t\t !test_bit(__I40E_DOWN, &vsi->state) &&\n \t\t (I40E_DESC_UNUSED(tx_ring) != tx_ring->count))\n \t\t\ttx_ring->arm_wb = true;\n \t}\n@@ -285,7 +287,7 @@ static bool i40e_clean_tx_irq(struct i40e_ring *tx_ring, int budget)\n \t\tsmp_mb();\n \t\tif (__netif_subqueue_stopped(tx_ring->netdev,\n \t\t\t\t\t tx_ring->queue_index) &&\n-\t\t !test_bit(__I40E_DOWN, &tx_ring->vsi->state)) {\n+\t\t !test_bit(__I40E_DOWN, &vsi->state)) {\n \t\t\tnetif_wake_subqueue(tx_ring->netdev,\n \t\t\t\t\t tx_ring->queue_index);\n \t\t\t++tx_ring->tx_stats.restart_queue;\n@@ -1411,7 +1413,7 @@ int i40evf_napi_poll(struct napi_struct *napi, int budget)\n \t * budget and be more aggressive about cleaning up the Tx descriptors.\n \t */\n \ti40e_for_each_ring(ring, q_vector->tx) {\n-\t\tif (!i40e_clean_tx_irq(ring, vsi->work_limit)) {\n+\t\tif (!i40e_clean_tx_irq(vsi, ring, budget)) {\n \t\t\tclean_complete = false;\n \t\t\tcontinue;\n \t\t}\n", "prefixes": [ "2/5" ] }