Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp948987imi; Thu, 21 Jul 2022 14:10:05 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u+vSJ3eewabNnTkBZvpnaQHM9ndBTdOGINNx/YE/XQP/SZz6OtSn6FULMtUFRSogtGyEGG X-Received: by 2002:a17:906:7308:b0:72f:3294:8002 with SMTP id di8-20020a170906730800b0072f32948002mr368168ejc.311.1658437804732; Thu, 21 Jul 2022 14:10:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658437804; cv=none; d=google.com; s=arc-20160816; b=bFq3tS8sByg9LswQKOf3I4Fj+0MKdVSA/9JvOGDjWSVvJQhvHvlWC6JMc4ZTho/DDa Mc1hnviExApnt9wP+mF1GMh2C6bw8GDB/PndAlgoi8T+P8MtnrwUdBgYzWnoJYcvmcSM hUdvWpOXITd8v/dtT7MMEBmcOGGfE72dOwNdkW3OYoaNJdIdmIPqq6gOM4qSdEFTohTQ 04a5BDW/C2rxoBCny7wQjN4ucHOaZUTOg/yFv8C/vW67d3sOVR3KHDZP1UoSdQSmyUtV ho24S3zAXIIkkufDrDIHbYfZ1YHmwO7dsm4CtniQskrXDl0d3u7GVURmfgblQVZAi7Wd AZ4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=VjdhoOSxwUofmsbkQeM/8D+CSkyHvLKN59Rxj/F9hAk=; b=dUxOLbqOnU1kObndkE9T8LgS0IqcgzHO+394V5IUUi7VPTGoDjnuvhByOTG8xrtwgm x+5qi6kZFll2BjYsmavZi6goYQQLz/Zcv/PuMsBg0auiIAcKkPblV57jbC800S59uVqs RJBi5eKR6zyVg24y5XNpvHI97M8zECcyVDT+gISLY5qhLnj3KkeQN/fTKiDHkCFTJyFu iUxK2Wc1XH3qRqEQZUPffkBrjGbwBz9e+v36PCXAYecHN7/0tlkX8SBVgNWD1ebC+1Sl Hzxb640okhW1QJ3KKv6YHrXmHhOV4UZIS/xRMOTe8ZGOlgbxBGjsYVLVp1lctDrXzo8E BpPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=potu6KJK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v22-20020a50a456000000b0043bc62bde9fsi3486705edb.522.2022.07.21.14.09.39; Thu, 21 Jul 2022 14:10:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=potu6KJK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232782AbiGUVGn (ORCPT + 99 others); Thu, 21 Jul 2022 17:06:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232170AbiGUVGl (ORCPT ); Thu, 21 Jul 2022 17:06:41 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC27E140E8; Thu, 21 Jul 2022 14:06:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=VjdhoOSxwUofmsbkQeM/8D+CSkyHvLKN59Rxj/F9hAk=; b=potu6KJKW9LMXDbBhWXEPnrxkY v6wY9K28GB+AntBqQh/V1uy+6LECYWrmIYENogAwFqyz7zMGHvyeliWkdaHKk8Tc2qU+ivB3YPLWC HzM8Ma1btMKrO4p1rXnhY/uy6I9jncN/HWsXyU4knH0Kcox4RQiMSK+olNg3/0t0T/crGgc+cJ/sj 2FdjQabgMNxEIpMVR0JTiQ88ckUgX0JixgbjTE0rYqlFxlFSruyq/MIYy7UMWXYjmNvuyoPOT5KMn XLHIJxD7DHEjQCiCBbojztQY5HTj5qTCnmrMbi55NNjy0ZJ0aD7ssR5Ma9cTnMAEm8gaCWgCD6ky5 AXUb1F/w==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:33492) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oEdNT-0005zq-Ui; Thu, 21 Jul 2022 22:06:35 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1oEdNQ-00059m-5e; Thu, 21 Jul 2022 22:06:32 +0100 Date: Thu, 21 Jul 2022 22:06:32 +0100 From: "Russell King (Oracle)" To: Andrew Lunn Cc: Sean Anderson , netdev@vger.kernel.org, Heiner Kallweit , Alexandru Marginean , Paolo Abeni , "David S . Miller" , linux-kernel@vger.kernel.org, Vladimir Oltean , Eric Dumazet , Jakub Kicinski Subject: Re: [PATCH v2 08/11] net: phylink: Adjust advertisement based on rate adaptation Message-ID: References: <20220719235002.1944800-1-sean.anderson@seco.com> <20220719235002.1944800-9-sean.anderson@seco.com> <3844f2a6-90fb-354e-ce88-0e9ff0a10475@seco.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 21, 2022 at 08:36:03PM +0200, Andrew Lunn wrote: > > I guess it would depend on the structure of the PHY - whether the PHY > > is structured similar to a two port switch internally, having a MAC > > facing the host and another MAC facing the media side. (I believe this > > is exactly how the MACSEC versions of the 88x3310 are structured.) > > > > If you don't have that kind of structure, then I would guess that doing > > duplex adaption could be problematical. > > If you don't have that sort of structure, i think rate adaptation > would have problems in general. Pause is not very fine grained. You > need to somehow buffer packets because what comes from the MAC is > likely to be bursty. And when that buffer overflows, you want to be > selective about what you throw away. You want ARP, OSPF and other > signalling packets to have priority, and user data gets > tossed. Otherwise your network collapses. I don't think rate adaption is that inteligent - it's all about slowing the MAC down to the speed of the media. From what I remember looking at pause frames, they can specify how long to delay further transmission by the receiver, and I would expect this to be set according to the media speed for setups that use pause packets. For those which don't, then that's a whole different ball game, because they tend not to have MACs, and then you're probably down to the capabilities of nothing more than a FIFO in the PHY. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!