[{"id":3677185,"web_url":"http://patchwork.ozlabs.org/comment/3677185/","msgid":"<20260414125837.755493-1-horms@kernel.org>","list_archive_url":null,"date":"2026-04-14T12:58:37","subject":"Re: [Intel-wired-lan] [PATCH iwl-next v2 1/8] ixgbe: lower\n IXGBE_ITR_ADAPTIVE_MAX_USECS to prevent RX starvation","submitter":{"id":82748,"url":"http://patchwork.ozlabs.org/api/people/82748/","name":"Simon Horman","email":"horms@kernel.org"},"content":"From: 'Simon Horman' <horms@kernel.org>\n\nThis is an AI-generated review of your patch. The human sending this\nemail has considered the AI review valid, or at least plausible.\nFull review at: https://sashiko.dev\n---\nixgbe: lower IXGBE_ITR_ADAPTIVE_MAX_USECS to prevent RX starvation\n\nThe patch lowers IXGBE_ITR_ADAPTIVE_MAX_USECS from 126 to 84 to prevent\ndescriptor ring starvation under sustained full-line-rate bulk RX traffic.\nIt states that this provides enough headroom to drain the ring before it wraps.\n\n> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n> index 59a1cee40b436..eedee3b2e72c8 100644\n> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n> @@ -475,7 +475,7 @@ 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\nWill the hardware still be configured with a 126 us delay during bulk traffic?\n\nLooking at ixgbe_update_itr(), when traffic is categorized as bulk\n(packets >= 256), itr is initialized to IXGBE_ITR_ADAPTIVE_BULK (0).\nFor a 10Gbps link, avg_wire_size plateaus at 32256:\n\ndrivers/net/ethernet/intel/ixgbe/ixgbe_main.c:ixgbe_update_itr() {\n    ...\n\t} else {\n\t\t/* plateau at a limit of 8K ints/sec */\n\t\tavg_wire_size = 32256;\n\t}\n    ...\n}\n\nThe itr is then calculated and updated directly:\n\ndrivers/net/ethernet/intel/ixgbe/ixgbe_main.c:ixgbe_update_itr() {\n    ...\n\tswitch (q_vector->adapter->link_speed) {\n\tcase IXGBE_LINK_SPEED_10GB_FULL:\n\tcase IXGBE_LINK_SPEED_100_FULL:\n\tdefault:\n\t\titr += DIV_ROUND_UP(avg_wire_size,\n\t\t\t\t    IXGBE_ITR_ADAPTIVE_MIN_INC * 256) *\n\t\t       IXGBE_ITR_ADAPTIVE_MIN_INC;\n\t\tbreak;\n    ...\n}\n\nWith IXGBE_ITR_ADAPTIVE_MIN_INC being 2, the calculation is\nDIV_ROUND_UP(32256, 512) * 2, which equals exactly 126.\n\nThere is no clamping against IXGBE_ITR_ADAPTIVE_MAX_USECS applied after this\nbulk calculation, so ring_container->itr becomes 126.\n\nLater, in ixgbe_set_itr(), the final ITR is determined by taking the minimum\nbetween the rx and tx values:\n\ndrivers/net/ethernet/intel/ixgbe/ixgbe_main.c:ixgbe_set_itr() {\n    ...\n\tnew_itr = min(q_vector->rx.itr, q_vector->tx.itr);\n    ...\n}\n\nIf the TX ring is idle or operating in latency mode, it will have the\nIXGBE_ITR_ADAPTIVE_LATENCY flag (0x80) set.  Even though its base value is\nclamped to 84, the latency flag makes it numerically 212.\n\nDoes this mean min(126, 212) will return the RX bulk value of 126, leaving\nthe interrupt delay at 126 us and descriptor ring starvation unresolved?\n\n>  #define IXGBE_ITR_ADAPTIVE_LATENCY\t0x80\n>  #define IXGBE_ITR_ADAPTIVE_BULK\t\t0x00","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=tRV1ADAM;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=140.211.166.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 [140.211.166.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 4fw4915C0Wz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 22:59:01 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 1B1CE60FEE;\n\tTue, 14 Apr 2026 12:58:59 +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 NtC6KU84WZiy; Tue, 14 Apr 2026 12:58:57 +0000 (UTC)","from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 9CAA761008;\n\tTue, 14 Apr 2026 12:58:57 +0000 (UTC)","from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])\n by lists1.osuosl.org (Postfix) with ESMTP id 75BF9237\n for <intel-wired-lan@lists.osuosl.org>; Tue, 14 Apr 2026 12:58:56 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n by smtp4.osuosl.org (Postfix) with ESMTP id 5327042A31\n for <intel-wired-lan@lists.osuosl.org>; Tue, 14 Apr 2026 12:58:56 +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 TTfQcPuQc7jJ for <intel-wired-lan@lists.osuosl.org>;\n Tue, 14 Apr 2026 12:58:55 +0000 (UTC)","from sea.source.kernel.org (sea.source.kernel.org\n [IPv6:2600:3c0a:e001:78e:0:1991:8:25])\n by smtp4.osuosl.org (Postfix) with ESMTPS id 74EAD42A30\n for <intel-wired-lan@lists.osuosl.org>; Tue, 14 Apr 2026 12:58:55 +0000 (UTC)","from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n by sea.source.kernel.org (Postfix) with ESMTP id 6254A43EC8;\n Tue, 14 Apr 2026 12:58:54 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id 1B74BC19425;\n Tue, 14 Apr 2026 12:58:52 +0000 (UTC)"],"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 9CAA761008","OpenDKIM Filter v2.11.0 smtp4.osuosl.org 74EAD42A30"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1776171537;\n\tbh=AGglciVD7IYZC7XTPOg4/62iqxBhNOdQlf5abXAKI0Q=;\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=tRV1ADAMW83mP6hzsCl+cEOENRnMcnM22lNoFiXsrg3POHNNBUfIBX3zCVWefyytD\n\t Wn+WsmbXMDbBWZIB9b+MW8ejEPYChmAa1hh/LO7/5hjLg9Q08cIM+eGm8lPIp8nIar\n\t KGN6q0H+zNGo+5GBEVw4IjnEJHYrxUzgGjFrrsE7nhhb1bwRoKFwtEOczwy5DhD389\n\t a/xSIiuOLGo+RqAtUVPMTBxXk/Zh8u5SO8c3IivENj7ay9iv9Sv3UDdaaeUhcU/RGw\n\t lTtl65IpQuFTwSC4j37zBPQwk5OF6W3d3ADeXguYHn3W3vNF6lYBhQv23Oziof/5H+\n\t CfKZkieOT8mhA==","Received-SPF":"Pass (mailfrom) identity=mailfrom;\n client-ip=2600:3c0a:e001:78e:0:1991:8:25; helo=sea.source.kernel.org;\n envelope-from=horms@kernel.org; receiver=<UNKNOWN>","DMARC-Filter":"OpenDMARC Filter v1.4.2 smtp4.osuosl.org 74EAD42A30","From":"Simon Horman <horms@kernel.org>","To":"aleksandr.loktionov@intel.com","Cc":"'Simon Horman' <horms@kernel.org>, intel-wired-lan@lists.osuosl.org,\n anthony.l.nguyen@intel.com, netdev@vger.kernel.org","Date":"Tue, 14 Apr 2026 13:58:37 +0100","Message-ID":"<20260414125837.755493-1-horms@kernel.org>","X-Mailer":"git-send-email 2.53.0","In-Reply-To":"<20260408131216.2662245-2-aleksandr.loktionov@intel.com>","References":"<20260408131216.2662245-2-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=kernel.org; s=k20201202; t=1776171534;\n bh=8j7SG+h6op+SNbXj618VmTyqqQnfVPQ/1mylqAjMiS8=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=gNRVvOgnmKjyX+zoMNeZ4X94fopZ1JEzh0RVOONchgWVUmnDthLOr+Ns3z9AD1Y76\n X+k6nm1JU29g4bPfle4V/9nvhaWwuSiXPd46jIIoivUI4S5yXNx8Nr/a5v2tHxVHe7\n XfAaOHAmHSOd65ZcIOKh8m9OV19da7uEvcRoLH1PvCP2lgzgB+MwPGnzOdJ7iglM3o\n tjT6TZuMojmH5sW4VnJLo+Lc+Xb9VOaN6V8HF2VUMujpEoNJcBJewHHtdIrCbwpCcT\n 4X+WThGHXOdvbl8MRCGtk68ucZJsmREpgCYN/AnuYMI3AOsiFl17EK05aGdaGtqp2M\n xR1+/2WE+59CQ==","X-Mailman-Original-Authentication-Results":["smtp4.osuosl.org;\n dmarc=pass (p=quarantine dis=none)\n header.from=kernel.org","smtp4.osuosl.org;\n dkim=pass (2048-bit key,\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=gNRVvOgn"],"Subject":"Re: [Intel-wired-lan] [PATCH iwl-next v2 1/8] ixgbe: lower\n IXGBE_ITR_ADAPTIVE_MAX_USECS to prevent RX starvation","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>"}}]