Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/806071/?format=api
{ "id": 806071, "url": "http://patchwork.ozlabs.org/api/patches/806071/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170826011424.27251-1-f.fainelli@gmail.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": "<20170826011424.27251-1-f.fainelli@gmail.com>", "list_archive_url": null, "date": "2017-08-26T01:14:24", "name": "[net-next,v3] e1000e: Be drop monitor friendly", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "55096847d2296a1c766833733afc19ebf52b02e0", "submitter": { "id": 2800, "url": "http://patchwork.ozlabs.org/api/people/2800/?format=api", "name": "Florian Fainelli", "email": "f.fainelli@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/20170826011424.27251-1-f.fainelli@gmail.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/806071/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/806071/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.136; helo=silver.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "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=\"MznHpk5o\"; dkim-atps=neutral" ], "Received": [ "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\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 3xfLD03GdJz9t4c\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 26 Aug 2017 11:34:06 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 0772A30E21;\n\tSat, 26 Aug 2017 01:34:05 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id tk8W+WTyo0As; Sat, 26 Aug 2017 01:34:02 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id A34B930E37;\n\tSat, 26 Aug 2017 01:34:02 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 2FE2D1C3F9A\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tSat, 26 Aug 2017 01:34:01 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 25D1C89A63\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tSat, 26 Aug 2017 01:34:01 +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 AJDTDzG8jjnm for <intel-wired-lan@lists.osuosl.org>;\n\tSat, 26 Aug 2017 01:34:00 +0000 (UTC)", "from mail-wr0-f194.google.com (mail-wr0-f194.google.com\n\t[209.85.128.194])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 55D7889A5E\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tSat, 26 Aug 2017 01:34:00 +0000 (UTC)", "by mail-wr0-f194.google.com with SMTP id p14so745410wrg.4\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 25 Aug 2017 18:34:00 -0700 (PDT)", "from fainelli-desktop.broadcom.com ([192.19.255.250])\n\tby smtp.gmail.com with ESMTPSA id\n\tf79sm3604809wmd.19.2017.08.25.18.33.56\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 25 Aug 2017 18:33:57 -0700 (PDT)" ], "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=from:to:cc:subject:date:message-id;\n\tbh=rEUeqF0XgbVPoPzqHVCE8Gln41K9T3Q71dMP59FLXbA=;\n\tb=MznHpk5om7d6/cJqomaY1PZ/5PxatIH4fwhb5mJqKQX1k4QwhDJg6bZiUBhGS0u7pE\n\tbJ46btrczQCdxV7A4Tv8LcpMkSDyoH/dw+JtdNuL9Wkn8fbRTnrBiVVREfHwxVnoJvug\n\twF/GrulUHPvsWj5s2Q20qWXm4Vr1KXTF93Yp8T6zVtATGmyBi5v1rRAumpWvlnyZSoSp\n\t6ZH+wb8kKHCo6N5mRC7+opb4Bp3tSCl2qbBVEUOiBtHJj/GmNQTzszDlVq5Au4o06wTQ\n\t2CYQa6vUq/if8yUabkgfBMOyPqjgWsdIw43L2h/TF+9IgYM3oHpncmymVaoThkRWrMSf\n\tUFhw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=rEUeqF0XgbVPoPzqHVCE8Gln41K9T3Q71dMP59FLXbA=;\n\tb=WXp4TJDnK6tCv+Kd11DP9I7NPRk9KAJMxGeY3Iftp3e27TsZIv6up3FTIUw2GsEOiI\n\tppyGG2x94YhNEBLyhAQsaMlDSCuJmSD1mBfwyTpdaXTjFZ8Lsbsa14qSLHQvvWyuC0XW\n\tyL5bZ7/4Wv3X89Dti0bkd+G86OXgU3Q/mkxlilLfLNpMhw/7vr/cPh2aJf35NFWvFInO\n\tqgJCr4KwW9u2Q7+7itaxgZ7RNMQBoxzgehqBtzfA9lGvmolZ+RvxkuzHta/Lsk3Le4uV\n\tXdoHKZmdZds5hWDh2RRKy0E37VNkvgokgueYPFwgMmti4ftFxvQkFZnXQe6qoM3xqlvw\n\tq5uQ==", "X-Gm-Message-State": "AHYfb5jPW018D3ZIL6Yu8hCieiUFni47UKxJcpzGVdefpWozJlvau1V6\n\tble6AIzUVqYT+Q==", "X-Received": "by 10.223.176.243 with SMTP id j48mr151108wra.101.1503711238622; \n\tFri, 25 Aug 2017 18:33:58 -0700 (PDT)", "From": "Florian Fainelli <f.fainelli@gmail.com>", "To": "netdev@vger.kernel.org", "Date": "Fri, 25 Aug 2017 18:14:24 -0700", "Message-Id": "<20170826011424.27251-1-f.fainelli@gmail.com>", "X-Mailer": "git-send-email 2.9.3", "Cc": "edumazet@gmail.com, Florian Fainelli <f.fainelli@gmail.com>,\n\topen list <linux-kernel@vger.kernel.org>,\n\t\"moderated list:INTEL ETHERNET DRIVERS\"\n\t<intel-wired-lan@lists.osuosl.org>, davem@davemloft.net", "Subject": "[Intel-wired-lan] [PATCH net-next v3] e1000e: Be drop monitor\n\tfriendly", "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": "e1000e_put_txbuf() can be called from normal reclamation path as well as\nwhen a DMA mapping failure, so we need to differentiate these two cases\nwhen freeing SKBs to be drop monitor friendly. e1000e_tx_hwtstamp_work()\nand e1000_remove() are processing TX timestamped SKBs and those should\nnot be accounted as drops either.\n\nSigned-off-by: Florian Fainelli <f.fainelli@gmail.com>\n---\nChanges in v3:\n\n- differentiate normal reclamation from TX DMA fragment mapping errors\n- removed a few invalid dev_kfree_skb() replacements (those are already\n drop monitor friendly)\n\nChanges in v2:\n\n- make it compile\n\n drivers/net/ethernet/intel/e1000e/netdev.c | 18 +++++++++++-------\n 1 file changed, 11 insertions(+), 7 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c\nindex 327dfe5bedc0..cfd21858c095 100644\n--- a/drivers/net/ethernet/intel/e1000e/netdev.c\n+++ b/drivers/net/ethernet/intel/e1000e/netdev.c\n@@ -1071,7 +1071,8 @@ static bool e1000_clean_rx_irq(struct e1000_ring *rx_ring, int *work_done,\n }\n \n static void e1000_put_txbuf(struct e1000_ring *tx_ring,\n-\t\t\t struct e1000_buffer *buffer_info)\n+\t\t\t struct e1000_buffer *buffer_info,\n+\t\t\t bool drop)\n {\n \tstruct e1000_adapter *adapter = tx_ring->adapter;\n \n@@ -1085,7 +1086,10 @@ static void e1000_put_txbuf(struct e1000_ring *tx_ring,\n \t\tbuffer_info->dma = 0;\n \t}\n \tif (buffer_info->skb) {\n-\t\tdev_kfree_skb_any(buffer_info->skb);\n+\t\tif (drop)\n+\t\t\tdev_kfree_skb_any(buffer_info->skb);\n+\t\telse\n+\t\t\tdev_consume_skb_any(buffer_info->skb);\n \t\tbuffer_info->skb = NULL;\n \t}\n \tbuffer_info->time_stamp = 0;\n@@ -1199,7 +1203,7 @@ static void e1000e_tx_hwtstamp_work(struct work_struct *work)\n \t\twmb(); /* force write prior to skb_tstamp_tx */\n \n \t\tskb_tstamp_tx(skb, &shhwtstamps);\n-\t\tdev_kfree_skb_any(skb);\n+\t\tdev_consume_skb_any(skb);\n \t} else if (time_after(jiffies, adapter->tx_hwtstamp_start\n \t\t\t + adapter->tx_timeout_factor * HZ)) {\n \t\tdev_kfree_skb_any(adapter->tx_hwtstamp_skb);\n@@ -1254,7 +1258,7 @@ static bool e1000_clean_tx_irq(struct e1000_ring *tx_ring)\n \t\t\t\t}\n \t\t\t}\n \n-\t\t\te1000_put_txbuf(tx_ring, buffer_info);\n+\t\t\te1000_put_txbuf(tx_ring, buffer_info, false);\n \t\t\ttx_desc->upper.data = 0;\n \n \t\t\ti++;\n@@ -2421,7 +2425,7 @@ static void e1000_clean_tx_ring(struct e1000_ring *tx_ring)\n \n \tfor (i = 0; i < tx_ring->count; i++) {\n \t\tbuffer_info = &tx_ring->buffer_info[i];\n-\t\te1000_put_txbuf(tx_ring, buffer_info);\n+\t\te1000_put_txbuf(tx_ring, buffer_info, false);\n \t}\n \n \tnetdev_reset_queue(adapter->netdev);\n@@ -5614,7 +5618,7 @@ static int e1000_tx_map(struct e1000_ring *tx_ring, struct sk_buff *skb,\n \t\t\ti += tx_ring->count;\n \t\ti--;\n \t\tbuffer_info = &tx_ring->buffer_info[i];\n-\t\te1000_put_txbuf(tx_ring, buffer_info);\n+\t\te1000_put_txbuf(tx_ring, buffer_info, true);\n \t}\n \n \treturn 0;\n@@ -7411,7 +7415,7 @@ static void e1000_remove(struct pci_dev *pdev)\n \tif (adapter->flags & FLAG_HAS_HW_TIMESTAMP) {\n \t\tcancel_work_sync(&adapter->tx_hwtstamp_work);\n \t\tif (adapter->tx_hwtstamp_skb) {\n-\t\t\tdev_kfree_skb_any(adapter->tx_hwtstamp_skb);\n+\t\t\tdev_consume_skb_any(adapter->tx_hwtstamp_skb);\n \t\t\tadapter->tx_hwtstamp_skb = NULL;\n \t\t}\n \t}\n", "prefixes": [ "net-next", "v3" ] }