{"id":2223540,"url":"http://patchwork.ozlabs.org/api/patches/2223540/?format=json","web_url":"http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260415142841.3222399-6-aleksandr.loktionov@intel.com/","project":{"id":46,"url":"http://patchwork.ozlabs.org/api/projects/46/?format=json","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":"<20260415142841.3222399-6-aleksandr.loktionov@intel.com>","list_archive_url":null,"date":"2026-04-15T14:28:40","name":"[iwl-net,v3,5/6] ixgbe: fix ITR value overflow in adaptive interrupt throttling","commit_ref":null,"pull_url":null,"state":"under-review","archived":false,"hash":"f90fcf863942c71376c726f1867d3b02b6e2c16b","submitter":{"id":75597,"url":"http://patchwork.ozlabs.org/api/people/75597/?format=json","name":"Aleksandr Loktionov","email":"aleksandr.loktionov@intel.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260415142841.3222399-6-aleksandr.loktionov@intel.com/mbox/","series":[{"id":499995,"url":"http://patchwork.ozlabs.org/api/series/499995/?format=json","web_url":"http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=499995","date":"2026-04-15T14:28:35","name":"ixgbe: six bug fixes","version":3,"mbox":"http://patchwork.ozlabs.org/series/499995/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2223540/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2223540/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=57JK3xJv;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])\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 4fwk6M4B7Nz1yHc\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Apr 2026 00:28:59 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id AE4E84B6DA;\n\tWed, 15 Apr 2026 14:28: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 XPM04BgcUUeJ; Wed, 15 Apr 2026 14:28:55 +0000 (UTC)","from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id D25994B795;\n\tWed, 15 Apr 2026 14:28:55 +0000 (UTC)","from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n by lists1.osuosl.org (Postfix) with ESMTP id 6AE50283\n for <intel-wired-lan@lists.osuosl.org>; Wed, 15 Apr 2026 14:28:55 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n by smtp1.osuosl.org (Postfix) with ESMTP id 511A48301D\n for <intel-wired-lan@lists.osuosl.org>; Wed, 15 Apr 2026 14:28:55 +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 FZBmWnwz4fvN for <intel-wired-lan@lists.osuosl.org>;\n Wed, 15 Apr 2026 14:28:53 +0000 (UTC)","from mgamail.intel.com (mgamail.intel.com [198.175.65.16])\n by smtp1.osuosl.org (Postfix) with ESMTPS id 00E4D85477\n for <intel-wired-lan@lists.osuosl.org>; Wed, 15 Apr 2026 14:28:52 +0000 (UTC)","from orviesa003.jf.intel.com ([10.64.159.143])\n by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 15 Apr 2026 07:28:51 -0700","from amlin-019-225.igk.intel.com ([10.102.19.225])\n by orviesa003.jf.intel.com with ESMTP; 15 Apr 2026 07:28: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 smtp4.osuosl.org D25994B795","OpenDKIM Filter v2.11.0 smtp1.osuosl.org 00E4D85477"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1776263335;\n\tbh=uaWujFJLTGPpo7w6VGd0NHUa6CrH2MRaI6NNhTf/Zag=;\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=57JK3xJv8odpQmi6PS8uTrCNuSbViac5FmJsNertnZE3tGZTouJJLUBsQlfRO6HBJ\n\t YaWiVpHS93r3MXxxm1qmJXmY9kEkK6rjEHIXRsMjLB5Yf7KBACk7mgXOfcN3WmbO+q\n\t EG7PPuzBdBL0iZoOxQJK0wsC5P2XgsC2eFEUhUYHJTpguG1jI6GK351Fz+be0qOWl6\n\t eqBcrb2Db2tZqHyJ4WTiyXvNwZMlDpWWuywFO5ImP7fNWwt3cJEJrL6pJiTuYYkLmM\n\t utwPkdOCwRmRy7Z0a+Qd2qmalrVAKe43jDIODx3LorDXJs/95XAxpOjKfeqIfipxwR\n\t Zup6NVg+6k13A==","Received-SPF":"Pass (mailfrom) identity=mailfrom; client-ip=198.175.65.16;\n helo=mgamail.intel.com; envelope-from=aleksandr.loktionov@intel.com;\n receiver=<UNKNOWN>","DMARC-Filter":"OpenDMARC Filter v1.4.2 smtp1.osuosl.org 00E4D85477","X-CSE-ConnectionGUID":["zqMQCO8dSdWMSwMzLds/fQ==","4umZa15tQv22yAIkuPCDRQ=="],"X-CSE-MsgGUID":["aY4V/0F1RJ6anHQYL6WhMw==","DtpY65ZfSrGKTtIAJzAdfg=="],"X-IronPort-AV":["E=McAfee;i=\"6800,10657,11760\"; a=\"77423746\"","E=Sophos;i=\"6.23,179,1770624000\"; d=\"scan'208\";a=\"77423746\"","E=Sophos;i=\"6.23,179,1770624000\"; d=\"scan'208\";a=\"234467884\""],"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":"Wed, 15 Apr 2026 16:28:40 +0200","Message-ID":"<20260415142841.3222399-6-aleksandr.loktionov@intel.com>","X-Mailer":"git-send-email 2.52.0","In-Reply-To":"<20260415142841.3222399-1-aleksandr.loktionov@intel.com>","References":"<20260415142841.3222399-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=1776263333; x=1807799333;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=KqWXBLN1y2tBAU5MfQdxigjBV0ykVvzEk82ODCrBxvE=;\n b=WFTOA1zJr8SNk8kXL5sI0hkr6g4Mzo5GngMD/aa1RhUn8XBUQYuBManT\n EKvGO/G8V/2VUBZDn9wGVWr+omIgjbbCfuHJzYaxYDrRuMfpzIdbhL7Ho\n c3H5Zgq7c2XT8OqFpHYU4ITrZVNSFSbMyGLDAl3xR+9eTvTwOxTm2CZXl\n ZqKayf7doY84Xsw3H4eo1S7P3vBHkd4JwfRPsU2tCpNYGxnh3b3xAo3fY\n oC4+EFjq/thTGE6EROAF4ybIPm8dLgrKBeqwCLI4VMTKTy/4uO13DE2u+\n LlEHa2R0CgUeeXqA8VtU+c7wpbCCfTlo5CY0uyh+BuTinSpjzF4ADCRF5\n g==;","X-Mailman-Original-Authentication-Results":["smtp1.osuosl.org;\n dmarc=pass (p=none dis=none)\n header.from=intel.com","smtp1.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=WFTOA1zJ"],"Subject":"[Intel-wired-lan] [PATCH iwl-net v3 5/6] ixgbe: fix ITR value\n overflow in adaptive interrupt throttling","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":"ixgbe_update_itr() packs a mode flag (IXGBE_ITR_ADAPTIVE_LATENCY,\nbit 7) and a usecs delay (bits [6:0]) into an unsigned int, then\nstores the combined value in ring_container->itr which is declared as\nu8.  Values above 0xFF wrap on truncation, corrupting both the delay\nand the mode flag on the next readback.\n\nKeep the mode bit (IXGBE_ITR_ADAPTIVE_LATENCY) and the usec delay as\nseparate operands in the final store expression.  Clamp only the usecs\nportion to [IXGBE_ITR_ADAPTIVE_MIN_USECS, IXGBE_ITR_ADAPTIVE_MAX_USECS]\nusing clamp_val() so that:\n - overflow cannot bleed into the mode bit (bit 7),\n - the delay cannot exceed 126 us (IXGBE_ITR_ADAPTIVE_MAX_USECS),\n - the delay cannot drop below 10 us (IXGBE_ITR_ADAPTIVE_MIN_USECS).\n\nFixes: b4ded8327fea (\"ixgbe: Update adaptive ITR algorithm\")\nCc: stable@vger.kernel.org\nSigned-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>\n---\nv2 -> v3:\n - Use clamp_val() instead of min_t() to also guard the lower bound\n   (IXGBE_ITR_ADAPTIVE_MIN_USECS); keep mode and delay as separate\n   operands until final store; use IXGBE_ITR_ADAPTIVE_MAX_USECS (126)\n   as upper bound instead of IXGBE_ITR_ADAPTIVE_LATENCY - 1 (127)\n   (Simon Horman).\n\nv1 -> v2:\n - Add proper [N/M] numbering so patchwork tracks it as part of the set;\n   no code change.\n\n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 10 +++++++---\n 1 file changed, 8 insertions(+), 2 deletions(-)","diff":"diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex 210c7b9..9f3ae21 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -2886,11 +2886,17 @@ static void ixgbe_update_itr(struct ixgbe_q_vector *q_vector,\n \t\t\t\t    IXGBE_ITR_ADAPTIVE_MIN_INC * 64) *\n \t\t       IXGBE_ITR_ADAPTIVE_MIN_INC;\n \t\tbreak;\n \t}\n \n clear_counts:\n-\t/* write back value */\n-\tring_container->itr = itr;\n+\t/* Separate mode bit (IXGBE_ITR_ADAPTIVE_LATENCY) from usec delay;\n+\t * clamp delay to [MIN_USECS, MAX_USECS] before storing to prevent\n+\t * u8 truncation from corrupting the mode flag or delay on readback.\n+\t */\n+\tring_container->itr = (itr & IXGBE_ITR_ADAPTIVE_LATENCY) |\n+\t\tclamp_val(itr & ~IXGBE_ITR_ADAPTIVE_LATENCY,\n+\t\t\t  IXGBE_ITR_ADAPTIVE_MIN_USECS,\n+\t\t\t  IXGBE_ITR_ADAPTIVE_MAX_USECS);\n \n \t/* next update should occur within next jiffy */\n \tring_container->next_update = next_update + 1;\n","prefixes":["iwl-net","v3","5/6"]}