From patchwork Wed Apr 8 03:12:09 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Loktionov, Aleksandr" X-Patchwork-Id: 2220958 X-Patchwork-Delegate: anthony.l.nguyen@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=qOMPWTeU; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4frNlG481Yz1xy1 for ; Wed, 08 Apr 2026 23:12:26 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id AD9C640F13; Wed, 8 Apr 2026 13:12:23 +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 ImUyF_XLz-Ll; Wed, 8 Apr 2026 13:12:23 +0000 (UTC) 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-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org B990940ED8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1775653942; bh=M3hn3EpusPrBMM8sVKlNSWkI7nmf6UUew8zywfxONAs=; h=From:To:Cc:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=qOMPWTeUnZlbMLM27z9ioCUjvceYyg1TxSdKhsle4fx1Su8CJ+V2x6VlH9eId2cm8 cCjkAWf+/yEyDYlBY1c9+ySf0T2aBgjRMykY1WRYdkv6WyvbLsCWHgZKGqhyuuJoTW uKdyY3TTDG8vsphOupGxxKAdVdx/a6OIFMfmdZKLperNffiBBS89gRqTR7g0fwWs/x 2RpgkR/dHUPATsPmOVFSaLvgAopqZzTM66gKVyHoTanN1lFpiDhnsfUN9RnZIFk/Jo KX/JckpO0nYu/aBKqpAqlG0KCE7zAiLhVcl9SWqHljq3Fb3NG3PFCRBB0E6xCqgz6q x6mHm64IvO/EA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id B990940ED8; Wed, 8 Apr 2026 13:12:22 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists1.osuosl.org (Postfix) with ESMTP id 0D8352C7 for ; Wed, 8 Apr 2026 13:12:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 0B4B340E98 for ; Wed, 8 Apr 2026 13:12:21 +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 rdSatHwAfzdf for ; Wed, 8 Apr 2026 13:12:20 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=192.198.163.7; helo=mgamail.intel.com; envelope-from=aleksandr.loktionov@intel.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 7EECB40E9E DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 7EECB40E9E Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by smtp4.osuosl.org (Postfix) with ESMTPS id 7EECB40E9E for ; Wed, 8 Apr 2026 13:12:20 +0000 (UTC) X-CSE-ConnectionGUID: gP/JxF91Sl+vz3FzAhbF4A== X-CSE-MsgGUID: CkqOBbovR++0DcUyStTgEA== X-IronPort-AV: E=McAfee;i="6800,10657,11752"; a="102087261" X-IronPort-AV: E=Sophos;i="6.23,167,1770624000"; d="scan'208";a="102087261" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2026 06:12:20 -0700 X-CSE-ConnectionGUID: K44WKe62Q/Gr4G/BWdVmCA== X-CSE-MsgGUID: LCJkLTBfQp2x7V6nq65USw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,167,1770624000"; d="scan'208";a="228715057" Received: from amlin-019-225.igk.intel.com ([10.102.19.225]) by orviesa007.jf.intel.com with ESMTP; 08 Apr 2026 06:12:20 -0700 From: Aleksandr Loktionov To: intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com, aleksandr.loktionov@intel.com Cc: netdev@vger.kernel.org Date: Wed, 8 Apr 2026 15:12:09 +0200 Message-ID: <20260408131216.2662245-2-aleksandr.loktionov@intel.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260408131216.2662245-1-aleksandr.loktionov@intel.com> References: <20260408131216.2662245-1-aleksandr.loktionov@intel.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1775653940; x=1807189940; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=98vFBFxoC4OfWp9o9SYGRXEL2PW2ysRQpEnIXyDvrEA=; b=iWXlrR0YDU+UdHQQrIrlfmq3Zh70SMbISAF/XLcUh7g2LuJSiLXObmsx taI4g6lys3vShol+Y8iKE1a0FGd8oq65CWRxhS0A9MTSC9/U0nwJYYAfv 8w448+bDe/8wdwX8I+uaP4pKC6VwkelmEJ4lCUPUPZSsfBg1HhP0t7xa1 dzraDlBDQoExHwvcRSUN18ZIfUKfzcL2DewcuuFWFYIOSUtmr1tqQlIsB ajtrcBU0N2Psg0h2uJyZKTDpbZyo5T0Zs4TM6yEJrst/wJ6V2TTIfUHzf ihs4rapbGIcJVbmWgX+01bPvuZfWQvY/QLfQd0vmlKgMKeGEKAeb6b4Qh Q==; X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=intel.com X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=iWXlrR0Y Subject: [Intel-wired-lan] [PATCH iwl-next v2 1/8] ixgbe: lower 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" From: Alexander Duyck At the current maximum of 126 us the minimum bulk-mode interrupt rate is ~7936 interrupts/s. Under sustained full-line-rate bulk RX traffic this is low enough that descriptor ring starvation can occur before the next interrupt fires. Lower IXGBE_ITR_ADAPTIVE_MAX_USECS from 126 to 84 us. This raises the minimum rate to ~11905 interrupts/s (~12K ints/s), providing enough headroom to drain the ring before it wraps. Signed-off-by: Alexander Duyck Signed-off-by: Aleksandr Loktionov Tested-by: Alexander Nowlin --- v1 -> v2: - Split from monolithic ITR cleanup patch; this patch only lowers IXGBE_ITR_ADAPTIVE_MAX_USECS from 126 to 84. drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h index 59a1cee4..b3f4d21 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h @@ -473,6 +473,6 @@ static inline unsigned int ixgbe_rx_pg_order(struct ixgbe_ring *ring) #define IXGBE_ITR_ADAPTIVE_MIN_INC 2 #define IXGBE_ITR_ADAPTIVE_MIN_USECS 10 -#define IXGBE_ITR_ADAPTIVE_MAX_USECS 126 +#define IXGBE_ITR_ADAPTIVE_MAX_USECS 84 #define IXGBE_ITR_ADAPTIVE_LATENCY 0x80 #define IXGBE_ITR_ADAPTIVE_BULK 0x00 From patchwork Wed Apr 8 03:12:10 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Loktionov, Aleksandr" X-Patchwork-Id: 2220959 X-Patchwork-Delegate: anthony.l.nguyen@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=AxkRADV3; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) 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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4frNlJ6GlJz1xy1 for ; Wed, 08 Apr 2026 23:12:28 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 5CEE640E98; Wed, 8 Apr 2026 13:12:24 +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 IiQgMqvNtYR4; Wed, 8 Apr 2026 13:12:23 +0000 (UTC) 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-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 991E940EFD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1775653943; bh=aGnlnkAQqvJO+ik26xVGzFfpXQgOAF+bwBAQKDYj6E8=; h=From:To:Cc:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=AxkRADV3aqPbTmDGvuov/RftDjUuVFDiMNLlBnCnFjE030d1ts0hEVHn/dWktcZsd HG9QRXcEdkhSw+ut7cLmOZ7WGZ093iITEGO8hs/xvbNr34GldcBP0YivCiayPlRIAV yiwumaonQNaTeHcineuwyhVg94EAy3jpb+JIs8gxvjOzYJZ8Vlb/CYo43xJzjG+4VK Kv0NCjP4a9D3kti/NU8W2LYILH5e7F0ACt60n1A5LPiCyV0FIR8s++9AZYYt/4VPRX nklPGHFgkz+FHAK4vBtgpMPSMkSbA9wbI0ak+nBBY5QgrRVDtAzgjJZuOWRcvw5ZnF DG6HrMkdu7dKA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id 991E940EFD; Wed, 8 Apr 2026 13:12:23 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists1.osuosl.org (Postfix) with ESMTP id 13D2F1F6 for ; Wed, 8 Apr 2026 13:12:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 0614C40EC1 for ; Wed, 8 Apr 2026 13:12:23 +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 RSpghy6iMv2L for ; Wed, 8 Apr 2026 13:12:22 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=192.198.163.7; helo=mgamail.intel.com; envelope-from=aleksandr.loktionov@intel.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 1685740E98 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 1685740E98 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by smtp4.osuosl.org (Postfix) with ESMTPS id 1685740E98 for ; Wed, 8 Apr 2026 13:12:22 +0000 (UTC) X-CSE-ConnectionGUID: AqFGMdjRQ5OSqCpuduCq8g== X-CSE-MsgGUID: pyXEkxrBS2uJMzHzrjtPRw== X-IronPort-AV: E=McAfee;i="6800,10657,11752"; a="102087266" X-IronPort-AV: E=Sophos;i="6.23,167,1770624000"; d="scan'208";a="102087266" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2026 06:12:22 -0700 X-CSE-ConnectionGUID: RQKwwDyuR8W70eOm3Yzb9Q== X-CSE-MsgGUID: koi4PKpiQpeXFNJMzRBAJg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,167,1770624000"; d="scan'208";a="228715067" Received: from amlin-019-225.igk.intel.com ([10.102.19.225]) by orviesa007.jf.intel.com with ESMTP; 08 Apr 2026 06:12:21 -0700 From: Aleksandr Loktionov To: intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com, aleksandr.loktionov@intel.com Cc: netdev@vger.kernel.org Date: Wed, 8 Apr 2026 15:12:10 +0200 Message-ID: <20260408131216.2662245-3-aleksandr.loktionov@intel.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260408131216.2662245-1-aleksandr.loktionov@intel.com> References: <20260408131216.2662245-1-aleksandr.loktionov@intel.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1775653942; x=1807189942; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NsFed1BMzi8mDUXmdE+O4/QmMu76Gjnt+b/Lg5uQ3jU=; b=Hq04d9OwgBjTMqO75Ka7BrmxY74evjKbR+qzN1N/RHQoDRpfS2fPDv0D m8i5RwRhmPeB9GLqg0Td2pzJjBhc94/c+GSc2xTPNuE8AZye0K+NhqEVB 6A98ylZNEpsQDlaXtYznn8+HG9+etwCh5/PfNrtKtmtPlLCO4dU6XFseF 41RsinZb8qYtycUHE/uF64lbnmkW0xQ3Av3P0fL0y8A2Un1ZmB8vJcNQg 6U3Dvugk3TldCMBhf/2FN+wVEfmlWRwlhlrG27RpBwf6/XACJrjwJNUQH /kvwtaHJA/b3+pR35euTdgLOOoEzqrhz0ON5fDFKE6L972/WqAGMk4y5j w==; X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=intel.com X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Hq04d9Ow Subject: [Intel-wired-lan] [PATCH iwl-next v2 2/8] ixgbe: add ixgbe_container_is_rx() helper and refine RX adaptive ITR 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-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" From: Alexander Duyck Add an ixgbe_container_is_rx() helper to cleanly distinguish RX from TX ring containers inside ixgbe_update_itr(). Refine the RX-specific latency-detection path: - Replace the shared "packets < 4 or bytes < 9000" threshold with an RX-specific check of "1..23 packets and bytes < 12112". When that condition holds, target 8x the observed byte count in the next interval by computing avg_wire_size = (bytes + packets * 24) * 2, clamped to [2560, 12800], and jumping directly to the speed-based ITR calculation. This provides finer-grained control over low-rate RX latency workloads without affecting TX. - Remove the separate "no packets" special-case block. When packets is 0 it falls into the "< 48" branch. The mode-tracking logic in that branch is extended: fewer than 8 packets forces latency mode; 8..47 packets preserves the current mode. This replaces the old unconditional "add LATENCY flag from ring_container->itr" carried over from the removed block. - Remove the adjust_by_size label and the associated "halve avg_wire_size in latency mode" step. The Rx latency path now pre-calculates avg_wire_size independently and the bulk path no longer needs the halving to compensate for incorrect thresholds. Rename the jump target to adjust_for_speed to reflect its purpose. Signed-off-by: Alexander Duyck Signed-off-by: Aleksandr Loktionov Tested-by: Alexander Nowlin --- v1 -> v2: - Split from monolithic ITR cleanup; adds ixgbe_container_is_rx(), refines RX latency thresholds (24 pkts / 12112 B), and removes the separate no-packet and adjust_by_size code paths. drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 72 ++++++++++-------- 1 file changed, 41 insertions(+), 31 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 210c7b9..b3f4a72 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -2711,6 +2711,12 @@ static void ixgbe_configure_msix(struct ixgbe_adapter *adapter) IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIAC, mask); } +static bool ixgbe_container_is_rx(struct ixgbe_q_vector *q_vector, + struct ixgbe_ring_container *rc) +{ + return &q_vector->rx == rc; +} + /** * ixgbe_update_itr - update the dynamic ITR value based on statistics * @q_vector: structure containing interrupt and ring information @@ -2747,35 +2753,24 @@ static void ixgbe_update_itr(struct ixgbe_q_vector *q_vector, goto clear_counts; packets = 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 = (q_vector->itr >> 2) + IXGBE_ITR_ADAPTIVE_MIN_INC; - if (itr > IXGBE_ITR_ADAPTIVE_MAX_USECS) - itr = IXGBE_ITR_ADAPTIVE_MAX_USECS; - itr += ring_container->itr & IXGBE_ITR_ADAPTIVE_LATENCY; - goto clear_counts; - } - bytes = ring_container->total_bytes; - /* 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 = 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 = IXGBE_ITR_ADAPTIVE_LATENCY; + avg_wire_size = (bytes + packets * 24) * 2; + avg_wire_size = clamp_t(unsigned int, + avg_wire_size, 2560, 12800); + goto adjust_for_speed; + } } - /* 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. */ @@ -2783,6 +2778,20 @@ static void ixgbe_update_itr(struct ixgbe_q_vector *q_vector, itr = (q_vector->itr >> 2) + IXGBE_ITR_ADAPTIVE_MIN_INC; if (itr > IXGBE_ITR_ADAPTIVE_MAX_USECS) itr = 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 += IXGBE_ITR_ADAPTIVE_LATENCY; + else + itr += ring_container->itr & IXGBE_ITR_ADAPTIVE_LATENCY; goto clear_counts; } @@ -2813,7 +2822,6 @@ static void ixgbe_update_itr(struct ixgbe_q_vector *q_vector, */ itr = IXGBE_ITR_ADAPTIVE_BULK; -adjust_by_size: /* If packet counts are 256 or greater we can assume we have a gross * overestimation of what the rate should be. Instead of trying to fine * tune it just use the formula below to try and dial in an exact value @@ -2856,12 +2864,7 @@ static void ixgbe_update_itr(struct ixgbe_q_vector *q_vector, avg_wire_size = 32256; } - /* If we are in low latency mode half our delay which doubles the rate - * to somewhere between 100K to 16K ints/sec - */ - if (itr & IXGBE_ITR_ADAPTIVE_LATENCY) - avg_wire_size >>= 1; - +adjust_for_speed: /* Resultant value is 256 times larger than it needs to be. This * gives us room to adjust the value as needed to either increase * or decrease the value based on link speeds of 10G, 2.5G, 1G, etc. From patchwork Wed Apr 8 03:12:11 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Loktionov, Aleksandr" X-Patchwork-Id: 2220961 X-Patchwork-Delegate: anthony.l.nguyen@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=rKcf8xh5; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4frNlM2WD1z1xy1 for ; Wed, 08 Apr 2026 23:12:31 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 08BD040EB4; Wed, 8 Apr 2026 13:12:27 +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 C4Bw-dbPSbq6; Wed, 8 Apr 2026 13:12:26 +0000 (UTC) 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-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 47DC540EF1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1775653946; bh=fePrukWCaxAlNPDm+teJPRoawh5G3xRlDpw+4zygEjA=; h=From:To:Cc:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=rKcf8xh5qcNTUFiN6YHxBmPSRlaGlBvEkUCmwgPwF0tykrrnhTztuaPl3m6rrym8i w0xGBS1TPF/ES4RibHDI1vZS/XSnaZ6G+H4ZnkKbAn9fwzlqboaJQOBQvF19vwanTf 8Gnx8eb6CbNegzWUGufBTKD2X3bpeEXPDKdIn3gjrXzztr6BZnE4aXmZOaJnv1yQfk WEIWGJ008KnDro7/kdgwPxCJtEdfolb58yGtg5B4iLkHyOtEhX9rUJeqnl0qB8jrwH xfRQ+0jP33JNDgcKQzd17Df1HyJ12fRqVYD3dfZu8Xe8clQDgZyBg+HCaRp0VAgV/K 09i7j1aV3TN0Q== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id 47DC540EF1; Wed, 8 Apr 2026 13:12:26 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists1.osuosl.org (Postfix) with ESMTP id 96B932C7 for ; Wed, 8 Apr 2026 13:12:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 7D32840EF8 for ; Wed, 8 Apr 2026 13:12:24 +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 FH2qnwnd76yA for ; Wed, 8 Apr 2026 13:12:23 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=192.198.163.7; helo=mgamail.intel.com; envelope-from=aleksandr.loktionov@intel.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 6989E40EC1 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 6989E40EC1 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by smtp4.osuosl.org (Postfix) with ESMTPS id 6989E40EC1 for ; Wed, 8 Apr 2026 13:12:23 +0000 (UTC) X-CSE-ConnectionGUID: UR6cP9p8RMyfbyiuNejz/A== X-CSE-MsgGUID: ASbHpyiqRmOaHpj0XSNsZg== X-IronPort-AV: E=McAfee;i="6800,10657,11752"; a="102087269" X-IronPort-AV: E=Sophos;i="6.23,167,1770624000"; d="scan'208";a="102087269" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2026 06:12:23 -0700 X-CSE-ConnectionGUID: uGebgpyLTTCyRtx2CoLyKA== X-CSE-MsgGUID: ycuKtKWZTu6GfRk2TxbdRQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,167,1770624000"; d="scan'208";a="228715079" Received: from amlin-019-225.igk.intel.com ([10.102.19.225]) by orviesa007.jf.intel.com with ESMTP; 08 Apr 2026 06:12:22 -0700 From: Aleksandr Loktionov To: intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com, aleksandr.loktionov@intel.com Cc: netdev@vger.kernel.org Date: Wed, 8 Apr 2026 15:12:11 +0200 Message-ID: <20260408131216.2662245-4-aleksandr.loktionov@intel.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260408131216.2662245-1-aleksandr.loktionov@intel.com> References: <20260408131216.2662245-1-aleksandr.loktionov@intel.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1775653943; x=1807189943; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0eZTH5jLMaLPvyw05d6AwXy0c332K5yiwSJKtS18gg0=; b=SSaOFx5He0LUVnu3K3U/877T2LuxZrFgjXt2kNP6XEbvIrK8c+LQRTRE OZxwLE/2Wnaqe9T1kdx0o854GY4slSPdV5nGcFhVIVvN2pbCgwEJWZoCb OGoiwpW7bwibOsxWLlbJ6ehrspVknZ8paJJDxtbt+Edg8JISfQirPQAUd eGCB0E6wo175Y2wTsMzoWljBm+AK7T3ibQa+T3ucuWomAd4hZ0MWYqeRd 7t0uJPUM0Newa1s2GkFsJ58mo8orP691yIfeSjYLGENFMDqb4k9mMYZ5u 01IU435iCODZYYCOi6NZwMYdbFybxmW55X8PDmnqWiUEXeNXsQ/cLTsQs A==; X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=intel.com X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=SSaOFx5H Subject: [Intel-wired-lan] [PATCH iwl-next v2 3/8] ixgbe: limit ITR decrease in latency mode to prevent ACK overdrive 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-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" From: Alexander Duyck When operating in latency mode and the computed ITR is lower than the current setting, the algorithm can reduce the interrupt rate too aggressively in a single step. For a TCP workload this means the ACK stream (a latency-sensitive, low-packet-rate workload) can drive the moderation down to very high interrupt rates, starving CPU time from the sender side. After the speed-based ITR calculation is complete, check whether the result is in latency mode and would decrease below the current setting. If so, limit the decrease to at most IXGBE_ITR_ADAPTIVE_MIN_INC (2 us) per update. This ensures the number of interrupts grows by no more than 2x per adjustment step for latency-class workloads, dialling in smoothly rather than overshooting. Signed-off-by: Alexander Duyck Signed-off-by: Aleksandr Loktionov Tested-by: Alexander Nowlin --- v1 -> v2: - Split from monolithic ITR cleanup; this patch only adds the 2 us per-step decrease limit for latency-mode workloads. drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index b3f4a72..d7c5e83 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -2888,6 +2888,16 @@ static void ixgbe_update_itr(struct ixgbe_q_vector *q_vector, break; } + /* In the case of a latency specific workload only allow us to + * reduce the ITR by at most 2us. By doing this we should dial + * in so that our number of interrupts is no more than 2x the number + * of packets for the least busy workload. So for example in the case + * of a TCP workload the ACK packets being received would set the + * interrupt rate as they are a latency specific workload. + */ + if ((itr & IXGBE_ITR_ADAPTIVE_LATENCY) && itr < ring_container->itr) + itr = ring_container->itr - IXGBE_ITR_ADAPTIVE_MIN_INC; + clear_counts: /* write back value */ ring_container->itr = itr; From patchwork Wed Apr 8 03:12:12 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Loktionov, Aleksandr" X-Patchwork-Id: 2220960 X-Patchwork-Delegate: anthony.l.nguyen@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=7R0gt1VO; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4frNlK4KVRz1yD6 for ; Wed, 08 Apr 2026 23:12:29 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 42315608DA; Wed, 8 Apr 2026 13:12:28 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id MyAz2biNMZnj; Wed, 8 Apr 2026 13:12:26 +0000 (UTC) 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-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org C28C7608B9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1775653946; bh=TlDQvsw9wa2nRT2kcaM1hqF8VWnZP4cH3KzqxqrEfaE=; h=From:To:Cc:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=7R0gt1VOpUUISv8o0XDyXXcX3NkITLZBKxurWlclZlC2MCR/CrSreRrzEKfDsFJ5P lUTut+bHZr9TVf1nBRGOQRNH8MbLBjv6SfizkY6N+a1rb7LB675MZaSzpUKZEVaMzK KdakO3p+ZFVLHkfvaXZP1iG0K65PaboeqkFrzs5E2fUMQLVwb8q29odivcu4aRD15Y 7euOW5bzMemvAckpSDWV4QSAEapnywdtyniWUuzM+vR5vhSxKJ4mxCACpCOaUxPBXS JCIeY9pVYS1vBzMML31j/bCSfgYyJfZx/uhUFlLutdX9F3nCPY7BsxHuLkYbvyFWFk DX2DY2gmAQ/zA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id C28C7608B9; Wed, 8 Apr 2026 13:12:26 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists1.osuosl.org (Postfix) with ESMTP id 7223C1F6 for ; Wed, 8 Apr 2026 13:12:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 58C9F40EC4 for ; Wed, 8 Apr 2026 13:12:25 +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 DjAMV9JzADBh for ; Wed, 8 Apr 2026 13:12:24 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=192.198.163.7; helo=mgamail.intel.com; envelope-from=aleksandr.loktionov@intel.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org AFB7940EC1 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org AFB7940EC1 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by smtp4.osuosl.org (Postfix) with ESMTPS id AFB7940EC1 for ; Wed, 8 Apr 2026 13:12:24 +0000 (UTC) X-CSE-ConnectionGUID: drzcdRl5SFG9021yhXJ4hQ== X-CSE-MsgGUID: C2f/b5xdSuS5ZKZs6EKm3A== X-IronPort-AV: E=McAfee;i="6800,10657,11752"; a="102087271" X-IronPort-AV: E=Sophos;i="6.23,167,1770624000"; d="scan'208";a="102087271" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2026 06:12:24 -0700 X-CSE-ConnectionGUID: NJ9yPvteQTKjL6xVMcgY+A== X-CSE-MsgGUID: 5POLM2duRceF21fFxT21nw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,167,1770624000"; d="scan'208";a="228715090" Received: from amlin-019-225.igk.intel.com ([10.102.19.225]) by orviesa007.jf.intel.com with ESMTP; 08 Apr 2026 06:12:24 -0700 From: Aleksandr Loktionov To: intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com, aleksandr.loktionov@intel.com Cc: netdev@vger.kernel.org Date: Wed, 8 Apr 2026 15:12:12 +0200 Message-ID: <20260408131216.2662245-5-aleksandr.loktionov@intel.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260408131216.2662245-1-aleksandr.loktionov@intel.com> References: <20260408131216.2662245-1-aleksandr.loktionov@intel.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1775653945; x=1807189945; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=BWYev73HaJSnzrEAnlgrwJYbkkFT02+lBiRDnD08l2M=; b=YzrdjmExP+7QwpMcjQRUyzJ3u9mHQzobrCIGAcHUoYzbAU+45mN3JZs3 XCKyIx/GdkDOkf78I80vbyCMkgPeJ+2VJWWl7bMmgzsReltQEfa5kkMhS IXMcjs2YD5sXRsQokvJOyBElFCwm35GoyP5aLeqL2p4ECsmlRrepw4sum pdQDJ0hwkpbPcqyGe3qIkHZCxCqnDy7y3fba5Dfba4GZOhIkmFeN5UvSr riZlYYCAEbYO2z0TfwcHm+0U6ZA+yPyqn1B/ImTR5kTw4n0XcCYlDktHr YofOMCnV3exBn3+G6QKOnlcp9SHnE4uAfDCHOlF4TifkIfOkgdzUY1voN A==; X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=intel.com X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=YzrdjmEx Subject: [Intel-wired-lan] [PATCH iwl-next v2 4/8] ixgbe: add IXGBE_ITR_ADAPTIVE_MASK_USECS constant 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-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" From: Alexander Duyck ixgbe_set_itr() clears the mode flag (IXGBE_ITR_ADAPTIVE_LATENCY, bit 7) with the open-coded complement expression ~IXGBE_ITR_ADAPTIVE_LATENCY. This is equivalent to keeping only bits [6:0], i.e. the usecs sub-field. Add IXGBE_ITR_ADAPTIVE_MASK_USECS = IXGBE_ITR_ADAPTIVE_LATENCY - 1 = 0x7F to name this mask explicitly and replace the open-coded AND-NOT operation with the cleaner AND form. The two expressions are arithmetically identical; the change improves readability. Signed-off-by: Alexander Duyck Signed-off-by: Aleksandr Loktionov Tested-by: Alexander Nowlin --- v1 -> v2: - Split from monolithic ITR cleanup; this patch only adds the IXGBE_ITR_ADAPTIVE_MASK_USECS constant and updates ixgbe_set_itr(). drivers/net/ethernet/intel/ixgbe/ixgbe.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h index b3f4d21..c704cc6 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h @@ -475,6 +475,7 @@ static inline unsigned int ixgbe_rx_pg_order(struct ixgbe_ring *ring) #define IXGBE_ITR_ADAPTIVE_MAX_USECS 84 #define IXGBE_ITR_ADAPTIVE_LATENCY 0x80 #define IXGBE_ITR_ADAPTIVE_BULK 0x00 +#define IXGBE_ITR_ADAPTIVE_MASK_USECS (IXGBE_ITR_ADAPTIVE_LATENCY - 1) struct ixgbe_ring_container { struct ixgbe_ring *ring; /* pointer to linked list of rings */ diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index d7c5e83..1885fe8 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -2960,7 +2960,7 @@ static void ixgbe_set_itr(struct ixgbe_q_vector *q_vector) new_itr = min(q_vector->rx.itr, q_vector->tx.itr); /* Clear latency flag if set, shift into correct position */ - new_itr &= ~IXGBE_ITR_ADAPTIVE_LATENCY; + new_itr &= IXGBE_ITR_ADAPTIVE_MASK_USECS; new_itr <<= 2; if (new_itr != q_vector->itr) { From patchwork Wed Apr 8 03:12:13 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Loktionov, Aleksandr" X-Patchwork-Id: 2220962 X-Patchwork-Delegate: anthony.l.nguyen@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=NxQ4g3hy; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) 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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4frNlP6wB4z1xy1 for ; Wed, 08 Apr 2026 23:12:33 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 770AE40F2C; Wed, 8 Apr 2026 13:12:29 +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 xKl4TDR8f_jG; Wed, 8 Apr 2026 13:12:28 +0000 (UTC) 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-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org B6F5E40F1F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1775653948; bh=Tk98gFi1G4Cc60/OkMoHNdw7FjA9PdLmLGQkbABHMfU=; h=From:To:Cc:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=NxQ4g3hyQQAOZQuSdzEehS0+eV00zigoPduX91uopCpj/YXwEtTFN7QKGc6u4i/Ph OZWM//EEc1nQU/WdJGt6bOyloJhdly+keQ8uv9FHXOJqmEixRbMCihCKY8IZoA/DOO lsxlcgM9Ibx3ZnO0j52uBHhNz8f2AA7PNZaevTPyKUmhZ0/num5TPeGH/EM4HLIOat X0mYly83mUs5f3kEukaF97dCrRMuRyFNokriVr4U3xMjV/Ttonw61FlSlZlb0O5jA9 jZFGEy5Ap3DiHgTjxCnlpRz6fAfhbW0oKAd1AAVUheoEKhRUEadgDw34NMI+ls7U0Z oxzRxoeMoFFwA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id B6F5E40F1F; Wed, 8 Apr 2026 13:12:28 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists1.osuosl.org (Postfix) with ESMTP id 4C90D2C7 for ; Wed, 8 Apr 2026 13:12:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 3EF6D40F1F for ; Wed, 8 Apr 2026 13:12:27 +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 EmUfROixAEHR for ; Wed, 8 Apr 2026 13:12:26 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=192.198.163.7; helo=mgamail.intel.com; envelope-from=aleksandr.loktionov@intel.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 3335940ECD DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 3335940ECD Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by smtp4.osuosl.org (Postfix) with ESMTPS id 3335940ECD for ; Wed, 8 Apr 2026 13:12:26 +0000 (UTC) X-CSE-ConnectionGUID: W6Xc9Un5SxqVAlfjHPeHsw== X-CSE-MsgGUID: MgsjarmIQmOB5/HodFeOQA== X-IronPort-AV: E=McAfee;i="6800,10657,11752"; a="102087283" X-IronPort-AV: E=Sophos;i="6.23,167,1770624000"; d="scan'208";a="102087283" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2026 06:12:26 -0700 X-CSE-ConnectionGUID: +B6SeTRFSZyabaTTLmNT2g== X-CSE-MsgGUID: rX3SN5HwTG+tC10sUiu4Og== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,167,1770624000"; d="scan'208";a="228715100" Received: from amlin-019-225.igk.intel.com ([10.102.19.225]) by orviesa007.jf.intel.com with ESMTP; 08 Apr 2026 06:12:25 -0700 From: Aleksandr Loktionov To: intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com, aleksandr.loktionov@intel.com Cc: netdev@vger.kernel.org Date: Wed, 8 Apr 2026 15:12:13 +0200 Message-ID: <20260408131216.2662245-6-aleksandr.loktionov@intel.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260408131216.2662245-1-aleksandr.loktionov@intel.com> References: <20260408131216.2662245-1-aleksandr.loktionov@intel.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1775653946; x=1807189946; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Kqq495al0fixHxITQwzw8FJCfkmaTNXmJ8mDt7IdcGo=; b=OfQoJFkFzV+tvpr3sX1CUS3DTFB67Ys8v/aLlr2pvBBejcQsgFBtCtuq JCXLDqFVn9zGjbJHfxBqonYOSVcFSaX6rnhXNfrsky7ywvciqj2p2JVwr L2ARAilihZVHl6grG94Y6WSXCjgqP3U2pd0yDDuMaGMis0Obp3x4pAccn Qx4XKsj19VpvlWNCGfedZAt3b9CQp5zXdShOkPhKGE0r89lHZO9c+a25A I2p3rX5X/sgDREcQAZZyzJIYYHLxkGcfLi3SScYsJEkKxGK+t7NRTUNY6 jPbU9mBQV/GVhEnrWFGSi+HefXUxjoYnb95RzURuEeqqMs3VBcKE9hWtw g==; X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=intel.com X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=OfQoJFkF Subject: [Intel-wired-lan] [PATCH iwl-next v2 5/8] ixgbe: remove ixgbe_ping_all_vfs() from link state change handlers 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-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" When multiple VFs are brought up simultaneously, a VF can receive a CTS (Clear To Send) mailbox message instead of the expected RESET | (N)ACK response, because the watchdog fires a gratuitous ping right as the VF mailbox transaction is in progress. Remove the ixgbe_ping_all_vfs() call from both ixgbe_watchdog_link_is_up() and ixgbe_watchdog_link_is_down(). Both paths contain an identical call with the same race window during VF initialization: link-state changes (up or down) can arrive while VFs are mid-initialization, and the gratuitous ping from either direction collides with the VF mailbox state machine for the same reason. Link-state changes are already communicated to VFs through the normal mailbox protocol; these extra pings are redundant on both paths. Suggested-by: Sebastian Basierski Signed-off-by: Aleksandr Loktionov Tested-by: Alexander Nowlin --- v1 -> v2: - Extend fix to also remove ixgbe_ping_all_vfs() from ixgbe_watchdog_link_is_down(), which carries the same race window; justifies the asymmetry by eliminating it. drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 1885fe8..7c3d821 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -8151,9 +8151,6 @@ static void ixgbe_watchdog_link_is_up(struct ixgbe_adapter *adapter) /* update the default user priority for VFs */ ixgbe_update_default_up(adapter); - - /* ping all the active vfs to let them know link has changed */ - ixgbe_ping_all_vfs(adapter); } /** @@ -8183,8 +8180,5 @@ static void ixgbe_watchdog_link_is_down(struct ixgbe_adapter *adapter) e_info(drv, "NIC Link is Down\n"); netif_carrier_off(netdev); - - /* ping all the active vfs to let them know link has changed */ - ixgbe_ping_all_vfs(adapter); } static bool ixgbe_ring_tx_pending(struct ixgbe_adapter *adapter) From patchwork Wed Apr 8 03:12:14 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Loktionov, Aleksandr" X-Patchwork-Id: 2220963 X-Patchwork-Delegate: anthony.l.nguyen@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=N3Q7aC+U; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4frNlQ6zmmz1xy1 for ; Wed, 08 Apr 2026 23:12:34 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 19903608DA; Wed, 8 Apr 2026 13:12:33 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id nI2UwbW_PQVW; Wed, 8 Apr 2026 13:12:32 +0000 (UTC) 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-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 4E870608B9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1775653952; bh=pIFuscr72qPDs3DW2YOyHofqnoY1TrWnFCo6XwYOZlQ=; h=From:To:Cc:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=N3Q7aC+UGVsJXJTiiR5/oDVIALPC4/tz+qpLNcHlxgz0w7ERWHHEXQrGxqwSD8yuT 6WUksCNWvzkbj2J32zdmORUM5J6SXsXojtuDecBppzyBfxA34uK5p6Zk8FotBIS/UH cp0AmCIJ+lWaiAW0QOE90zSJYqYqTEsKmtY95R5oSdZT+fq04OZa8j38oKNdcM5WwS njAcDF9eJio/77P5ePXWgmSDKXwiPat0nIsafyMErzOulgwH81vOT9j22iiC8f2aHZ 0ojkw7Q2Q0KSB9bYBecnmYtAUHlsa7KvXw0N1JIk5B1HX1feO6jyK6ApHj1DA1GsQd N7wd8rD9rfd8g== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id 4E870608B9; Wed, 8 Apr 2026 13:12:32 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists1.osuosl.org (Postfix) with ESMTP id 063042C7 for ; Wed, 8 Apr 2026 13:12:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id EC84940F28 for ; Wed, 8 Apr 2026 13:12:28 +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 qzQkGV9E-amQ for ; Wed, 8 Apr 2026 13:12:28 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=192.198.163.7; helo=mgamail.intel.com; envelope-from=aleksandr.loktionov@intel.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org EE4FC40EC4 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org EE4FC40EC4 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by smtp4.osuosl.org (Postfix) with ESMTPS id EE4FC40EC4 for ; Wed, 8 Apr 2026 13:12:27 +0000 (UTC) X-CSE-ConnectionGUID: QBmU0s0DRrmUEL+fyFj5Dw== X-CSE-MsgGUID: xWYRkO9NSnSXctZSjrGuKw== X-IronPort-AV: E=McAfee;i="6800,10657,11752"; a="102087288" X-IronPort-AV: E=Sophos;i="6.23,167,1770624000"; d="scan'208";a="102087288" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2026 06:12:28 -0700 X-CSE-ConnectionGUID: bIcCOUscSTK6IFHvfTvbYA== X-CSE-MsgGUID: drH3t9zmTdiNJw2uTdWSTA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,167,1770624000"; d="scan'208";a="228715105" Received: from amlin-019-225.igk.intel.com ([10.102.19.225]) by orviesa007.jf.intel.com with ESMTP; 08 Apr 2026 06:12:26 -0700 From: Aleksandr Loktionov To: intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com, aleksandr.loktionov@intel.com Cc: netdev@vger.kernel.org, Jacob Keller , Marcin Szycik , Simon Horman Date: Wed, 8 Apr 2026 15:12:14 +0200 Message-ID: <20260408131216.2662245-7-aleksandr.loktionov@intel.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260408131216.2662245-1-aleksandr.loktionov@intel.com> References: <20260408131216.2662245-1-aleksandr.loktionov@intel.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1775653948; x=1807189948; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=GraGK+5jYTqk03FZotLtS7Brb5Ynw8+no2h6/cXf4ww=; b=h5f4OTrlTFiZQW9qNYjRxwrDKPw9O3ilopeXwcKn4sILRBbjEq70/yFC HJBXspl92cG9vohzFAD3qXpqkIe4Auwsq7+hANA/0IJGPpl1BGymTZ2Kt pw/BzbTgBtHHX0NaGtjDggydfH9ubfiyBxewogdoVGVOyu1Cnm4GAHVn4 eW2H6Sl6YIVtCapVaM7yZVHXD4X7k6XSc7ZedLGic4Eoj+yGka3XfLQZQ guKNcDFjySkwfz4AUZ7VN2j4MZJu+UXCMDW/YJLEPiKcNKGBE11KgIeI2 10OzldD9mbwSxJ+OgBan25aYGbzlqfzhe6QvzAcOsgPAKDMzN4NQUdAJA g==; X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=intel.com X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=h5f4OTrl Subject: [Intel-wired-lan] [PATCH iwl-next v2 6/8] ixgbe: use ktime_get_real_ns() in ixgbe_ptp_reset() 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-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" From: Jacob Keller Replace ktime_to_ns(ktime_get_real()) with the direct equivalent ktime_get_real_ns() in ixgbe_ptp_reset(). Using the combined helper avoids the unnecessary intermediate ktime_t variable and makes the intent clearer. Signed-off-by: Jacob Keller Signed-off-by: Aleksandr Loktionov Reviewed-by: Marcin Szycik Reviewed-by: Simon Horman Tested-by: Alexander Nowlin --- v1 -> v2: - Carry Reviewed-by: Simon Horman from reply email; add [N/M] numbering; no code change. drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c index 6885d23..a7d1635 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c @@ -1347,7 +1347,7 @@ void ixgbe_ptp_reset(struct ixgbe_adapter *adapter) spin_lock_irqsave(&adapter->tmreg_lock, flags); timecounter_init(&adapter->hw_tc, &adapter->hw_cc, - ktime_to_ns(ktime_get_real())); + ktime_get_real_ns()); spin_unlock_irqrestore(&adapter->tmreg_lock, flags); adapter->last_overflow_check = jiffies; From patchwork Wed Apr 8 03:12:15 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Loktionov, Aleksandr" X-Patchwork-Id: 2220964 X-Patchwork-Delegate: anthony.l.nguyen@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=8wXrhQfc; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4frNlS2jVSz1xy1 for ; Wed, 08 Apr 2026 23:12:36 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 9C4C340F35; Wed, 8 Apr 2026 13:12:33 +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 pt4x2DOTwt6W; Wed, 8 Apr 2026 13:12:33 +0000 (UTC) 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-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org F003740EE7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1775653953; bh=g795r66mupsBYpuxsAo/BX4+Ayy0KA03TRoJzlsLIrU=; h=From:To:Cc:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=8wXrhQfciWq7yaqvqXFGQ++liXAT23hZIdpVgezDTc+zNiEhb7rytka2JSnNiUfB7 40ujlWy4RYlPAKt9jyCC9VuzQAIunhLnkOftq6nTKtjP/lHiLHk/TkORayKGcHBRDX MeOiQ2W+uf/xNJc0ALGt4/O+Ie6VNswpe06qp9SFadGR9CzbY1a7k0vf6hcHMsOslN qtm6/3G+KCv2k/UPAdrGP5jco5Z/LtumEaHrrDXPmMuTBC7GG8rlz5WDcKJl0IM3GL ItJtXcgoArLZNxKWLfDO7PUtqHtffjyXGa8auJu0LdQkEn16bdviZsrKHxEX3Jt+El B/jwbpsUOBllQ== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id F003740EE7; Wed, 8 Apr 2026 13:12:32 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists1.osuosl.org (Postfix) with ESMTP id 94DF21F6 for ; Wed, 8 Apr 2026 13:12:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 870C240EC4 for ; Wed, 8 Apr 2026 13:12:30 +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 GUM3FEJyOwOB for ; Wed, 8 Apr 2026 13:12:29 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=192.198.163.7; helo=mgamail.intel.com; envelope-from=aleksandr.loktionov@intel.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 6378840F28 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 6378840F28 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by smtp4.osuosl.org (Postfix) with ESMTPS id 6378840F28 for ; Wed, 8 Apr 2026 13:12:29 +0000 (UTC) X-CSE-ConnectionGUID: ji7YlMfSQSa5uZn28ncOpw== X-CSE-MsgGUID: KlfhkOS8QeCeGpICdFMG4g== X-IronPort-AV: E=McAfee;i="6800,10657,11752"; a="102087294" X-IronPort-AV: E=Sophos;i="6.23,167,1770624000"; d="scan'208";a="102087294" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2026 06:12:29 -0700 X-CSE-ConnectionGUID: h48jsidKQoqks8MOKZ6mcA== X-CSE-MsgGUID: cREK8HQZRy+6gxdS8cwHug== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,167,1770624000"; d="scan'208";a="228715113" Received: from amlin-019-225.igk.intel.com ([10.102.19.225]) by orviesa007.jf.intel.com with ESMTP; 08 Apr 2026 06:12:28 -0700 From: Aleksandr Loktionov To: intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com, aleksandr.loktionov@intel.com Cc: netdev@vger.kernel.org Date: Wed, 8 Apr 2026 15:12:15 +0200 Message-ID: <20260408131216.2662245-8-aleksandr.loktionov@intel.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260408131216.2662245-1-aleksandr.loktionov@intel.com> References: <20260408131216.2662245-1-aleksandr.loktionov@intel.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1775653949; x=1807189949; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=K/cZlAHeWG54SXemvsMzndeB7VbEIshlUtv2sGqdCik=; b=PckbANkjqJPtSeDiwco2VR+XOzb92jfA6K6oPxGaDrvNsVci0vtGAPFF em2YniKUHt+kHOLqb7dfEhuqGEgK3rkcxAeFhqEuIpwUYscud0yLI3077 brCor2+32T2KDQlZjdDm315byy8QTNyMDBWky18UWKEsnEdF/cP12MvqQ B/SZ4f7YSQwdQblnRC1Y4hFxpc4XHbNniEDdNDDjU6EDvCOqBsTmv+3WJ s/ShQPQD+ZGMdkyl1IqzwiRzRNGwhPSY4Y1DQ/g/BUOEdY54dG4QHTERs oO5Oh52F/vKtdBWJ4PLP6bAQ/FGpE4+nZmdNmDSWaWu6lGfJYI7P0Zvs/ Q==; X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=intel.com X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=PckbANkj Subject: [Intel-wired-lan] [PATCH iwl-next v2 7/8] ixgbe: use GFP_KERNEL in ixgbe_fcoe_ddp_setup() 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-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" ixgbe_fcoe_ddp_setup() is always called from process context (FCoE offload setup paths) and never from an atomic context. Using GFP_ATOMIC is therefore unnecessarily restrictive and wastes memory allocator headroom reserved for genuine atomic callers. The previous attempt to change this to GFP_KERNEL placed the allocation inside the get_cpu()/put_cpu() section, which disables preemption. GFP_KERNEL can sleep under direct reclaim regardless of whether the caller is in process context, which triggers a BUG() with preemption disabled. Restructure the function to split the get_cpu()/put_cpu() usage into two narrow critical sections: 1. A short initial section that reads the per-CPU pool pointer and validates it, then immediately calls put_cpu() before any allocation. The pool pointer is saved in a local variable for use after the pin is dropped. 2. A second section after the allocation that re-pins the CPU solely to update per-CPU counters (noddp, noddp_ext_buff) inside the SG loop. The DMA mapping and pool allocation sit between these two sections with preemption enabled, making GFP_KERNEL safe. The pool pointer saved from section 1 remains valid because per-CPU DMA pools are only destroyed during interface teardown under RTNL, not during normal operation. Suggested-by: Sebastian Basierski Signed-off-by: Aleksandr Loktionov Tested-by: Alexander Nowlin --- v1 -> v2: - Move dma_pool_alloc() outside the get_cpu()/put_cpu() section; split into two narrow preempt-off regions so GFP_KERNEL is safe. drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 51 +++++++++++--------- 1 file changed, 35 insertions(+), 18 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c index 011fda9..064ad17 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c @@ -139,6 +139,7 @@ static int ixgbe_fcoe_ddp_setup(struct net_device *netdev, u16 xid, struct ixgbe_fcoe *fcoe; struct ixgbe_fcoe_ddp *ddp; struct ixgbe_fcoe_ddp_pool *ddp_pool; + struct dma_pool *pool; struct scatterlist *sg; unsigned int i, j, dmacount; unsigned int len; @@ -179,29 +180,43 @@ static int ixgbe_fcoe_ddp_setup(struct net_device *netdev, u16 xid, return 0; } + /* Pin to current CPU only to read the per-CPU pool pointer; drop + * the pin before any allocations that may sleep under direct reclaim. + */ ddp_pool = per_cpu_ptr(fcoe->ddp_pool, get_cpu()); if (!ddp_pool->pool) { e_warn(drv, "xid=0x%x no ddp pool for fcoe\n", xid); - goto out_noddp; + put_cpu(); + return 0; } + pool = ddp_pool->pool; + put_cpu(); /* setup dma from scsi command sgl */ dmacount = dma_map_sg(&adapter->pdev->dev, sgl, sgc, DMA_FROM_DEVICE); if (dmacount == 0) { e_err(drv, "xid 0x%x DMA map error\n", xid); - goto out_noddp; + return 0; } - /* alloc the udl from per cpu ddp pool */ - ddp->udl = dma_pool_alloc(ddp_pool->pool, GFP_ATOMIC, &ddp->udp); + /* Allocate from per-CPU pool; GFP_KERNEL is safe: preemption is + * re-enabled after the put_cpu() above. Per-CPU DMA pools are only + * destroyed under RTNL during interface teardown, so the saved pool + * pointer remains valid. + */ + ddp->udl = dma_pool_alloc(pool, GFP_KERNEL, &ddp->udp); if (!ddp->udl) { e_err(drv, "failed allocated ddp context\n"); - goto out_noddp_unmap; + dma_unmap_sg(&adapter->pdev->dev, sgl, sgc, DMA_FROM_DEVICE); + return 0; } - ddp->pool = ddp_pool->pool; + ddp->pool = pool; ddp->sgl = sgl; ddp->sgc = sgc; + /* Re-pin CPU for per-CPU statistics updates inside the SG loop. */ + ddp_pool = per_cpu_ptr(fcoe->ddp_pool, get_cpu()); + j = 0; for_each_sg(sgl, sg, dmacount, i) { addr = sg_dma_address(sg); @@ -210,7 +225,8 @@ static int ixgbe_fcoe_ddp_setup(struct net_device *netdev, u16 xid, /* max number of buffers allowed in one DDP context */ if (j >= IXGBE_BUFFCNT_MAX) { ddp_pool->noddp++; - goto out_noddp_free; + put_cpu(); + goto out_noddp_free_unmap; } /* get the offset of length of current buffer */ @@ -220,16 +236,20 @@ static int ixgbe_fcoe_ddp_setup(struct net_device *netdev, u16 xid, * all but the 1st buffer (j == 0) * must be aligned on bufflen */ - if ((j != 0) && (thisoff)) - goto out_noddp_free; + if (j != 0 && thisoff) { + put_cpu(); + goto out_noddp_free_unmap; + } /* * all but the last buffer * ((i == (dmacount - 1)) && (thislen == len)) * must end at bufflen */ - if (((i != (dmacount - 1)) || (thislen != len)) - && ((thislen + thisoff) != bufflen)) - goto out_noddp_free; + if ((i != (dmacount - 1) || thislen != len) && + (thislen + thisoff) != bufflen) { + put_cpu(); + goto out_noddp_free_unmap; + } ddp->udl[j] = (u64)(addr - thisoff); /* only the first buffer may have none-zero offset */ @@ -250,14 +270,15 @@ static int ixgbe_fcoe_ddp_setup(struct net_device *netdev, u16 xid, if (lastsize == bufflen) { if (j >= IXGBE_BUFFCNT_MAX) { ddp_pool->noddp_ext_buff++; - goto out_noddp_free; + put_cpu(); + goto out_noddp_free_unmap; } ddp->udl[j] = (u64)(fcoe->extra_ddp_buffer_dma); j++; lastsize = 1; } put_cpu(); fcbuff = (IXGBE_FCBUFF_4KB << IXGBE_FCBUFF_BUFFSIZE_SHIFT); fcbuff |= ((j & 0xff) << IXGBE_FCBUFF_BUFFCNT_SHIFT); @@ -316,14 +337,10 @@ static int ixgbe_fcoe_ddp_setup(struct net_device *netdev, u16 xid, return 1; -out_noddp_free: +out_noddp_free_unmap: dma_pool_free(ddp->pool, ddp->udl, ddp->udp); ixgbe_fcoe_clear_ddp(ddp); - -out_noddp_unmap: dma_unmap_sg(&adapter->pdev->dev, sgl, sgc, DMA_FROM_DEVICE); -out_noddp: - put_cpu(); return 0; } From patchwork Wed Apr 8 03:12:16 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Loktionov, Aleksandr" X-Patchwork-Id: 2220965 X-Patchwork-Delegate: anthony.l.nguyen@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=qIHqdslW; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4frNlV2dywz1xy1 for ; Wed, 08 Apr 2026 23:12:38 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 2EBFD40F27; Wed, 8 Apr 2026 13:12:34 +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 fSt_X7tDo6kz; Wed, 8 Apr 2026 13:12:33 +0000 (UTC) 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-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 82D8C40ECA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1775653953; bh=wsVt+BWRYoW7FtWOKVeV4987lyqjvhvhSPZG/e0+UX0=; h=From:To:Cc:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=qIHqdslW0JwliZ9gJJiAQ4DY4Zm7+c52AdqcV2W/TqR8QV8MIgON6B4OxmnTisw/o 2yMJJSJIUeGvraB2bQxyrDa+xQ2sZQwNss7PP3cHNN9hVBKdnoFrn/AiYel3CyEbGh LwNLS6eo1JoR9PfWjkGcT2mEibL8ldjcOuu5+iU3Hz109L7lNHw8QXLXHg2ztknbjn fk9N2dKbTzcr2qEZo2MnLZiG93zSmS7WXtN4d8a4ZY5QnL6BagVfXtsVXuh48W82eK IVWNkrxks7Dke0wppSJGQtzJyRsJTkjGGwmxc/ogGwlq/h4HcRBO1ak956PiujXJIz VCTWpN8MuTmVg== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id 82D8C40ECA; Wed, 8 Apr 2026 13:12:33 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists1.osuosl.org (Postfix) with ESMTP id 30E422C7 for ; Wed, 8 Apr 2026 13:12:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 166E340EE7 for ; Wed, 8 Apr 2026 13:12: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 b3mRfIFOQvZM for ; Wed, 8 Apr 2026 13:12:31 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=192.198.163.7; helo=mgamail.intel.com; envelope-from=aleksandr.loktionov@intel.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 249A640EC4 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 249A640EC4 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by smtp4.osuosl.org (Postfix) with ESMTPS id 249A640EC4 for ; Wed, 8 Apr 2026 13:12:31 +0000 (UTC) X-CSE-ConnectionGUID: UArAXaSfQnez4BPkddPPLw== X-CSE-MsgGUID: SKN/gmEpQZidqS10nJEW/g== X-IronPort-AV: E=McAfee;i="6800,10657,11752"; a="102087299" X-IronPort-AV: E=Sophos;i="6.23,167,1770624000"; d="scan'208";a="102087299" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2026 06:12:31 -0700 X-CSE-ConnectionGUID: KnQNf1VbReiLKVuzPvE/tg== X-CSE-MsgGUID: PnM6zYYXS8K5ZkkPwLKTsQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,167,1770624000"; d="scan'208";a="228715125" Received: from amlin-019-225.igk.intel.com ([10.102.19.225]) by orviesa007.jf.intel.com with ESMTP; 08 Apr 2026 06:12:30 -0700 From: Aleksandr Loktionov To: intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com, aleksandr.loktionov@intel.com Cc: netdev@vger.kernel.org, Simon Horman Date: Wed, 8 Apr 2026 15:12:16 +0200 Message-ID: <20260408131216.2662245-9-aleksandr.loktionov@intel.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260408131216.2662245-1-aleksandr.loktionov@intel.com> References: <20260408131216.2662245-1-aleksandr.loktionov@intel.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1775653951; x=1807189951; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qSs/6cxPK78CVLwR3TsPdb+AwFgYd6qJdHXW2+qXedc=; b=BGgdxmu5tNzI148KpFgBAUIph2JCVcMj5r8orjgU1sOXcfdYGjGaoEjz cSakOlGnogRpjABF4abpV8rmkoqoNxiagIgtO0xoC64eJmh2+/82FGq5z b0KQMiZOsO7goL2BtwyD3fbJYTJyfJlC3pBNcGrQYXsZbVVUdiumAyiZN 9rA8395f70f2idr6dNjqF4AGZ4xBQy0KdHtPexzqyOtVUtpXVCqBTshX3 cVsvA8T4d7aEObBzng5pAhoCXL+afh4ETgwM4fy4tUt/OzoWrzbjzgRi0 Wfc9xQlfZjCm/mNOc7UH+jj8bI4/wRkXwe0t/FPHY/LF9W/gnAWzTUMnW A==; X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=intel.com X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=BGgdxmu5 Subject: [Intel-wired-lan] [PATCH iwl-next v2 8/8] ixgbe: use int instead of u32 for error code variables 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-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" The variables used to store return values of kernel and driver functions throughout the ixgbe driver are declared as u32 in several places. Such functions return negative errno values on error (e.g. -EIO, -EFAULT), which are sign-extended negative integers. Storing them in an unsigned u32 silently wraps the value: -EIO (0xFFFFFFF7) stored in u32 becomes a large positive number, so any "if (status)" truthiness check still works by accident, but comparisons against specific negative error codes or propagation up the call stack produce wrong results. In the Linux kernel, u32 is reserved for fixed-width quantities used in hardware interfaces or protocol structures. Using it for generic error codes misleads reviewers into thinking the value is hardware-constrained. Change all such local variables from u32 to int driver-wide: one in ixgbe_main.c (ixgbe_resume), three in ixgbe_phy.c (ixgbe_identify_phy_generic, ixgbe_tn_check_overtemp, ixgbe_set_copper_phy_power), and six in ixgbe_x550.c (ixgbe_check_link_t_X550em, ixgbe_get_lasi_ext_t_x550em, ixgbe_enable_lasi_ext_t_x550em, ixgbe_handle_lasi_ext_t_x550em, ixgbe_ext_phy_t_x550em_get_link, ixgbe_setup_internal_phy_t_x550em). No functional change. Reviewed-by: Simon Horman Signed-off-by: Aleksandr Loktionov Tested-by: Alexander Nowlin --- v1 -> v2: - Carry Reviewed-by: Simon Horman from the IWL posting; add [N/M] numbering; no code change. drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 6 +++--- drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index ed5b75b..99cfccd 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -7531,7 +7531,7 @@ static int ixgbe_resume(struct device *dev_d) struct pci_dev *pdev = to_pci_dev(dev_d); struct ixgbe_adapter *adapter = pci_get_drvdata(pdev); struct net_device *netdev = adapter->netdev; - u32 err; + int err; adapter->hw.hw_addr = adapter->io_addr; diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c index ab733e7..de8f6c6 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c @@ -262,7 +262,7 @@ static bool ixgbe_probe_phy(struct ixgbe_hw *hw, u16 phy_addr) **/ int ixgbe_identify_phy_generic(struct ixgbe_hw *hw) { - u32 status = -EFAULT; + int status = -EFAULT; u32 phy_addr; if (!hw->phy.phy_semaphore_mask) { @@ -2811,7 +2811,7 @@ static void ixgbe_i2c_bus_clear(struct ixgbe_hw *hw) bool ixgbe_tn_check_overtemp(struct ixgbe_hw *hw) { u16 phy_data = 0; - u32 status; + int status; if (hw->device_id != IXGBE_DEV_ID_82599_T3_LOM) return false; @@ -2831,7 +2831,7 @@ bool ixgbe_tn_check_overtemp(struct ixgbe_hw *hw) **/ int ixgbe_set_copper_phy_power(struct ixgbe_hw *hw, bool on) { - u32 status; + int status; u16 reg; /* Bail if we don't have copper phy */ diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c index 76d2fa3..9b14f3b 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c @@ -1911,7 +1911,7 @@ static int ixgbe_check_link_t_X550em(struct ixgbe_hw *hw, bool *link_up, bool link_up_wait_to_complete) { - u32 status; + int status; u16 i, autoneg_status; if (hw->mac.ops.get_media_type(hw) != ixgbe_media_type_copper) @@ -2330,7 +2330,7 @@ static int ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw, static int ixgbe_get_lasi_ext_t_x550em(struct ixgbe_hw *hw, bool *lsc, bool *is_overtemp) { - u32 status; + int status; u16 reg; *is_overtemp = false; @@ -2418,7 +2418,7 @@ static int ixgbe_get_lasi_ext_t_x550em(struct ixgbe_hw *hw, bool *lsc, static int ixgbe_enable_lasi_ext_t_x550em(struct ixgbe_hw *hw) { bool lsc, overtemp; - u32 status; + int status; u16 reg; /* Clear interrupt flags */ @@ -2512,7 +2512,7 @@ static int ixgbe_handle_lasi_ext_t_x550em(struct ixgbe_hw *hw, { struct ixgbe_phy_info *phy = &hw->phy; bool lsc; - u32 status; + int status; status = ixgbe_get_lasi_ext_t_x550em(hw, &lsc, is_overtemp); if (status) @@ -2606,7 +2606,7 @@ static int ixgbe_setup_kr_x550em(struct ixgbe_hw *hw) **/ static int ixgbe_ext_phy_t_x550em_get_link(struct ixgbe_hw *hw, bool *link_up) { - u32 ret; + int ret; u16 autoneg_status; *link_up = false; @@ -2642,7 +2642,7 @@ static int ixgbe_setup_internal_phy_t_x550em(struct ixgbe_hw *hw) { ixgbe_link_speed force_speed; bool link_up; - u32 status; + int status; u16 speed; if (hw->mac.ops.get_media_type(hw) != ixgbe_media_type_copper)