Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2763882pxb; Tue, 24 Aug 2021 07:06:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSUxb+k9uzNVn61cbEXPJ+F73BEq1UBE0Pe8KvkTX72uatYGyrWoTDIMDYL+mdyDNwxk+6 X-Received: by 2002:a6b:b512:: with SMTP id e18mr32318034iof.98.1629814019641; Tue, 24 Aug 2021 07:06:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629814019; cv=none; d=google.com; s=arc-20160816; b=yRM1utbsczlKEC8dCktnA9n8bIm+3rpTdW8dGz3jPKsW/Ko0l+tkVmA1TGFv2WugVW ar4OHq4TBioK2mxX7GG+vrkOpLfhiKVBf763AdZSEbFwLWZx3BTscD0dB3DSsEeJzom+ v1xQ7fi/0os43WuqJw4Yo2+4u3LNcEnsKbHQ1qaX4P9OZM5WqCmDqZLmjpX/5zDeQ37h MZcArXB9I/hRKCnZUMCHE+vC/9hUAsGTSFtgRyec0MP6tClB7ge4HJlKsYDrSFGdZJwE wIqo0IH6VQWCyhCIApmJ4yNQD5ChO9w41YOXdUO4rEj0PHK0BqRvjtdxGcNPeFIKTtt/ Z8ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=BdtL4BgokjgujApJ06tQSXQaIiFk2bqrpHTm5UuiXVg=; b=NEvNl6za3xHjs55y/MyXFgVLWAtymuK635ZnMN378NaJvqWpoDKHpUy7ZdNCC8jPZh YWzpdRmQ7vcWWthgTdus0m5nsje1e7W8q56Gvl/5UwpwxalTLeQ4Km8az8UlwG728Rnb qDM8i1nmNCk/T06QQVeNUq2zUMbLei4IUXsibeS4BEAMlPZxRt05U/VpCeqBGE8FMnLk rviJQAAwg7vbvV7pgRFQB7I0Ju9WsJAqL0BE3w6ZYS5+fFUgVOtsDM48LRQdNscOKxTg p2x1mA0p5joVQ/32dPBzKffpph/wry7k3Dyi4apKVG1gHlsYRmE75IlAGVRi+6TbEx4s Tg2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DnSSy2sC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j186si17646237jac.23.2021.08.24.07.06.46; Tue, 24 Aug 2021 07:06:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DnSSy2sC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S237488AbhHXOGa (ORCPT + 99 others); Tue, 24 Aug 2021 10:06:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232311AbhHXOG3 (ORCPT ); Tue, 24 Aug 2021 10:06:29 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B433CC061757; Tue, 24 Aug 2021 07:05:45 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id mw10-20020a17090b4d0a00b0017b59213831so1896206pjb.0; Tue, 24 Aug 2021 07:05:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=BdtL4BgokjgujApJ06tQSXQaIiFk2bqrpHTm5UuiXVg=; b=DnSSy2sCW4l8HMb5J0ljKo0yiqzEUo/COydY729551qsxQcw1C7UqW4AGxI19Inxpp hxp+ZzvTwXWAz/4LZrrMo08CJIhpQi4eMYaPh51mTwOy1guaKQLZzNO5uPCi3vSqKA6B 7IN9+sN84HZgSZOChdqxtkw39Cb3zZDiI2/Kq5J8I4pi4fyN7h2ic9eHPRBhgbQfEEYv 3mfWiK8FxUhHIg0i2dBCyk3Ihg4Ac+hUuTjdl3pnbXkNBjDX6S/niPHC3MFC9ReHN5E0 0hQWD8RBCWbgSgqwE1laG4BpgWuAqU5Qk5wTF1LFMfWFWmmodebzwS8RHlg5QC24DBVg dEbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=BdtL4BgokjgujApJ06tQSXQaIiFk2bqrpHTm5UuiXVg=; b=VgALX1hhzEvhcGNwNlJy+aWUDyLSqzw1hEKuTR4MSZ17sTZ+kf/9kkTQFatW7ubAKd FGIOFlW9Cd9YQ7v4tRGOGYoaI928UQWsikBsTLZLAAgNKBbuVH3U1BueHBr5e61/ZC5z Ez2CqEvtJUfVBZI8Hx4MGuc1nGd4FVbJgP3dVFyUi0djb04WtnxAEwPssbdD73RFH+X+ T538V0jq28o+sb/CAAnWPGcLrXE4hYqhjhd2MTwzFDdnZX/tZips1xyJIu1EeSIKPXHw XAwNJ8ILLLch8eHkpdosceKeDQJjHbrJ4a12K99EtlyVxBEr3NGBbpwvdoAigD1Wsbrd KqxQ== X-Gm-Message-State: AOAM530qpyzQxeJRA+pMYzZx/AT8WT/A+7GSLjRitZxjeAGsaMLc9Lf/ jglkk9l1lzpdV1HBtFWv9hQ= X-Received: by 2002:a17:902:6b49:b0:136:3f21:7a9 with SMTP id g9-20020a1709026b4900b001363f2107a9mr3173720plt.81.1629813945290; Tue, 24 Aug 2021 07:05:45 -0700 (PDT) Received: from hoboy.vegasvil.org ([2601:645:c000:2163:e2d5:5eff:fea5:802f]) by smtp.gmail.com with ESMTPSA id ml5sm2710652pjb.4.2021.08.24.07.05.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Aug 2021 07:05:44 -0700 (PDT) Date: Tue, 24 Aug 2021 07:05:42 -0700 From: Richard Cochran To: Harini Katakam Cc: nicolas.ferre@microchip.com, davem@davemloft.net, claudiu.beznea@microchip.com, andrei.pistirica@microchip.com, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, michal.simek@xilinx.com, harinikatakamlinux@gmail.com Subject: Re: [RFC PATCH] net: macb: Process tx timestamp only on ptp packets Message-ID: <20210824140542.GA17195@hoboy.vegasvil.org> References: <20210824101238.21105-1-harini.katakam@xilinx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210824101238.21105-1-harini.katakam@xilinx.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 24, 2021 at 03:42:38PM +0530, Harini Katakam wrote: > The current implementation timestamps all packets and also processes > the BD timestamp for the same. While it is true that HWTSTAMP_TX_ON > enables timestamps for outgoing packets, the sender of the packet > i.e. linuxptp enables timestamp for PTP or PTP event packets. Cadence > GEM IP has a provision to enable this in HW only for PTP packets. > Enable this option in DMA BD settings register to decrease overhead. NAK, because the HWTSTAMP_TX_ON means to time stamp any frame marked by user space, not just PTP frames. This patch does not "decrease overhead" because the code tests whether time stamping was request per packet: drivers/net/ethernet/cadence/macb_main.c line 1202 if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) && gem_ptp_do_txstamp(queue, skb, desc) == 0) { ... } Thanks, Richard