Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1221955rwb; Wed, 26 Jul 2023 09:12:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlGOzFafSFOGi6cklI8mwHBm0aRoeHDZBP41yJwelkljslo+4ekGFXgkw8dRbEwhVVh2s+50 X-Received: by 2002:a17:902:c103:b0:1b8:7483:d47a with SMTP id 3-20020a170902c10300b001b87483d47amr1865143pli.37.1690387961920; Wed, 26 Jul 2023 09:12:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690387961; cv=none; d=google.com; s=arc-20160816; b=mSZ8E4X+6fXkFMEE0OhsuUkFxBzM8I0dhbiAsj9st658WHuPWk0eILFl0Q3PRH4aky F3hMwy5OW6uBfYBIb4STH4Z3MQxUb+Tzlv4qw2cEqr6UjhH/QybYOIXI4HGf9ptWbOGJ M8Ntxbr2Y1KnSDxQFeGfrTPVg/4b4+fyH+F+PJDoL8PdZjypJscmybEHpMWoM0wuy8k8 F68cNBXEUGqY/y0V61GTdu5+bRcKKOlCDMTC0kQeSixLZIfCZvIBdxREgc+s9WFBqLga fbehkpiG70LhYmthdjB3jssQ1gOjIwn9NmxaaWtMi3xCocINrqg3uSEusXVvN8LduHdz +g6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=GgFvlAGeua6rkHRPoDyX/+JWDNQ8FgMvtlCof0tD8t4=; fh=Fm+BlfajjtdACQgJk20SBBj7dLPqof+B51z4LnKUt7k=; b=whqbqYj+c8ssGeHzLDLcU14ZSfR0y9JEkHvPhooNRw0crq7PYgYXqfLigONW+lFtHN xyUgGb47A+GAN+L55yXH0jgWnyVgFpDLtzZhEO1nUuQpQ8uXKb+Uv2HG9064BNlVMnQf dUG3tnsVCGpONTnRoA0kIhrXkVCm/JvwLoGBEpm9m0wgsFtcZ00XKGiGo0kXcZ2CzjOs osmfW+EKhAp492lfaV5OFm1ul2+EwZ0tF4DySmLdjud9+v2tMNcPV2n9xiee5xyUoVJ0 IchNradmDwvsiL34wN8D/k93vYdFHsmVOAIiB/X1n2Wyf84pq0o+Dcsig9nhwcuOJ8pG ch4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=RMArvMwJ; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q16-20020a170902dad000b001b89b7aea8fsi2161961plx.493.2023.07.26.09.12.28; Wed, 26 Jul 2023 09:12:41 -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=pass header.i=@gmail.com header.s=20221208 header.b=RMArvMwJ; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234905AbjGZPna (ORCPT + 99 others); Wed, 26 Jul 2023 11:43:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231894AbjGZPn3 (ORCPT ); Wed, 26 Jul 2023 11:43:29 -0400 Received: from mail-oa1-x2d.google.com (mail-oa1-x2d.google.com [IPv6:2001:4860:4864:20::2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 790D3212B; Wed, 26 Jul 2023 08:43:26 -0700 (PDT) Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-1bb6334fec5so360075fac.1; Wed, 26 Jul 2023 08:43:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690386206; x=1690991006; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=GgFvlAGeua6rkHRPoDyX/+JWDNQ8FgMvtlCof0tD8t4=; b=RMArvMwJxEoqM7oM+2jJtH+rbGnNw2G9JiIwJG6hsgAf9RiedtfRmXrb5dmsFNY9UW AHgdI1ToGQr4XBGX2YNwEmtv5r/fMatcmSO1nBwGM9M0rjGJqs/oB8fwrZff4HxAHX8B 00OpQZz+LNjdDZed8f5qjMOvn5NoMIv2SKxlpSGhPoxO8qwnBzROvCqT3P3/dPNvVriz 7vgjeGHAeN1fPuYC+gETeVHmnu9TCJ8DJjZW7sUZkF/SZiwACYE4VaTciKpj+evW0/2s GcXhRmHG9g2+TuOyiFPK9GvuynmwHs63fcWsRqItpiONgSt8c3rh9cA9DcPkAtG6RJ5b IzGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690386206; x=1690991006; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GgFvlAGeua6rkHRPoDyX/+JWDNQ8FgMvtlCof0tD8t4=; b=BIRY17/XX87LYSY15qMLhSTbR+9Yylwzu9Ytem7pL4l7L2hbPaxHEtG896l1I4d0+J KcN5If69s2y9QMXWpg+E0zblcSIhvsVY8OjHccS69oBHyJCKelTdu84LqWC9Q/whSofE OjkoR8D7SgE6Ar2xQWcxjHHSmQ7TcXWpvdXD0y9UzmZM9h78/XnRLJiSKZdEeGrrs0q5 wZQwr5DLiCgDybuFm31Khl0IkbJhxNyK+gacwObhs4EmUHDKP3WInLfF8DaIPV5FW+US CMObLPwBJcyE7axa0wlhQDuIHpYHPdf1dwMsn0H0l2DUlE4b8kcgU/B6TcHSvXXE5LVS PHhg== X-Gm-Message-State: ABy/qLY2KMjTZmTxATzpaGsUK6uzkUrvgTqWhhwO+Jwx0QrXnYJBuFbB oyroSmWBJgbXBrKW9OdNti4= X-Received: by 2002:a05:6870:fba9:b0:1ba:bea1:b970 with SMTP id kv41-20020a056870fba900b001babea1b970mr2443328oab.5.1690386205632; Wed, 26 Jul 2023 08:43:25 -0700 (PDT) Received: from hoboy.vegasvil.org ([2601:640:8000:54:e2d5:5eff:fea5:802f]) by smtp.gmail.com with ESMTPSA id fw3-20020a17090b128300b00262ca945cecsm1399094pjb.54.2023.07.26.08.43.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jul 2023 08:43:25 -0700 (PDT) Date: Wed, 26 Jul 2023 08:43:22 -0700 From: Richard Cochran To: Johannes Zink Cc: Jakub Kicinski , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Paolo Abeni , Maxime Coquelin , Russell King , patchwork-jzi@pengutronix.de, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, kernel test robot Subject: Re: [PATCH v2] net: stmmac: correct MAC propagation delay Message-ID: References: <20230719-stmmac_correct_mac_delay-v2-1-3366f38ee9a6@pengutronix.de> <20230725200606.5264b59c@kernel.org> <09a2d767-d781-eba2-028f-a949f1128fbd@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <09a2d767-d781-eba2-028f-a949f1128fbd@pengutronix.de> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Wed, Jul 26, 2023 at 08:10:35AM +0200, Johannes Zink wrote: > Also on a side-note, "driver nonsense" sounds a bit harsh from someone > always insisting that one should not compensate for bad drivers in the > userspace stack and instead fixing driver and hardware issues in the kernel, > don't you think? Everything has its place. The proper place to account for delay asymmetries is in the user space configuration, for example in linuxptp you have delayAsymmetry The time difference in nanoseconds of the transmit and receive paths. This value should be positive when the server-to-client propagation time is longer and negative when the client-to- server time is longer. The default is 0 nanoseconds. egressLatency Specifies the difference in nanoseconds between the actual transmission time at the reference plane and the reported trans‐ mit time stamp. This value will be added to egress time stamps obtained from the hardware. The default is 0. ingressLatency Specifies the difference in nanoseconds between the reported re‐ ceive time stamp and the actual reception time at reference plane. This value will be subtracted from ingress time stamps obtained from the hardware. The default is 0. Trying to hard code those into the driver? Good luck getting that right for everyone. BTW this driver is actually for an IP core used in many, many SoCs. How many _other_ SoCs did you test your patch on? Thanks, Richard