Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp168281iob; Tue, 17 May 2022 22:35:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/4olZcdg1Dl6RsPirNmUhSUU6+xibYcnbpwQ5S9nsz2Xc+v9BbOfhFudwBdTZ1XApA4I2 X-Received: by 2002:a05:6a00:1490:b0:50d:f304:61ea with SMTP id v16-20020a056a00149000b0050df30461eamr26133558pfu.73.1652852130090; Tue, 17 May 2022 22:35:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652852130; cv=none; d=google.com; s=arc-20160816; b=oAQjvmLjcI6MQ6C17hGyZ+uKOfJrvqKHoR0BBX71NQ3vY9Hr9X00QeKvz+yq+VhSLL fEfuAtm0QpYT6EzgRWwyP5xBcZ5sWh2eZbEpE8ydvDKg92Z+1nIvhwByMEOpOrOJF3tu I+p6IUawl0Gm6HGrbRbZRbIbnxzUpFVGEjyAuw91c1F28d/o/OxJOWhlXT9Tp16aGv72 OzO0oacVj3nlMRCqy7hZIny+CSy0U1sLl5panWeeirLH8KnivkRIwR6iPkU2mR1nGU5J WYT1Wt4VNKe7D+07H+6tqrXjJ2keCS7JB1M34PV4DMLWH4wDdMdHuzewfITsBj0UgBW8 IjNA== 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:subject:cc:to:from:date :dkim-signature; bh=79gESYTCInGEhoTLL9tifEJrb3Gk7cCCXrVHoc7t71I=; b=dswea+qTUKdEq6PG/KPPAK61QfE4C4hCqffRBsWXGafQUh1jLE1drSTwbKpvq8onWD n/dEMqULL/isA7yhSHxlcc/wqk7V9IZOK3k1xc5nERdl203uVJjiiebcNXqYAMtgcRos +RiLAuGyji4dVfGww6uW6HWU/zg5UP7n+GQEd4ywtYmeHhL1uYAwQvMY0ScUtSA8RMmg xdhk1hz9ep6eYzxCiR1jrv6TmfsEVyItd6LnQ2emXWFbugWS10pA8eKsaAY5VMZ79UGK oyIk7uUs99dB+mzqcQzIM/Bu3cXUVVx2/66IIfwNj0+uwdPZRqr+lhBMfKe7NogodAqu f2KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pupY0Aq6; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id c10-20020a65618a000000b003f60a2877e6si543766pgv.427.2022.05.17.22.35.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 22:35:30 -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=@kernel.org header.s=k20201202 header.b=pupY0Aq6; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AA53C1D336; Tue, 17 May 2022 22:06:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230183AbiERFGS (ORCPT + 99 others); Wed, 18 May 2022 01:06:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230162AbiERFGJ (ORCPT ); Wed, 18 May 2022 01:06:09 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01DDA6163E; Tue, 17 May 2022 22:06:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 367DEB81D9D; Wed, 18 May 2022 05:06:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66319C385A9; Wed, 18 May 2022 05:06:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652850364; bh=N4r7WJWhhRNnKb59gLRfEn6OU/D10G4MYLVP2WxWL7o=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=pupY0Aq6EYpZAWIpEigrfJF4MbHVFy3akCBPaxHWwS9Lc+5gHfsGTNkxnBGX31wWA H4NVKPU8/fEK+QRHViiuBnZ0U938JJDNH0QLGLJOuvfcz8gDxpkrCp3gBpk/OpCvM9 4TbHMTSAUs8eJ3SUiUFia9YAUC56zlcc+yQc/XehB8NMjOz3N8CWNDfwrwzFlTHaeu f43fjUCWi+Rr09VV3eor6ZPnGpXBcjAd1YRArI6v4H+a+ZTm5m+eeI38AfrIhRMjbu Pw3mLQDycb0N8kmDrRk7KZsSb6cNyqbP0l9lwfSVSyM0RfT0OmqxCmgDCTy42qQmGA +0EAY3uXYqdcg== Date: Tue, 17 May 2022 22:06:03 -0700 From: Jakub Kicinski To: Harini Katakam Cc: Harini Katakam , Nicolas Ferre , David Miller , Richard Cochran , Claudiu Beznea , Paolo Abeni , netdev , Linux Kernel Mailing List , Michal Simek , Radhey Shyam Pandey Subject: Re: [PATCH 1/3] net: macb: Fix PTP one step sync support Message-ID: <20220517220603.36eec66e@kernel.org> In-Reply-To: References: <20220517073259.23476-1-harini.katakam@xilinx.com> <20220517073259.23476-2-harini.katakam@xilinx.com> <20220517194254.015e87f3@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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, 18 May 2022 09:53:29 +0530 Harini Katakam wrote: > On Wed, May 18, 2022 at 8:12 AM Jakub Kicinski wrote: > > > > On Tue, 17 May 2022 13:02:57 +0530 Harini Katakam wrote: > > > PTP one step sync packets cannot have CSUM padding and insertion in > > > SW since time stamp is inserted on the fly by HW. > > > In addition, ptp4l version 3.0 and above report an error when skb > > > timestamps are reported for packets that not processed for TX TS > > > after transmission. > > > Add a helper to identify PTP one step sync and fix the above two > > > errors. > > > Also reset ptp OSS bit when one step is not selected. > > > > > > Fixes: ab91f0a9b5f4 ("net: macb: Add hardware PTP support") > > > Fixes: 653e92a9175e ("net: macb: add support for padding and fcs computation") > > > > Please make sure to CC authors of the patches under fixes. > > ./scripts/get_maintainer should point them out. > > Thanks for the review. > Rafal Ozieblo is the author of the first Fixes > patch but that > address hasn't worked in the last ~4 yrs. > I have cced Claudiu and everyone else from the maintainers > (Eric Dumazet also doesn't work) I see, thanks, added Rafal's email to the ignore list, I'm quite sure Eric's email address works. > > > @@ -1158,13 +1192,14 @@ static int macb_tx_complete(struct macb_queue *queue, int budget) > > > > > > /* First, update TX stats if needed */ > > > if (skb) { > > > - if (unlikely(skb_shinfo(skb)->tx_flags & > > > - SKBTX_HW_TSTAMP) && > > > - gem_ptp_do_txstamp(queue, skb, desc) == 0) { > > > - /* skb now belongs to timestamp buffer > > > - * and will be removed later > > > - */ > > > - tx_skb->skb = NULL; > > > + if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) && > > > > ptp_oss already checks if HW_TSTAMP is set. > > The check for SKBTX_HW_TSTAMP is required here universally and not > just inside ptp_oss. > I will remove the redundant check in ptp_oss instead. Please see the > reply below. But then you need to add this check in the padding/fcs call site and the place where NOCRC is set. If you wrap the check for SKBTX_HW_TSTAMP in the helper with likely() and remove the inline - will the compiler not split the function and inline just that check? And leave the rest as a functionname.part... thing?