get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.1/patches/2229969/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2229969,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2229969/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260429014325.19136-1-tactii@gmail.com/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/1.1/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": ""
    },
    "msgid": "<20260429014325.19136-1-tactii@gmail.com>",
    "date": "2026-04-29T01:43:25",
    "name": "[iwl-next,v3] e1000e: Avoid DMA re-mapping on RX copybreak",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "6aa14f54ea05df34f90ee9c94dd18e130ba4e790",
    "submitter": {
        "id": 92679,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/92679/?format=api",
        "name": "Matt Vollrath",
        "email": "tactii@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260429014325.19136-1-tactii@gmail.com/mbox/",
    "series": [
        {
            "id": 501969,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/501969/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=501969",
            "date": "2026-04-29T01:43:25",
            "name": "[iwl-next,v3] e1000e: Avoid DMA re-mapping on RX copybreak",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/501969/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2229969/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2229969/checks/",
    "tags": {},
    "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@legolas.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256\n header.s=default header.b=40XhCO4R;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g50T76XFjz1yHv\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 11:43:55 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp1.osuosl.org (Postfix) with ESMTP id 21F4983E41;\n\tWed, 29 Apr 2026 01:43:54 +0000 (UTC)",
            "from smtp1.osuosl.org ([127.0.0.1])\n by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id EAoXHs74YthT; Wed, 29 Apr 2026 01:43:52 +0000 (UTC)",
            "from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp1.osuosl.org (Postfix) with ESMTP id 4EF5983E28;\n\tWed, 29 Apr 2026 01:43:52 +0000 (UTC)",
            "from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])\n by lists1.osuosl.org (Postfix) with ESMTP id 471D023D\n for <intel-wired-lan@lists.osuosl.org>; Wed, 29 Apr 2026 01:43:51 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp3.osuosl.org (Postfix) with ESMTP id 2BD206110B\n for <intel-wired-lan@lists.osuosl.org>; Wed, 29 Apr 2026 01:43:51 +0000 (UTC)",
            "from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id sbRgFpv12BbB for <intel-wired-lan@lists.osuosl.org>;\n Wed, 29 Apr 2026 01:43:50 +0000 (UTC)",
            "from mail-yw1-x112e.google.com (mail-yw1-x112e.google.com\n [IPv6:2607:f8b0:4864:20::112e])\n by smtp3.osuosl.org (Postfix) with ESMTPS id 2DBC36110A\n for <intel-wired-lan@osuosl.org>; Wed, 29 Apr 2026 01:43:49 +0000 (UTC)",
            "by mail-yw1-x112e.google.com with SMTP id\n 00721157ae682-79ea87af213so7069787b3.0\n for <intel-wired-lan@osuosl.org>; Tue, 28 Apr 2026 18:43:49 -0700 (PDT)",
            "from devobuntu.lan ([2600:6c5c:6b00:ba4:d1cd:6e75:6fa2:1ccf])\n by smtp.gmail.com with ESMTPSA id\n 956f58d0204a3-65bff52d232sm600268d50.9.2026.04.28.18.43.47\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 28 Apr 2026 18:43:47 -0700 (PDT)"
        ],
        "X-Virus-Scanned": [
            "amavis at osuosl.org",
            "amavis at osuosl.org"
        ],
        "X-Comment": "SPF check N/A for local connections - client-ip=140.211.166.142;\n helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=<UNKNOWN> ",
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 smtp1.osuosl.org 4EF5983E28",
            "OpenDKIM Filter v2.11.0 smtp3.osuosl.org 2DBC36110A"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1777427032;\n\tbh=rpU0cyQ60DgnqUIdzfSUqCTUqThzrhySmXUiZxabndk=;\n\th=From:To:Cc:Date:Subject:List-Id:List-Unsubscribe:List-Archive:\n\t List-Post:List-Help:List-Subscribe:From;\n\tb=40XhCO4RzbvadqfdIWy/kqCtWOQD9vwO3eOkMLgjAX55lxV84QkA/u77JFR9vAcZ4\n\t lZhr8qoW02kocDVM/1SzR3NWNj/sZpXR9k0t9v5amPFDkofnp5cRdIpQYwcZpdF+JP\n\t 4IkVBXOoPEPYul7upsIQ8tFOEz2y6b0liiB/+RUYnzvcJKbtNYcid2XbsWwiM75kPe\n\t +gvw+elR/1Tw0+ehgttQCc9zDXKFY4n3RoRl2eFoUEY7/BQuE3cxaRpG2TR2R+lFd/\n\t z79iA+5hA96QXNYpQUwutnUw5M97yDzSETD2FtGOrUHj/H8xqm/31EYARBpVoW3Y8A\n\t RNfTQ4iGRj/WA==",
        "Received-SPF": "Pass (mailfrom) identity=mailfrom;\n client-ip=2607:f8b0:4864:20::112e; helo=mail-yw1-x112e.google.com;\n envelope-from=tactii@gmail.com; receiver=<UNKNOWN>",
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp3.osuosl.org 2DBC36110A",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777427028; x=1778031828;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=rpU0cyQ60DgnqUIdzfSUqCTUqThzrhySmXUiZxabndk=;\n b=qDfkyXcNYF4kPrKeFUEyg+ToEvZg2yXxtOuYcQxMJhf47dQPU6q+3z6wGFCztK87dy\n IJ2ktKnU3l7Qx3ZxnrwTNhxC5sLF1cuhg2u/j+E4tbcIJmReGYklt3kCe3nW6kDj1CHD\n irf3Lu3FiGI70yB82tEDjLT06DkclYNnzZnMntUCS1h3V8TeErHN1nP0H8ujMvpiKlq5\n 1WN5MMViC+xFQ9jueDYD/e7afXB03ZgCVYpQbUQcZagb5Si2OQmTU6axUNfLQma6gFFX\n RHSv++lMc3mhObHLiudLjebta03bp1aA0qP/e/NbGvmDzZkkzvwpcRJf/mVzf+TAHNdA\n jj7w==",
        "X-Gm-Message-State": "AOJu0YxzmQHJcvKLf7HTEBQ0byNKngArY+ognVp+iK/2qywSw7NWw3av\n pOn1t64scGUUmXzAm7c13dXLsIUE/ZEqSf+CbOrfP6y77+/mGsxUGT1Ei3pIf6lMQR4=",
        "X-Gm-Gg": "AeBDiev/+GMXAb7xAoKg3DOqOf5DwbeMXSEhDEnhHUZuKqSdPv4O3XGpZHERxPqNyvV\n mq8H+bQkcC+SJyD2/KODcBkDKPx3fAA5nN1RU9le2x7e1FLr9gEm7ezVAXqih13GH6DvkIi4W4q\n VeYhyROz4cRQ2jLgqpiUTB7sbVW4zF/TfQMRcuDKXPF3nunDvjkOW3uOjwvFJA1pJ3dNYwRNpbD\n +w6FJ/H6IMqhToEjp0ejrVomFfS+dgDitQFeW3kJRoAduoGHhJlQXPCsOJfOnsIeOBc5hl6UUwx\n f3NtSs7Pwao2VGCNWoSIQopZXbC5Y1/YUPY9Ar67yBoty8hCENP08U2E6F/0a5P8kTvfZWoDGJF\n osSMEIIpNcuXNDEPyxlrHzFvb+zFnwUzZadsGFj0HcFBkNx7E8dwM71jXvSl1mYOgnQA3TwkMiI\n 00jt/j+qYg+CX7/2HyCStJoAkpW1btZtLWRjU=",
        "X-Received": "by 2002:a05:690e:1186:b0:654:3fca:3515 with SMTP id\n 956f58d0204a3-65bff419a5cmr851173d50.30.1777427028327;\n Tue, 28 Apr 2026 18:43:48 -0700 (PDT)",
        "From": "Matt Vollrath <tactii@gmail.com>",
        "To": "intel-wired-lan@osuosl.org",
        "Cc": "Matt Vollrath <tactii@gmail.com>,\n Aleksander Loktionov <aleksandr.loktionov@intel.com>,\n Paul Menzel <pmenzel@molgen.mpg.de>",
        "Date": "Tue, 28 Apr 2026 21:43:25 -0400",
        "Message-ID": "<20260429014325.19136-1-tactii@gmail.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Mailman-Original-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1777427028; x=1778031828; darn=osuosl.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=rpU0cyQ60DgnqUIdzfSUqCTUqThzrhySmXUiZxabndk=;\n b=ow5C2CevU6o6uS0XO7ofM7qTZkt1WeBl5A4rvQ0mpXldXrW/XPDrbPVUDnWHSbmg0o\n sdYOyoA2IpjJGv8iPahGco+281m3McpPPIcIKIiCmDFmal6HeIFL/n3T02nBaEeR8ezX\n WS/UAbUq/5RE0XwruqpPyWMbvnznChbj75IGjaboxUOliWF7kGJXO4alBCKqvwPzEzKy\n 8TnTeLuO2l0IARvsGQQccMwEuUqFzcZNgvutEcUgk029LjilY5ijkKc1XVskrrXh9F2k\n ZzuNM7qBMSzZILItn1JRFO5J4CuXjUzZnjijBApquQDfdfEREcZuqvjXdbYiiYy/LqbW\n r/+Q==",
        "X-Mailman-Original-Authentication-Results": [
            "smtp3.osuosl.org;\n dmarc=pass (p=none dis=none)\n header.from=gmail.com",
            "smtp3.osuosl.org;\n dkim=pass (2048-bit key,\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=ow5C2Cev"
        ],
        "Subject": "[Intel-wired-lan] [PATCH iwl-next v3] e1000e: Avoid DMA re-mapping\n on RX copybreak",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.30",
        "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>",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "This patch factors out DMA re-mapping for skbs which were recycled in\nthe RX path due to copybreak or errors. There is only one path out of\nthe e1000_clean_rx_irq() loop where the skb is consumed and DMA needs\nto be re-mapped, so don't unmap it before checking the conditions.\n\nThe buffer allocation loop is adjusted to not assume that DMA is\nunmapped, handling mapping errors gracefully.\n\nOn systems with IOMMU enabled, the cost of re-mapping DMA is greater\nthan the cost of copying data out of the ring buffer. When I use this\npatch and configure e1000e with copybreak=2048, my system with IOMMU\ncompletes RX roughly twice as fast under load.\n\nInformal performance comparisons were based on Asus Gryphon Z97 which\nincludes an I218-V and with a Xeon E3-1240 v3 in the socket. ktime_get()\nmeasurement was injected into e1000e_poll() wrapping the\nadapter->clean_rx() call. The total time spent in clean_rx() was divided\nby work_done to print the average time spent per buffer. iperf3 -R was\nused to saturate the RX path and awk was used for statistics. Control\nrevision was set to 7.1-rc1 because iwl-next hadn't been updated yet.\n\n  rev     | iommu | copybreak | samples | mean (ns) |   stdev\n  7.1-rc1 |   off |         0 |    4748 |    453.72 |  155.82\n  7.1-rc1 |   off |      2048 |    4743 |    554.83 |  103.67\n  7.1-rc1 |    on |         0 |    4751 |   1139.22 |  150.56\n* 7.1-rc1 |    on |      2048 |    4737 |   1267.02 |  184.62\n   +patch |   off |         0 |    4739 |    456.30 |  146.33\n   +patch |   off |      2048 |    4739 |    538.56 |  132.97\n   +patch |    on |         0 |    4769 |   1165.97 |  140.19\n*  +patch |    on |      2048 |    4745 |    562.25 |  171.80\n\nNo surprises here, IOMMU DMA ops are known to be expensive. For most\nusers the kernel default is iommu=on and driver default is\ncopybreak=256, so unless the workload is small packets, some tuning of\neither knob would be needed to see the full benefit of this change.\n\nThe kludge of unconditional unmapping has existed since this driver was\nintroduced in 2007[1], inherited from the e1000 driver which has since\nfactored it out[2]. IOMMU tech was new at the time.\n\n[1] Commit bc7f75fa9788 (\"[E1000E]: New pci-express e1000 driver (currently for ICH9 devices only)\")\n[2] Commit 2b294b18689c (\"e1000: perform copybreak ahead of DMA unmap\")\n\nAssisted-by: Claude:claude-4-7-opus\nSigned-off-by: Matt Vollrath <tactii@gmail.com>\n---\nv3:\n* refactor unmapping bypass, use goto instead of redundant branch\n* remove Aleksandr's sign-off due to logic change\n* benchmark details\n* cite historic commits\nv2:\n* proofread description with Aleksandr\n---\n drivers/net/ethernet/intel/e1000e/netdev.c | 32 ++++++++++++++--------\n 1 file changed, 21 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c\nindex 7ce0cc8ab8f4..62bf85c768d6 100644\n--- a/drivers/net/ethernet/intel/e1000e/netdev.c\n+++ b/drivers/net/ethernet/intel/e1000e/netdev.c\n@@ -663,6 +663,8 @@ static void e1000_alloc_rx_buffers(struct e1000_ring *rx_ring,\n \t\tskb = buffer_info->skb;\n \t\tif (skb) {\n \t\t\tskb_trim(skb, 0);\n+\t\t\tif (likely(buffer_info->dma))\n+\t\t\t\tgoto write_desc;\n \t\t\tgoto map_skb;\n \t\t}\n \n@@ -680,10 +682,12 @@ static void e1000_alloc_rx_buffers(struct e1000_ring *rx_ring,\n \t\t\t\t\t\t  DMA_FROM_DEVICE);\n \t\tif (dma_mapping_error(&pdev->dev, buffer_info->dma)) {\n \t\t\tdev_err(&pdev->dev, \"Rx DMA map failed\\n\");\n+\t\t\tbuffer_info->dma = 0;\n \t\t\tadapter->rx_dma_failed++;\n \t\t\tbreak;\n \t\t}\n \n+write_desc:\n \t\trx_desc = E1000_RX_DESC_EXT(*rx_ring, i);\n \t\trx_desc->read.buffer_addr = cpu_to_le64(buffer_info->dma);\n \n@@ -941,7 +945,6 @@ static bool e1000_clean_rx_irq(struct e1000_ring *rx_ring, int *work_done,\n \t\tdma_rmb();\t/* read descriptor and rx_buffer_info after status DD */\n \n \t\tskb = buffer_info->skb;\n-\t\tbuffer_info->skb = NULL;\n \n \t\tprefetch(skb->data - NET_IP_ALIGN);\n \n@@ -955,9 +958,6 @@ static bool e1000_clean_rx_irq(struct e1000_ring *rx_ring, int *work_done,\n \n \t\tcleaned = true;\n \t\tcleaned_count++;\n-\t\tdma_unmap_single(&pdev->dev, buffer_info->dma,\n-\t\t\t\t adapter->rx_buffer_len, DMA_FROM_DEVICE);\n-\t\tbuffer_info->dma = 0;\n \n \t\tlength = le16_to_cpu(rx_desc->wb.upper.length);\n \n@@ -973,8 +973,6 @@ static bool e1000_clean_rx_irq(struct e1000_ring *rx_ring, int *work_done,\n \t\tif (adapter->flags2 & FLAG2_IS_DISCARDING) {\n \t\t\t/* All receives must fit into a single buffer */\n \t\t\te_dbg(\"Receive packet consumed multiple buffers\\n\");\n-\t\t\t/* recycle */\n-\t\t\tbuffer_info->skb = skb;\n \t\t\tif (staterr & E1000_RXD_STAT_EOP)\n \t\t\t\tadapter->flags2 &= ~FLAG2_IS_DISCARDING;\n \t\t\tgoto next_desc;\n@@ -982,8 +980,6 @@ static bool e1000_clean_rx_irq(struct e1000_ring *rx_ring, int *work_done,\n \n \t\tif (unlikely((staterr & E1000_RXDEXT_ERR_FRAME_ERR_MASK) &&\n \t\t\t     !(netdev->features & NETIF_F_RXALL))) {\n-\t\t\t/* recycle */\n-\t\t\tbuffer_info->skb = skb;\n \t\t\tgoto next_desc;\n \t\t}\n \n@@ -1010,19 +1006,33 @@ static bool e1000_clean_rx_irq(struct e1000_ring *rx_ring, int *work_done,\n \t\t\tstruct sk_buff *new_skb =\n \t\t\t\tnapi_alloc_skb(&adapter->napi, length);\n \t\t\tif (new_skb) {\n+\t\t\t\tdma_sync_single_for_cpu(&pdev->dev,\n+\t\t\t\t\t\t\tbuffer_info->dma,\n+\t\t\t\t\t\t\tadapter->rx_buffer_len,\n+\t\t\t\t\t\t\tDMA_FROM_DEVICE);\n \t\t\t\tskb_copy_to_linear_data_offset(new_skb,\n \t\t\t\t\t\t\t       -NET_IP_ALIGN,\n \t\t\t\t\t\t\t       (skb->data -\n \t\t\t\t\t\t\t\tNET_IP_ALIGN),\n \t\t\t\t\t\t\t       (length +\n \t\t\t\t\t\t\t\tNET_IP_ALIGN));\n-\t\t\t\t/* save the skb in buffer_info as good */\n-\t\t\t\tbuffer_info->skb = skb;\n+\t\t\t\tdma_sync_single_for_device(&pdev->dev,\n+\t\t\t\t\t\t\t   buffer_info->dma,\n+\t\t\t\t\t\t\t   adapter->rx_buffer_len,\n+\t\t\t\t\t\t\t   DMA_FROM_DEVICE);\n \t\t\t\tskb = new_skb;\n+\t\t\t\tgoto copybreak_done;\n \t\t\t}\n \t\t\t/* else just continue with the old one */\n \t\t}\n-\t\t/* end copybreak code */\n+\n+\t\tbuffer_info->skb = NULL;\n+\t\tdma_unmap_single(&pdev->dev, buffer_info->dma,\n+\t\t\t\t adapter->rx_buffer_len,\n+\t\t\t\t DMA_FROM_DEVICE);\n+\t\tbuffer_info->dma = 0;\n+\n+copybreak_done:\n \t\tskb_put(skb, length);\n \n \t\t/* Receive Checksum Offload */\n",
    "prefixes": [
        "iwl-next",
        "v3"
    ]
}