Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2091105lqp; Sun, 24 Mar 2024 02:47:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXC83+ZQl88TKu2A5Ro+4n44M6N8HHCURxQqXA3oZD3UCBWofZ1QxlD6fJpnH8y24iJ3wdKgZCNpiwmlzjzbtfS4FyW1HNdCYQzHP/WMg== X-Google-Smtp-Source: AGHT+IH2keGDvpHsRfzthlBCmjOwKvGg+olKBgh6wSigfZphO7Oe1/TRiw+Tdc3z7mxK7j+IKCho X-Received: by 2002:a50:c014:0:b0:568:d729:a41a with SMTP id r20-20020a50c014000000b00568d729a41amr2788671edb.9.1711273656609; Sun, 24 Mar 2024 02:47:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711273656; cv=pass; d=google.com; s=arc-20160816; b=Ig8+o5PdRipRAePWI+GG3w8pXtssgx2lQOoP9Kw8uWwVE82ZCPFSlGbRZzgsdgy5VQ M8xvUNmoIifXhErGjUcMjefJuVSTslUszpKyXQt1LilDrMNbSlz5VGF9tlLariDGLGLe VevlaCNLT8USsxmVrBLW7uSx0mRhRIGjdw2vOun7nb8ctt5vNj1154ueYCVgph2dnZXD r8/v0VdqVT5xUYYqh2iyi+cx8nJ+MyotfXD2P7HCFhRQQLhhryl4Xdt3eLOaAP9uhZig QHJdBeUFmOAwHWCB+2wtyYSU5oaOgFwMdhVj+vfjpSaLBfrjLl0F++yxIfchdVdH4fE9 VqHw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=f73/Dv7onEyO5WX6ZGZIZmakEQpnxirbQv7vQRZBis4=; fh=iQW+J3akobOmaxjXfZQAdUUFHvwnJuvN9nXbDqvLW58=; b=y4PJ27yyzTJ+iQBObpOiDYwzN8Ufg7MEjlkRU0kr2AP8E9waNvLwaWQnvo7iSQtJDb xDont96oI/F6io1GNWqzbLkhx4xYpQhcNCtz3HvnBooTIzjrshh7OCdTrvZeNS7eTeQI heL6KKWh8qTAOS8yVeMdC8VaocJ4/caawu6hy4JtPypGHdwBHenfTVtgYPi0IEjVcJWN yPOhHf5saEQtRm+/CNz+S8EDCfrkRO5d40MAG78M0YrK8+9DhgvjtFQe2IlqWWVGSvaI 7iQxKzHSzom5erTCk/9qzlw4QANbOU3cB7BWjpe7eMjmQTqSoucfD/eP+3M7Qzpar9h4 epMQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b=U61oCGXp; arc=pass (i=1 spf=pass spfdomain=arinc9.com dkim=pass dkdomain=arinc9.com dmarc=pass fromdomain=arinc9.com); spf=pass (google.com: domain of linux-kernel+bounces-112627-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112627-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a18-20020a05640213d200b0056c0a4978e0si303309edx.193.2024.03.24.02.47.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 02:47:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-112627-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b=U61oCGXp; arc=pass (i=1 spf=pass spfdomain=arinc9.com dkim=pass dkdomain=arinc9.com dmarc=pass fromdomain=arinc9.com); spf=pass (google.com: domain of linux-kernel+bounces-112627-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112627-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 5315E1F21696 for ; Sun, 24 Mar 2024 09:47:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E77F617559; Sun, 24 Mar 2024 09:47:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arinc9.com header.i=@arinc9.com header.b="U61oCGXp" Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6A2316415; Sun, 24 Mar 2024 09:47:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711273646; cv=none; b=i8ZFtqnM9Ns8yOXtsmYSnDPq67hkB/f48y8F7BQg70oi6CX122NvLpLlWfBockIKIGbFMthuFUBOtoHR8lexb8wNVuqtCLFFt/mYIbNj4EgudCBwVgrM6jqSuwUkTsooCpMv83P6UlzMM0Mt1wCKNmNnZNrWj6rf6/ZKAsDE3n8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711273646; c=relaxed/simple; bh=GWj5y/Qc1K9AjsAliy3LtjX0FL9bQH9JNI+Du7zxiQM=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=BCkmWrW02oE8sThkqcB/8FJ6UBMAPM8V2gJP4WBXiWej6NBxf58JP/lwb1oRSHA3qFwOVcyNtvgrltAlU+MqLiVetEXb3l+7D2grcZo5sY9xJ0R8BGPBcpzZZVbgF73kY2oi9cXjXYP6XIJoPMiX4WlVKwv5yaimADtZFxftgpo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arinc9.com; spf=pass smtp.mailfrom=arinc9.com; dkim=pass (2048-bit key) header.d=arinc9.com header.i=@arinc9.com header.b=U61oCGXp; arc=none smtp.client-ip=217.70.183.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arinc9.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arinc9.com Received: by mail.gandi.net (Postfix) with ESMTPSA id D280C40002; Sun, 24 Mar 2024 09:47:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arinc9.com; s=gm1; t=1711273635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=f73/Dv7onEyO5WX6ZGZIZmakEQpnxirbQv7vQRZBis4=; b=U61oCGXpXRQHJIhDTF91TvYBDsLhHB1RxvBJ4BongC/t9IUZixLMFfWJCkbf/I1R9LCTss LbCTa4/lz7pFpk8TTyIuR0FBdkR7Om55Rde9zwnLXpzNZn8+fbxbSmVdAMXxf9CRaYqtSx V+Y6tNLH0IQ2OoAJcGgXEbVhFm0TPnnC+F6UhHZ6yedNXazTppRP9+cB2Yd0NhO8CfVPx/ epUGhMDav2BQrpoQwf9Bnpp1ONpvcZ+pl1KBb4zqii/3a7HaciXiZiSnLfrLIDKcyXEn6e Nihvh1gBioe3f8bjApjJeLZE7uaBXQEkU7ClIYQohmFRSlAElVYXE6FgAdA7Ww== Message-ID: <5a4c0436-cd78-419f-af14-9c4e0c0435e3@arinc9.com> Date: Sun, 24 Mar 2024 12:47:08 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: =?UTF-8?B?QXLEsW7DpyDDnE5BTA==?= Subject: Re: [PATCH 0/3] Fix EEE support for MT7531 and MT7988 SoC switch To: Florian Fainelli , Daniel Golle , Andrew Lunn Cc: DENG Qingfang , Sean Wang , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , =?UTF-8?Q?Ren=C3=A9_van_Dorst?= , Russell King , SkyLake Huang , Heiner Kallweit , Bartel Eerdekens , mithat.guner@xeront.com, erkin.bozoglu@xeront.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org References: <20240318-for-net-mt7530-fix-eee-for-mt7531-mt7988-v> <00ec9779-19ce-4005-83f0-f4abf37350fc@arinc9.com> <6cb585f6-6da8-45a2-a28b-2fb556f95672@lunn.ch> <38798882-c033-4949-9446-4c6f15c25ebe@gmail.com> <0fbe7ba2-6529-4118-b050-8ea76d28b712@arinc9.com> <11b2a4d1-66d8-4bcf-b1a8-20a635b99cc4@gmail.com> Content-Language: en-US In-Reply-To: <11b2a4d1-66d8-4bcf-b1a8-20a635b99cc4@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Flag: yes X-Spam-Level: ************************** X-GND-Spam-Score: 400 X-GND-Status: SPAM X-GND-Sasl: arinc.unal@arinc9.com On 21/03/2024 18:31, Florian Fainelli wrote: > On 3/21/24 09:09, Arınç ÜNAL wrote: >> I have started testing MT7531 with EEE enabled and immediately experienced >> frames that wouldn't egress the switch or improperly received on the link >> partner. >> >> SoC MAC       <-EEE off-> MT7531 P6 MAC (acting as PHY) >> MT7531 P0 MAC <-EEE on -> MT7531 P0 PHY >> MT7531 P0 PHY <-EEE on -> Computer connected with twisted pair > > OK, so this is intended to describe that the SoC's Ethernet MAC link to the integrated switch did not use EEE only the user-facing ports. That makes sense because it's all digital logic and you are not going to be seeing much power saving from having EEE enabled between the SoC's Ethernet MAC and CPU port of the switch, that said, however, I wonder if this has an impact on any form of flow control within the switch that is reacting to LPI and you need EEE to be enabled end-to-end? I've tested pinging between my computers with EEE enabled interfaces. The behaviour is identical. > >> >> I've tested pinging from the SoC's CPU. Packet capturing on the twisted >> pair computer showed very few frames were being received. >> >> # ping 192.168.2.2 >> PING 192.168.2.2 (192.168.2.2): 56 data bytes >> 64 bytes from 192.168.2.2: seq=36 ttl=64 time=0.486 ms >> ^C >> --- 192.168.2.2 ping statistics --- >> 64 packets transmitted, 1 packets received, 98% packet loss >> round-trip min/avg/max = 0.486/0.486/0.486 ms >> >> It seems there's less loss when frames are passed more frequently. > > That would point to an issue getting in and out of LPI, do you see these packet losses even with different LPI timeouts? The NICs on my computers don't seem to allow changing the tx-lpi and tx-timer options. Computer 1 (Intel I219-V, driver: e1000e): $ sudo ethtool --set-eee eno1 tx-timer 15 netlink error: Invalid argument $ sudo ethtool --show-eee eno1 EEE settings for eno1: EEE status: enabled - active Tx LPI: 17 (us) Supported EEE link modes: 100baseT/Full 1000baseT/Full Advertised EEE link modes: 100baseT/Full 1000baseT/Full Link partner advertised EEE link modes: 100baseT/Full 1000baseT/Full Computer 2 (Realtek RTL8111H, driver: r8169): $ sudo ethtool --set-eee eno1 tx-lpi on $ sudo ethtool --show-eee eno1 EEE settings for eno1: EEE status: enabled - active Tx LPI: disabled Supported EEE link modes: 100baseT/Full 1000baseT/Full Advertised EEE link modes: 100baseT/Full 1000baseT/Full Link partner advertised EEE link modes: 100baseT/Full 1000baseT/Full I've tested with switch ports interfaces' tx-timer from 0 to 40, same tx-timer for both interfaces. Loss is still there. I suppose the MT7531 switch PHYs need calibration for EEE that is currently missing from the mediatek-ge driver. Arınç