get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2216808,
    "url": "http://patchwork.ozlabs.org/api/patches/2216808/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260327073046.134085-3-aleksandr.loktionov@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": "<20260327073046.134085-3-aleksandr.loktionov@intel.com>",
    "list_archive_url": null,
    "date": "2026-03-27T07:30:37",
    "name": "[iwl-next] ixgbe: clean up adaptive interrupt moderation algorithm",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "70af5fa049f2ac74886bdd385df8d5748c909560",
    "submitter": {
        "id": 75597,
        "url": "http://patchwork.ozlabs.org/api/people/75597/?format=api",
        "name": "Loktionov, Aleksandr",
        "email": "aleksandr.loktionov@intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260327073046.134085-3-aleksandr.loktionov@intel.com/mbox/",
    "series": [
        {
            "id": 497717,
            "url": "http://patchwork.ozlabs.org/api/series/497717/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=497717",
            "date": "2026-03-27T07:30:37",
            "name": "[iwl-next] ixgbe: clean up adaptive interrupt moderation algorithm",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/497717/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2216808/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2216808/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@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=Z5AikEuO;\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 4fhskp2MW3z1y1j\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 18:30:58 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id F35666128B;\n\tFri, 27 Mar 2026 07:30:56 +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 el0WG3YJbbvX; Fri, 27 Mar 2026 07:30:55 +0000 (UTC)",
            "from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 0A98E6127C;\n\tFri, 27 Mar 2026 07:30:55 +0000 (UTC)",
            "from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n by lists1.osuosl.org (Postfix) with ESMTP id 0E8F3249\n for <intel-wired-lan@lists.osuosl.org>; Fri, 27 Mar 2026 07:30:53 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp4.osuosl.org (Postfix) with ESMTP id E93AD415BB\n for <intel-wired-lan@lists.osuosl.org>; Fri, 27 Mar 2026 07:30:52 +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 GdZusfAdW_cu for <intel-wired-lan@lists.osuosl.org>;\n Fri, 27 Mar 2026 07:30:52 +0000 (UTC)",
            "from mgamail.intel.com (mgamail.intel.com [192.198.163.14])\n by smtp4.osuosl.org (Postfix) with ESMTPS id EEABA41598\n for <intel-wired-lan@lists.osuosl.org>; Fri, 27 Mar 2026 07:30:51 +0000 (UTC)",
            "from orviesa002.jf.intel.com ([10.64.159.142])\n by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 27 Mar 2026 00:30:51 -0700",
            "from amlin-019-225.igk.intel.com ([10.102.19.225])\n by orviesa002.jf.intel.com with ESMTP; 27 Mar 2026 00:30:50 -0700"
        ],
        "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 0A98E6127C",
            "OpenDKIM Filter v2.11.0 smtp4.osuosl.org EEABA41598"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1774596655;\n\tbh=HRKVxbpEVgm9SdrgPp2QDAzP+IH/kqm1v1mGR0loedg=;\n\th=From:To:Cc:Date:In-Reply-To:References:Subject:List-Id:\n\t List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:\n\t From;\n\tb=Z5AikEuOH8KGumAD3YYEB+/lGK8LPPkltKYO6qRVgQQagS943DupUIxf3WmCESAtA\n\t wMEyUB3BysHPCQGEpyjS7tyAMu4F0p2lEHQy5GdQLusZdQB/Rt2B6mQpSzvf6B5DA5\n\t rSgkk6tjV+Uwo5U8BxvmpBtnCuGTQd62/dGWYXssZOBTBOLn0cGIhYvIld5t/0C9ig\n\t hdbrG2RwRCvFga3zkHewd78tho6/Kfww/nK3aDodUdhG7s5hVaTD61DBRbHMkWHau2\n\t tqzfSlnepyDApUMXf+5+HRn3GlqIxManqXPODHAQ2GoLRnb6GYg8KZVGoaMHtvFMsy\n\t dhvE9dIVUj+BA==",
        "Received-SPF": "Pass (mailfrom) identity=mailfrom; client-ip=192.198.163.14;\n helo=mgamail.intel.com; envelope-from=aleksandr.loktionov@intel.com;\n receiver=<UNKNOWN>",
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp4.osuosl.org EEABA41598",
        "X-CSE-ConnectionGUID": [
            "JboyP4eGRwKrrh//zKyp1w==",
            "bndeIcSqRZGZKqeQpCwCeQ=="
        ],
        "X-CSE-MsgGUID": [
            "OUy6gnDmQXicobf4RuLrgA==",
            "m9daod8WQWmVxWnEbEgJ2w=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6800,10657,11741\"; a=\"75734299\"",
            "E=Sophos;i=\"6.23,143,1770624000\"; d=\"scan'208\";a=\"75734299\"",
            "E=Sophos;i=\"6.23,143,1770624000\"; d=\"scan'208\";a=\"255740366\""
        ],
        "X-ExtLoop1": "1",
        "From": "Aleksandr Loktionov <aleksandr.loktionov@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com,\n aleksandr.loktionov@intel.com",
        "Cc": "netdev@vger.kernel.org",
        "Date": "Fri, 27 Mar 2026 08:30:37 +0100",
        "Message-ID": "<20260327073046.134085-3-aleksandr.loktionov@intel.com>",
        "X-Mailer": "git-send-email 2.52.0",
        "In-Reply-To": "<20260327073046.134085-1-aleksandr.loktionov@intel.com>",
        "References": "<20260327073046.134085-1-aleksandr.loktionov@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Mailman-Original-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1774596652; x=1806132652;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=y2yKKNgr3vmACHaIi7uKjgzkogFj3MgrCQ7Vm/PMxX8=;\n b=LbuRh7XYFqd6EXFDmOikp0PcRALm/ZGTzyho+nQZfyzlda7xmFoyXwHy\n mh00kEiIkOJp713r6kCLdcFcMIArBpNMgutNKdQh7VxA3gXaMZvE+0QoM\n jISQZeM0Is9JAEI7HT+u26oHipi1pzpqpIwCX2zDl5SIW3s6Z4XTy1z8X\n vurK+PiPhIjArpib0OWAGDvu/pmiaFj1Gp4oWag0uF3vS2H3pFQnacCoy\n +Mi7yiw94LRVIARJWa+uPRmaxhZkn/12D44lqnG3z9/z7PDrd8kMReWLJ\n k7jcsBxduPCld10UOL2MS1BRlXr6rq4yv6lI+4wT6hEt3NdJEpssONaWa\n Q==;",
        "X-Mailman-Original-Authentication-Results": [
            "smtp4.osuosl.org;\n dmarc=pass (p=none dis=none)\n header.from=intel.com",
            "smtp4.osuosl.org;\n dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com\n header.a=rsa-sha256 header.s=Intel header.b=LbuRh7XY"
        ],
        "Subject": "[Intel-wired-lan] [PATCH iwl-next] ixgbe: clean up adaptive\n interrupt moderation algorithm",
        "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": "From: Alexander Duyck <alexander.h.duyck@intel.com>\n\nImprove the adaptive interrupt throttle (ITR) algorithm in several ways:\n\n - Lower IXGBE_ITR_ADAPTIVE_MAX_USECS from 126 to 84 us (12K interrupts/s\n   minimum in bulk mode) to prevent RX starvation in full-blown bulk\n   scenarios.\n\n - Add ixgbe_container_is_rx() helper to split the Rx vs Tx logic in\n   ixgbe_update_itr(); Rx uses a latency-favouring path for small bursts\n   (< 24 packets and < 12112 bytes), targeting 8x throughput growth per\n   step.\n\n - Limit the ITR decrease in latency mode to at most 2 us per update so\n   ACK workloads do not overdrive the moderation and starve TCP senders.\n\n - Add IXGBE_ITR_ADAPTIVE_MASK_USECS (= IXGBE_ITR_ADAPTIVE_LATENCY - 1\n   = 0x7F) to mask out the mode flag bit 7 in ixgbe_set_itr(), replacing\n   the open-coded ~IXGBE_ITR_ADAPTIVE_LATENCY.\n\nSigned-off-by: Alexander Duyck <alexander.h.duyck@intel.com>\nSigned-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe.h      |  4 +-\n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 78 +++++++++++--------\n 2 files changed, 48 insertions(+), 34 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\nindex 59a1cee4..c704cc6 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n@@ -475,9 +475,10 @@ static inline unsigned int ixgbe_rx_pg_order(struct ixgbe_ring *ring)\n \n #define IXGBE_ITR_ADAPTIVE_MIN_INC\t2\n #define IXGBE_ITR_ADAPTIVE_MIN_USECS\t10\n-#define IXGBE_ITR_ADAPTIVE_MAX_USECS\t126\n+#define IXGBE_ITR_ADAPTIVE_MAX_USECS\t84\n #define IXGBE_ITR_ADAPTIVE_LATENCY\t0x80\n #define IXGBE_ITR_ADAPTIVE_BULK\t\t0x00\n+#define IXGBE_ITR_ADAPTIVE_MASK_USECS\t(IXGBE_ITR_ADAPTIVE_LATENCY - 1)\n \n struct ixgbe_ring_container {\n \tstruct ixgbe_ring *ring;\t/* pointer to linked list of rings */\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex 0bc806a..1885fe8 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -2711,6 +2711,12 @@ static void ixgbe_configure_msix(struct ixgbe_adapter *adapter)\n \tIXGBE_WRITE_REG(&adapter->hw, IXGBE_EIAC, mask);\n }\n \n+static inline bool ixgbe_container_is_rx(struct ixgbe_q_vector *q_vector,\n+\t\t\t\t\t struct ixgbe_ring_container *rc)\n+{\n+\treturn &q_vector->rx == rc;\n+}\n+\n /**\n  * ixgbe_update_itr - update the dynamic ITR value based on statistics\n  * @q_vector: structure containing interrupt and ring information\n@@ -2747,35 +2753,24 @@ static void ixgbe_update_itr(struct ixgbe_q_vector *q_vector,\n \t\tgoto clear_counts;\n \n \tpackets = ring_container->total_packets;\n-\n-\t/* We have no packets to actually measure against. This means\n-\t * either one of the other queues on this vector is active or\n-\t * we are a Tx queue doing TSO with too high of an interrupt rate.\n-\t *\n-\t * When this occurs just tick up our delay by the minimum value\n-\t * and hope that this extra delay will prevent us from being called\n-\t * without any work on our queue.\n-\t */\n-\tif (!packets) {\n-\t\titr = (q_vector->itr >> 2) + IXGBE_ITR_ADAPTIVE_MIN_INC;\n-\t\tif (itr > IXGBE_ITR_ADAPTIVE_MAX_USECS)\n-\t\t\titr = IXGBE_ITR_ADAPTIVE_MAX_USECS;\n-\t\titr += ring_container->itr & IXGBE_ITR_ADAPTIVE_LATENCY;\n-\t\tgoto clear_counts;\n-\t}\n-\n \tbytes = ring_container->total_bytes;\n \n-\t/* If packets are less than 4 or bytes are less than 9000 assume\n-\t * insufficient data to use bulk rate limiting approach. We are\n-\t * likely latency driven.\n-\t */\n-\tif (packets < 4 && bytes < 9000) {\n-\t\titr = IXGBE_ITR_ADAPTIVE_LATENCY;\n-\t\tgoto adjust_by_size;\n+\tif (ixgbe_container_is_rx(q_vector, ring_container)) {\n+\t\t/* If Rx and there are 1 to 23 packets and bytes are less than\n+\t\t * 12112 assume insufficient data to use bulk rate limiting\n+\t\t * approach. Instead we will focus on simply trying to target\n+\t\t * receiving 8 times as much data in the next interrupt.\n+\t\t */\n+\t\tif (packets && packets < 24 && bytes < 12112) {\n+\t\t\titr = IXGBE_ITR_ADAPTIVE_LATENCY;\n+\t\t\tavg_wire_size = (bytes + packets * 24) * 2;\n+\t\t\tavg_wire_size = clamp_t(unsigned int,\n+\t\t\t\t\t\tavg_wire_size, 2560, 12800);\n+\t\t\tgoto adjust_for_speed;\n+\t\t}\n \t}\n \n-\t/* Between 4 and 48 we can assume that our current interrupt delay\n+\t/* Less than 48 packets we can assume that our current interrupt delay\n \t * is only slightly too low. As such we should increase it by a small\n \t * fixed amount.\n \t */\n@@ -2783,6 +2778,20 @@ static void ixgbe_update_itr(struct ixgbe_q_vector *q_vector,\n \t\titr = (q_vector->itr >> 2) + IXGBE_ITR_ADAPTIVE_MIN_INC;\n \t\tif (itr > IXGBE_ITR_ADAPTIVE_MAX_USECS)\n \t\t\titr = IXGBE_ITR_ADAPTIVE_MAX_USECS;\n+\n+\t\t/* If sample size is 0 - 7 we should probably switch\n+\t\t * to latency mode instead of trying to control\n+\t\t * things as though we are in bulk.\n+\t\t *\n+\t\t * Otherwise if the number of packets is less than 48\n+\t\t * we should maintain whatever mode we are currently\n+\t\t * in. The range between 8 and 48 is the cross-over\n+\t\t * point between latency and bulk traffic.\n+\t\t */\n+\t\tif (packets < 8)\n+\t\t\titr += IXGBE_ITR_ADAPTIVE_LATENCY;\n+\t\telse\n+\t\t\titr += ring_container->itr & IXGBE_ITR_ADAPTIVE_LATENCY;\n \t\tgoto clear_counts;\n \t}\n \n@@ -2813,7 +2822,6 @@ static void ixgbe_update_itr(struct ixgbe_q_vector *q_vector,\n \t */\n \titr = IXGBE_ITR_ADAPTIVE_BULK;\n \n-adjust_by_size:\n \t/* If packet counts are 256 or greater we can assume we have a gross\n \t * overestimation of what the rate should be. Instead of trying to fine\n \t * tune it just use the formula below to try and dial in an exact value\n@@ -2856,12 +2864,7 @@ static void ixgbe_update_itr(struct ixgbe_q_vector *q_vector,\n \t\tavg_wire_size = 32256;\n \t}\n \n-\t/* If we are in low latency mode half our delay which doubles the rate\n-\t * to somewhere between 100K to 16K ints/sec\n-\t */\n-\tif (itr & IXGBE_ITR_ADAPTIVE_LATENCY)\n-\t\tavg_wire_size >>= 1;\n-\n+adjust_for_speed:\n \t/* Resultant value is 256 times larger than it needs to be. This\n \t * gives us room to adjust the value as needed to either increase\n \t * or decrease the value based on link speeds of 10G, 2.5G, 1G, etc.\n@@ -2888,6 +2891,15 @@ static void ixgbe_update_itr(struct ixgbe_q_vector *q_vector,\n \t\tbreak;\n \t}\n \n+\t/* In the case of a latency specific workload only allow us to\n+\t * reduce the ITR by at most 2us. By doing this we should dial\n+\t * in so that our number of interrupts is no more than 2x the number\n+\t * of packets for the least busy workload. So for example in the case\n+\t * of a TCP workload the ACK packets being received would set the\n+\t * interrupt rate as they are a latency specific workload.\n+\t */\n+\tif ((itr & IXGBE_ITR_ADAPTIVE_LATENCY) && itr < ring_container->itr)\n+\t\titr = ring_container->itr - IXGBE_ITR_ADAPTIVE_MIN_INC;\n clear_counts:\n \t/* write back value */\n \tring_container->itr = itr;\n@@ -2948,7 +2960,7 @@ static void ixgbe_set_itr(struct ixgbe_q_vector *q_vector)\n \tnew_itr = min(q_vector->rx.itr, q_vector->tx.itr);\n \n \t/* Clear latency flag if set, shift into correct position */\n-\tnew_itr &= ~IXGBE_ITR_ADAPTIVE_LATENCY;\n+\tnew_itr &= IXGBE_ITR_ADAPTIVE_MASK_USECS;\n \tnew_itr <<= 2;\n \n \tif (new_itr != q_vector->itr) {\n",
    "prefixes": [
        "iwl-next"
    ]
}