Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2829571pxb; Tue, 24 Aug 2021 08:32:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhjKqAEreSORhJChKfR+aaQ6fnx7v0gCY9DLycR3CmJvt4YHRM+Vwt3Jm/7nz1eI3Uy3Zq X-Received: by 2002:a17:906:b183:: with SMTP id w3mr27677996ejy.394.1629819151285; Tue, 24 Aug 2021 08:32:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629819151; cv=none; d=google.com; s=arc-20160816; b=SpJzRbVkmz2/MYBjz/Kw+DI6GAF06tFuRot8SZf69ZOSFBQJb4kzUFy3DcXksb9sfN Zq99IDv09qMZRHEz5L1MfozXsfLeIOMKmV6CinPyo/nPoZ/Xy4GGlA+ca9PkZW8sxxC5 gey4ATuqlGnuOgf15c2npyxeyIIwkaMs1JpjKviPkzUQp2++mCOJmZjh452Y7dH6vQCn ayG/KET4H5YO2A0uzQYVQO1M4LTYWiRljcnnD3Y3qHR3A/yulVwBt3+oel/WQl4wLcvH 7sQbpJHRjoHwfFZllIj3iLQOgTvSH1lT7Zp94dRcIhuKSxNntFCxlorpmhoZ08eEr3Tn UnSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=bj6/PIAHxTxWiNTDP0ZybZlwOVfBWJrxxo5gWj3Vjh4=; b=HXDqdbDu8gcpO8mDPEQk6SyUU5YIxFllhgSB166Rf+So2bvPKbRc1QxYBfpZ8SHMz0 eANcPd+ikd0w6/xtzk8HXMLtZrRuxQuHy4UJlVsp8vY2DG/YMEoHd/u/lR34+xr0K+YJ gvjEwgnpCGPEzsRlBu7nI5eKbhCmpzfq//1HWcOFchipPo5MVD/P7/ImQ9+sDHs0N2FX 1VdUX4CckWM0uT3+cAomZhky/HUM81J3xRo1yu8VADAxGXkaI7nElJu2z8WBZeVGU+GS KT3gkWhjXPyBWErVt/+RnrLMZnQloYTqIgTY5O0UO3wHXDCt9w4WS0Yv18Vco33wgIZT UZ0g== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=xilinx.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nd21si11148432ejc.580.2021.08.24.08.32.05; Tue, 24 Aug 2021 08:32:31 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=xilinx.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238346AbhHXPaV (ORCPT + 99 others); Tue, 24 Aug 2021 11:30:21 -0400 Received: from mail-yb1-f182.google.com ([209.85.219.182]:43675 "EHLO mail-yb1-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234546AbhHXPaQ (ORCPT ); Tue, 24 Aug 2021 11:30:16 -0400 Received: by mail-yb1-f182.google.com with SMTP id z128so41786986ybc.10; Tue, 24 Aug 2021 08:29:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bj6/PIAHxTxWiNTDP0ZybZlwOVfBWJrxxo5gWj3Vjh4=; b=lrKUPVu4zjRMH6kndntOSRZCqQWHoKqMthoEB4X7xUVB0r7I6oku3AeoTv1eRjQyuV IYkGhEd5lVIPM+fOW/M8HnYNUzUkdgEyhPxONauLTNpJ8QB9NYIYjoBI2752duReHg8g EC7M7p4rS4ps24GE1zcJH9TzZLIG9nsOvbq8A7CG31S0EwsKACpyqf2Re1n93mSE+n5q vwhmDrBSn0rDLj4EBOWGlTuCC/cxnOlUbrX7W5A30FpcmQgKtBgZ8GFf/P/TXoPSaF5T tXHByLH3lJow8Bf8X2Q4mFqr67CXIAXfO20BB7Eg+SVEayldl6cvGAzHijwRl3I1lI1l Z1tQ== X-Gm-Message-State: AOAM531sAKgU5HUVGyFqbSRsJj7mLeJ+oK3A+V0Agp1hUJ0xXA49Jj9Z Y45Ui6ZoGpWwrY1LXcgaXMAaqVoSaTvGiywH0LU= X-Received: by 2002:a5b:108:: with SMTP id 8mr52503590ybx.174.1629818971616; Tue, 24 Aug 2021 08:29:31 -0700 (PDT) MIME-Version: 1.0 References: <20210824101238.21105-1-harini.katakam@xilinx.com> <20210824140542.GA17195@hoboy.vegasvil.org> In-Reply-To: <20210824140542.GA17195@hoboy.vegasvil.org> From: Harini Katakam Date: Tue, 24 Aug 2021 20:59:20 +0530 Message-ID: Subject: Re: [RFC PATCH] net: macb: Process tx timestamp only on ptp packets To: Richard Cochran Cc: Harini Katakam , Nicolas Ferre , David Miller , Claudiu Beznea , Andrei Pistirica , kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Michal Simek Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Richard, On Tue, Aug 24, 2021 at 7:35 PM Richard Cochran wrote: > > 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: > Thanks for the review. Yes, there is no SW overhead because the skb check ensures timestamp post processing is done only on requested packets. But the IP timestamps all packets because this is a register level setting, not per packet. That's the overhead I was referring to. But based on your explanation, it looks like we have no option but to enable TSTAMP_ALL_FRAMES. Thanks. Regards, Harini