From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8BD26606A31A for ; Tue, 1 Dec 2026 15:37:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=rsKK160X; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=FJcDEjx+ Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 64FF64054B; Tue, 1 Dec 2026 15:37:32 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id gKcIt86WYQvg; Tue, 1 Dec 2026 15:37:30 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp4.osuosl.org 98D0F40557 Authentication-Results: smtp4.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 ARC-Seal: i=1; d=osuosl.org; s=arc; a=rsa-sha256; cv=none; t=1796139450; b=rXGOpt+HFYedR4e4OqOWkVLSUBNIJ+Hz7zxpXqU4C/wAWT4F2zoK8KWSNLUPizKomgj9 iKsOvk4lqLimdVHlQa+Uw69QIwQ8xGQ9Yr0Xton3lNdldoNXSCEpDVM71Za+Hkk5gqFz3 JWXrPw3ims1ZsxZqyN1Fw1HoOFRIQdaww5DQIa2a8Ye3opLLo7S+eLYwcj/ylaaXAAbb/ 58Nu2SmPGFNu0d+WB+xiIY5m07qXapCiF3wSNQs9jKzu6ghGG64lWZ5sPzghT1XWW/9wj Kenblhm28mYknfwBf03Fn12RgJ5n1lcfCZo9OjfpnufTShX3DlDsyV1gqjdToItoyMw== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1796139450; h=X-Comment:DKIM-Signature:X-Original-To:Delivered-To:Received: Received:X-Virus-Scanned:X-Spam-Flag:X-Spam-Score:X-Spam-Level: X-Spam-Status:Received:ARC-Filter:Received-SPF:Received:Received: Received:DKIM-Signature:Message-ID:From:Subject:To:In-Reply-To: References:Content-Type:Content-Transfer-Encoding:Date:X-BeenThere: X-Mailman-Version:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Reply-To:Errors-To; bh=3PifotBJN7JvbAo/5h7PEZtwVfgG/zqTTbXVrKUPQHY=; b=UtStIHQ9b1pVMVk92Y5dXt972ttru5AbhIB1j1GmxdCSs1XcpPc7z/EiBGax8fiA02qt iASb59R/K8JikcPhjvzbD+mrNPjXL+61y7xHXDBrWBZgwTqxZKjwrrtWZY0wVDI1DEQR7 okSVHUtiIEOXlijajKFvYvDe1j6KlhTu6Fy3W5o375aQSlFEgzaienK6bdnR8p0WBfDdO EC8hwgtD9DbcP1uhYOhjcCEi3reFUkBKycxrLrufSNr3g6mCiOSeBPNX6Kz4bApSUuIxp qIPY99+4ZCQy/+ZL1oIiEFMcSh+mOiHAUtOi9zlhPJxGubiRjIAepH8UC3y0ZDTnGgQ== ARC-Authentication-Results: i=1; smtp4.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1796139450; bh=3PifotBJN7JvbAo/5h7PEZtwVfgG/zqTTbXVrKUPQHY=; h=From:Subject:To:In-Reply-To:References:Date:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To:From; b=rsKK160XnxxZ1MC9aNFS/2cAf/d0rYFKEwRC+TwwCsymSvxv4QRYgO+60YAN7KBe9 mGEqSsxdk6/3jR7oBRgcH/SlAFyT7bSHky1qQCR3+P/0e8ZXpjNt0z1bM33rtJhroy y4R9Y0kk9O/VSScRdnHphw817z9jAAT2tz1V5qFWGqrjspyIlZklJoM+HeJLWxsZgS rEdD043oc0VY7TkgRsH2gi9BwDHG35I0mlKKbtrG9quIA+r0oUNK9fh5x+QO7pta+w tc7ktkXMSkIbReivVMJukCtOGinZxEnZVevVQYi9e6LrMuS/jFoQfKJeMpUNWW64/R 66BzLG1BndrCA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id 98D0F40557; Tue, 1 Dec 2026 15:37:30 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists1.osuosl.org (Postfix) with ESMTP id 8173AA0F for ; Tue, 1 Dec 2026 15:37:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 726C640111 for ; Tue, 1 Dec 2026 15:37:29 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id SdtkQgkcU46x for ; Tue, 1 Dec 2026 15:37:28 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp2.osuosl.org 32CFF40079 Authentication-Results: smtp2.osuosl.org; arc=none smtp.remote-ip=172.105.4.254 Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=sashiko-bot@kernel.org; receiver= Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=FJcDEjx+ Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by smtp2.osuosl.org (Postfix) with ESMTPS id 32CFF40079 for ; Tue, 1 Dec 2026 15:37:27 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 24A906201B; Tue, 1 Dec 2026 15:37:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B872A1F000C1; Tue, 1 Dec 2026 15:37:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796139445; bh=3PifotBJN7JvbAo/5h7PEZtwVfgG/zqTTbXVrKUPQHY=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=FJcDEjx+fDovhyLJ6lsEpWd0Vclu8dvBXcLMcAgAZwa3s8Bj7G3KQBsBk66pkHgTo TNbRpQVv/wOH3gBbpGf8ZXjofro+eFVUMbI76oMH7xEzOuqdxrk/M/rQ8VVD9fGr/D iDxCnwswgqgjmp7W8ddAt3iq72GVk9kzpZKaH/mtyCmUzhv1bNlAV4+R+rQglzBhQn cpgkkC3u0ysCyG7T2hiQq1dDp/v1ZIZRmjo56wchnROBxpKZDrnmnKJZZHmjSXoxxs rIB+VN738P44nR3UCxBqrZTX1ZWykSMsLXCksrBntPL2OVH58b2a0TEMEgb7Z6xodQ euylUmCltB0wQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH iwl-next v2 2/4] ixgbe: add ixgbe_container_is_rx() helper and refine RX adaptive ITR To: "Aleksandr Loktionov" , intel-wired-lan@lists.osuosl.org In-Reply-To: <20261201152253.54577-3-aleksandr.loktionov@intel.com> References: <20261201152253.54577-1-aleksandr.loktionov@intel.com> <20261201152253.54577-3-aleksandr.loktionov@intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 01 Dec 2026 15:37:25 +0000 X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev X-Spam-Status: No, score=-10.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 X-Archived-By: Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] ixgbe: TX ITR calculation in ixgbe_update_itr() clamps RX latency ITR jumps -- commit 0b92d0742509acbe7f30d36376672231f5627956 Author: Alexander Duyck ixgbe: add ixgbe_container_is_rx() helper and refine RX adaptive ITR This commit introduces ixgbe_container_is_rx() and refines the RX adaptive ITR latency calculation in ixgbe_update_itr() to target 8x the observed byte count when 1..23 packets and fewer than 12112 bytes are received. > diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/= ethernet/intel/ixgbe/ixgbe_main.c > index 04f12af2cb4ca..9764b34381733 100644 > --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c > +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c > @@ -2712,6 +2712,12 @@ static void ixgbe_configure_msix(struct ixgbe_adap= ter *adapter) > IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIAC, mask); > } > =20 > +static bool ixgbe_container_is_rx(struct ixgbe_q_vector *q_vector, > + struct ixgbe_ring_container *rc) > +{ > + return &q_vector->rx =3D=3D rc; > +} > + > /** > * ixgbe_update_itr - update the dynamic ITR value based on statistics > * @q_vector: structure containing interrupt and ring information > @@ -2748,35 +2754,24 @@ static void ixgbe_update_itr(struct ixgbe_q_vecto= r *q_vector, > goto clear_counts; > =20 > packets =3D ring_container->total_packets; > - > - /* We have no packets to actually measure against. This means > - * either one of the other queues on this vector is active or > - * we are a Tx queue doing TSO with too high of an interrupt rate. > - * > - * When this occurs just tick up our delay by the minimum value > - * and hope that this extra delay will prevent us from being called > - * without any work on our queue. > - */ > - if (!packets) { > - itr =3D (q_vector->itr >> 2) + IXGBE_ITR_ADAPTIVE_MIN_INC; > - if (itr > IXGBE_ITR_ADAPTIVE_MAX_USECS) > - itr =3D IXGBE_ITR_ADAPTIVE_MAX_USECS; > - itr +=3D ring_container->itr & IXGBE_ITR_ADAPTIVE_LATENCY; > - goto clear_counts; > - } > - > bytes =3D ring_container->total_bytes; > =20 > - /* If packets are less than 4 or bytes are less than 9000 assume > - * insufficient data to use bulk rate limiting approach. We are > - * likely latency driven. > - */ > - if (packets < 4 && bytes < 9000) { > - itr =3D IXGBE_ITR_ADAPTIVE_LATENCY; > - goto adjust_by_size; > + if (ixgbe_container_is_rx(q_vector, ring_container)) { > + /* If Rx and there are 1 to 23 packets and bytes are less than > + * 12112 assume insufficient data to use bulk rate limiting > + * approach. Instead we will focus on simply trying to target > + * receiving 8 times as much data in the next interrupt. > + */ > + if (packets && packets < 24 && bytes < 12112) { > + itr =3D IXGBE_ITR_ADAPTIVE_LATENCY; > + avg_wire_size =3D (bytes + packets * 24) * 2; > + avg_wire_size =3D clamp_t(unsigned int, > + avg_wire_size, 2560, 12800); > + goto adjust_for_speed; > + } > } > =20 > - /* Between 4 and 48 we can assume that our current interrupt delay > + /* Less than 48 packets we can assume that our current interrupt delay > * is only slightly too low. As such we should increase it by a small > * fixed amount. > */ > @@ -2784,6 +2779,20 @@ static void ixgbe_update_itr(struct ixgbe_q_vector= *q_vector, > itr =3D (q_vector->itr >> 2) + IXGBE_ITR_ADAPTIVE_MIN_INC; > if (itr > IXGBE_ITR_ADAPTIVE_MAX_USECS) > itr =3D IXGBE_ITR_ADAPTIVE_MAX_USECS; > + > + /* If sample size is 0 - 7 we should probably switch > + * to latency mode instead of trying to control > + * things as though we are in bulk. > + * > + * Otherwise if the number of packets is less than 48 > + * we should maintain whatever mode we are currently > + * in. The range between 8 and 48 is the cross-over > + * point between latency and bulk traffic. > + */ > + if (packets < 8) > + itr +=3D IXGBE_ITR_ADAPTIVE_LATENCY; > + else > + itr +=3D ring_container->itr & IXGBE_ITR_ADAPTIVE_LATENCY; > goto clear_counts; > } [Severity: Medium] Does q_vector->tx.itr clamp the new RX latency ITR target on combined TX/RX queue vectors whenever TX has fewer than 48 packets? ixgbe_set_itr() updates both q_vector->tx and q_vector->rx on every NAPI poll and then picks the smaller value: drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:ixgbe_set_itr() { ixgbe_update_itr(q_vector, &q_vector->tx); ixgbe_update_itr(q_vector, &q_vector->rx); /* use the smallest value of new ITR delay calculations */ new_itr =3D min(q_vector->rx.itr, q_vector->tx.itr); } When RX hits the new latency branch, q_vector->rx.itr is set to IXGBE_ITR_ADAPTIVE_LATENCY | target_delay (up to 50 us at 10G or 84 us at 1G/2.5G). However, if TX is idle (0 packets) or has fewer than 8 packets during the same interval, q_vector->tx.itr enters the packets < 48 branch and is set to IXGBE_ITR_ADAPTIVE_LATENCY | ((q_vector->itr >> 2) + 2). Because both containers have IXGBE_ITR_ADAPTIVE_LATENCY set, min(q_vector->rx.itr, q_vector->tx.itr) caps new_itr at (q_vector->itr >> 2) + 2, preventing RX from jumping directly to the calculated latency target and limiting it to +2 us steps per interrupt (and resetting q_vector->tx.itr back to 10 us whenever time_after() fires). --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261201152253.5457= 7-1-aleksandr.loktionov@intel.com?part=3D2