Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3543375pxb; Mon, 4 Apr 2022 20:38:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziuLdVo7LgwGVKZVu7UWm/R+PBzdc43AVg3cS8zsYDelXIj2gE8/OzilqdUhi7JgI6SUlK X-Received: by 2002:a05:6a00:1d85:b0:4fa:9dba:f1f2 with SMTP id z5-20020a056a001d8500b004fa9dbaf1f2mr1586032pfw.31.1649129903950; Mon, 04 Apr 2022 20:38:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649129903; cv=none; d=google.com; s=arc-20160816; b=RSxwRygjswE4Mxf9gdzLdbCE49/CyUcJm11mqvx04EKSxmGnQK9jNXMlh5bBd8lvnk +lxtbKUY3GR0DLv9koojV2tVZL6sZxIktog3vg51Nab0oMdsIGuvoUhpr8V08htS8kE+ 98C/ar9w43C+V6ZZr3XpohtZTovrZ0uQIJroE3Xoy9CTtkMH+H8R2sc5UdP63hi3PWrH zvsWwLhDNRVWfTpQd5/37HUBFACQEj+klDAR93zfrL55E3jmUXwqnVDqdZk6+zkobNZk Uq6rVyrj0+gPmwJbn/1G/fHHbhbOAoBN19tWKFQjLoDDrFsG+OpJoh4xj5nB/kvdge6c OYuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vFi7yXUyhEvuyEPAaB5PJBj31x6UAMrx11hHIwLpdNw=; b=rf+tGtFPN86n6FtT8RPLyULCciLKKzOa5qidzKTyjc7xUHnsrNYXbH7i/F7H4lO0H4 HH2mKcNPddheBA8XuYp14eCN1JQcroQsU71EM/PWjks0syh+MwpkRq0fH4Q+esKSNvFG xTZZleEnMHnhqFXjBcX8PMPClPKzppKauif015t0Ta0A3+YCBB8iFvSPkeRFtlj+9Ycd b9dzpBVbfoJESADQ9YOeggxE43VZmqfBUE64fcLXQd9VmE3HKpDm1begnzAJGUuP0ax3 bnyFum3BpiUaWX8dw802YqfFTnzGO5wQQX0a8minKItjrGzDgi1+qDx2l9R+kiRZ5YaW qt5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=dc6JR3Kh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q17-20020a17090311d100b00153d7a34fb2si13320106plh.43.2022.04.04.20.38.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 20:38:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=dc6JR3Kh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EA39A42E91E; Mon, 4 Apr 2022 18:51:44 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358296AbiDDPHP (ORCPT + 99 others); Mon, 4 Apr 2022 11:07:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236667AbiDDPHN (ORCPT ); Mon, 4 Apr 2022 11:07:13 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [176.9.125.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57F2024F30; Mon, 4 Apr 2022 08:05:17 -0700 (PDT) Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 167CF221D4; Mon, 4 Apr 2022 17:05:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1649084714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vFi7yXUyhEvuyEPAaB5PJBj31x6UAMrx11hHIwLpdNw=; b=dc6JR3Kh1Ky3QpzM5AVH203vP79qpSRIe0/7KFPStc93uVzLA6hMlEPEl7+mjlOxUUQm5N s9pNBuWORJiOmTMckn+4ooQE8mRVMNiYtpgDX5TFNKNcHP/PVUlWNuQAxyqLeNzAafgFs1 9HQ+CQBtpNZYNCqrUyrqASCM2kV4p6Q= From: Michael Walle To: richardcochran@gmail.com Cc: andrew@lunn.ch, davem@davemloft.net, grygorii.strashko@ti.com, kuba@kernel.org, kurt@linutronix.de, linux-kernel@vger.kernel.org, linux@armlinux.org.uk, mlichvar@redhat.com, netdev@vger.kernel.org, qiangqing.zhang@nxp.com, vladimir.oltean@nxp.com, Michael Walle Subject: Re: [PATCH RFC V1 net-next 3/4] net: Let the active time stamping layer be selectable. Date: Mon, 4 Apr 2022 17:05:08 +0200 Message-Id: <20220404150508.3945833-1-michael@walle.cc> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220104014215.GA20062@hoboy.vegasvil.org> References: <20220104014215.GA20062@hoboy.vegasvil.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Sorry for digging out this older thread, but it seems to be discussed in [1]. > IMO, the default should be PHY because up until now the PHY layer was > prefered. > > Or would you say the MAC layer should take default priority? > > (that may well break some existing systems) Correct me if I'm wrong, but for systems with multiple interfaces, in particular switches, you'd need external circuits to synchronize the PHCs within in the PHYs. (And if you use a time aware scheduler you'd need to synchronize the MAC, too). Whereas for switches there is usually just one PHC in the MAC which just works. On these systems, pushing the timestamping to the PHY would mean that this external circuitry must exist and have to be in use/ supported. MAC timestamping will work in all cases without any external dependencies. I'm working on a board with the LAN9668 switch which has one LAN8814 PHY and two GPY215 PHYs and two internal PHYs. The LAN9668 driver will forward all timestamping ioctls to the PHY if it supports timestamping (unconditionally). As soon as the patches to add ptp support to the LAN8814 will be accepted, I guess it will break the PTP/TAS support because there is no synchronization between all the PHCs on that board. Thus, IMHO MAC timestamping should be the default. -michael [1] https://lore.kernel.org/netdev/20220308145405.GD29063@hoboy.vegasvil.org/