Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2228946/?format=api
{ "id": 2228946, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2228946/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260427141227.19965-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": "<20260427141227.19965-1-tactii@gmail.com>", "date": "2026-04-27T14:12:27", "name": "[iwl-next,v2] e1000e: Avoid DMA re-mapping on RX copybreak", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "925abec7778277e511725849121829ad66ca396b", "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/20260427141227.19965-1-tactii@gmail.com/mbox/", "series": [ { "id": 501658, "url": "http://patchwork.ozlabs.org/api/1.1/series/501658/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=501658", "date": "2026-04-27T14:12:27", "name": "[iwl-next,v2] e1000e: Avoid DMA re-mapping on RX copybreak", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/501658/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2228946/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2228946/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=F6j8DXX3;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])\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 4g45BG4Rqbz1yHv\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 00:12:54 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 05AB86F577;\n\tMon, 27 Apr 2026 14:12:52 +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 hF-pFwI4bthF; Mon, 27 Apr 2026 14:12:51 +0000 (UTC)", "from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 33A2D61ADC;\n\tMon, 27 Apr 2026 14:12:51 +0000 (UTC)", "from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n by lists1.osuosl.org (Postfix) with ESMTP id 7ECA31B8\n for <intel-wired-lan@lists.osuosl.org>; Mon, 27 Apr 2026 14:12:49 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by smtp4.osuosl.org (Postfix) with ESMTP id 64CE54571A\n for <intel-wired-lan@lists.osuosl.org>; Mon, 27 Apr 2026 14:12:49 +0000 (UTC)", "from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id FoBw9wYq0loy for <intel-wired-lan@lists.osuosl.org>;\n Mon, 27 Apr 2026 14:12:48 +0000 (UTC)", "from mail-dl1-x1231.google.com (mail-dl1-x1231.google.com\n [IPv6:2607:f8b0:4864:20::1231])\n by smtp4.osuosl.org (Postfix) with ESMTPS id B0B5C454B4\n for <intel-wired-lan@osuosl.org>; Mon, 27 Apr 2026 14:12:48 +0000 (UTC)", "by mail-dl1-x1231.google.com with SMTP id\n a92af1059eb24-12c637089ccso736588c88.1\n for <intel-wired-lan@osuosl.org>; Mon, 27 Apr 2026 07:12:48 -0700 (PDT)", "from devobuntu.lan ([2600:6c5c:6b00:ba4:9e82:4279:45e0:a728])\n by smtp.gmail.com with ESMTPSA id\n a92af1059eb24-12dc2dfad8csm18950484c88.3.2026.04.27.07.12.45\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 27 Apr 2026 07:12:46 -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 smtp3.osuosl.org 33A2D61ADC", "OpenDKIM Filter v2.11.0 smtp4.osuosl.org B0B5C454B4" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1777299171;\n\tbh=dOzEpumC4ADROaHbEK02rKBm85qRWWUWjKYJEPWKf0o=;\n\th=From:To:Cc:Date:Subject:List-Id:List-Unsubscribe:List-Archive:\n\t List-Post:List-Help:List-Subscribe:From;\n\tb=F6j8DXX3T3nYK64E0KTbiNBqFLSJVdcV2xUq1WuMlbz/u4h14GpR09FB35r47/8cQ\n\t i1RqCFY1z9/0s5e3XcwJVpOoOZXmlP5yulVhi4fntmzBhMjMx0Yq6w8ETkxy93tJ0D\n\t OJ3g33SDn8G6R4JIjk5dp/cIk8HSj9sbRNUh0PbqwAat8jaEttXpt35e2E1Qs5EevO\n\t 2sE/o7QSyI6yeihX10UdZ0dv0EB6Z1DiL2nkpTm2w7LrUPflm5IR+/zH2zGTJzh0hJ\n\t V7y9RDrNBNq0jeUsc9VPB1qi67/rthnVg/sb7nMCDr7wChDHvekBkinF+0L43/LyHt\n\t ZBfqUdaNQQyGg==", "Received-SPF": "Pass (mailfrom) identity=mailfrom;\n client-ip=2607:f8b0:4864:20::1231; helo=mail-dl1-x1231.google.com;\n envelope-from=tactii@gmail.com; receiver=<UNKNOWN>", "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp4.osuosl.org B0B5C454B4", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777299167; x=1777903967;\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=dOzEpumC4ADROaHbEK02rKBm85qRWWUWjKYJEPWKf0o=;\n b=iVwEcYC51JtTiEWSQyXzAhgQw6V+AAzQdASb7XSn9hnK4zAoSrD/6gBR8f4sNgMmBs\n x4xyc6+NHTgQEK+MlZefEWVPRMEL2cSTEdBJx2sMehbrzzn4Bjcp2lcnkY6BUPFAQ1UE\n NSVoRXkrBv6Ro5clN7+eRp7aS22awMN6w+gSR6V0JF2o5zDrTJGVQhrHs0AsuQF2G3/N\n QKFQR/npd3GO24QLFa1m96K/UGox5RHqqCT6pqOSbsojQgYdLiQMFA5JCa+c189p6ZuA\n h2S8nZ4I3Cr8b/7uv9R9cpmXBRWqe/jtla/hvuZ8Tk7UzVjc1CRsNDLa/gs0nlN+OMrY\n JZ6g==", "X-Gm-Message-State": "AOJu0YziudigfJORwBlRJtj1ezEF//1A66YD9pLY+WSEO2ObCr37KyE2\n JimHOxYYr1y3RYat70oCVk6+Klm2skJvE0KwNtnk5bAFiB+8xZK7YGwH+cqSccP4", "X-Gm-Gg": "AeBDiev+KznaA6k4Ja9stShEhe123ya5w637qXAtDAk0mGv/S1K9dT+nNubEUqfQQ5Q\n 9WiqQ/v8d2AW+4QotKnwRkCG0GD8fbjRrcoF+gTMqFaa1QASU89EIY3mwU02WqhFD5fxeVwqoQy\n osIT6OEBCiyE87SYzsoGtbbECC/tzHuv57OtbmZbBmmSUzbrBhodUAs4WiZWhIEAR5HUyYljrwT\n 7OHPXSd8WsG00cwjIADPByWryVap4H/lY/0l7Vvhg3IFH8EridGY4uERGJhNzE7vMZF/A+mX+VN\n Ys1gznvHgPskL5c24tJnkE28Nm39qXgdjr67xFqTvEXi7wNIrqiHcW8EVknMtQl9tjoOeBkKS6I\n 22dSPXqrmkAql37NprTEkF7S0NPb4QA3zvKFIlrN52TynVvggdHZUQqQpRcIhe0WZjd+W45amCF\n yt6+ThccfexeAlsGDu37PVv/4cyoDZl1ZzS6w=", "X-Received": "by 2002:a05:7022:6627:b0:11b:f056:a19b with SMTP id\n a92af1059eb24-12c73f930c1mr24901971c88.18.1777299166693;\n Mon, 27 Apr 2026 07:12:46 -0700 (PDT)", "From": "Matt Vollrath <tactii@gmail.com>", "To": "intel-wired-lan@osuosl.org", "Cc": "Matt Vollrath <tactii@gmail.com>,\n Aleksandr Loktionov <aleksandr.loktionov@intel.com>", "Date": "Mon, 27 Apr 2026 10:12:27 -0400", "Message-ID": "<20260427141227.19965-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=1777299167; x=1777903967; 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=dOzEpumC4ADROaHbEK02rKBm85qRWWUWjKYJEPWKf0o=;\n b=dPrsK/27340/zfI8Ks/d5veVOSDfP0QVUCbR2oPlR/1dRKzGLssmuOoNmKUzP9npWl\n 9swiAXtc1MILcQ3YUf1JIUksoFVKJbTOoJpoPK0rOknloqRwLHzrMXflsyNBuMWZH2D1\n 3ZVDr1wrahELOGwaj8kPGjfixDfu/jBydxIL7FwgnrO0QuUr9wjWXR/XggjpEDnzXLom\n fpza/t3RBq2oCYbbbi9HkrYLc6NtvsfHExL1pAiYEwuO4Vo60gQQyQh1bfVxYtd5STlN\n L5cShL52YuHUE3bW6cl4+b9tVJg9D8edoIsvxyNCsQ42a23caiA+N8Fs57oXoBWEdtNl\n t7vw==", "X-Mailman-Original-Authentication-Results": [ "smtp4.osuosl.org;\n dmarc=pass (p=none dis=none)\n header.from=gmail.com", "smtp4.osuosl.org;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.a=rsa-sha256 header.s=20251104 header.b=dPrsK/27" ], "Subject": "[Intel-wired-lan] [PATCH iwl-next v2] 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 twice as fast under load.\n\nThe kludge of unconditional unmapping has existed since this driver was\nintroduced in 2007, inherited from the e1000 driver which has since\nfactored it out. IOMMU tech was new at the time.\n\nTested on an I218-V.\n\nAssisted-by: Claude:claude-4-7-opus\nSigned-off-by: Matt Vollrath <tactii@gmail.com>\nSigned-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>\n---\nv2:\n* proofread description with Aleksandr\n---\n drivers/net/ethernet/intel/e1000e/netdev.c | 34 +++++++++++++++-------\n 1 file changed, 23 insertions(+), 11 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c\nindex 9befdacd6730..b1d6119171df 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,35 @@ 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}\n \t\t\t/* else just continue with the old one */\n \t\t}\n-\t\t/* end copybreak code */\n+\n+\t\t/* If skb was not replaced by copybreak, we are consuming\n+\t\t * the original buffer and must release the DMA mapping.\n+\t\t */\n+\t\tif (skb == buffer_info->skb) {\n+\t\t\tbuffer_info->skb = NULL;\n+\t\t\tdma_unmap_single(&pdev->dev, buffer_info->dma,\n+\t\t\t\t\t adapter->rx_buffer_len,\n+\t\t\t\t\t DMA_FROM_DEVICE);\n+\t\t\tbuffer_info->dma = 0;\n+\t\t}\n \t\tskb_put(skb, length);\n \n \t\t/* Receive Checksum Offload */\n", "prefixes": [ "iwl-next", "v2" ] }