Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4454940rwb; Mon, 31 Jul 2023 07:11:16 -0700 (PDT) X-Google-Smtp-Source: APBJJlEQJdrH83KCk3aZ9NB9SkD/evDir4gZ2siUSndMpZOOAIzVXmeZkka9ZWfrQZFGRfBruSf2 X-Received: by 2002:a05:6a00:1883:b0:666:b254:1c9c with SMTP id x3-20020a056a00188300b00666b2541c9cmr11886601pfh.27.1690812675957; Mon, 31 Jul 2023 07:11:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690812675; cv=none; d=google.com; s=arc-20160816; b=COO5hGrB4bvCq3yq8lUs3uRTODB58h9ZqNPnk9bm1dWFkUImIMP9reT9VOQQTNM1lL ih4bY4vrB9fwvMYufPRa8top3dYRXne69aw/1VC6HLc2CaB9Fw2hzDD0UsiZKGyOlwTq E2OpYY/IuEecv7I6hKk5vztd3yYtM5UHTlmbv2yGwG+oh0N9R1Xu0Yq9j4tzSn+sIwZD lmPBiUT8ofGAHKWjduMMEV5VMCrkRcO3VETpNUsLxIKQ9LRiy1r20BSSpBkuok+Ist+i sao1p7zR4aOzYoTyw5v5c6uBap2tXDB7GAeM06uo85Bm7Gkr7gdZzVDcl5aOIcm2C9FF hmpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:mime-version:date :dkim-signature:message-id; bh=fLKb003HBI5xzLCoz1yU7MsFEkEiCvyVgDi7hTTof4c=; fh=X1PQ5v1bRzoxKu01BDFia1g1uIBnJiojt37s8ha+Lhg=; b=x+sbWRtXiyPJ9qmglMsWCd9a94EZ6Uc0yZkGQIdLcawoEhmOj1iCAfdUzbCGgBsR5i d3YQf1ceKoDQ5gZ0uD8ywAFDpRgxIODrXv+n6VHKH/Dy6mAT7U/5JZucZvyz+qxo+z6z /czEDvhIKlSbqEBPIrr7cnm79NX5x9mcH3L5eDAyxz2xlCRRLJ1kUyW7O038TiTLOKRz ZAQbdm83wyJak0JXn6pB8Q+Um3SyZ6mdXSs9ZKYXt84AbmJBYmAceGpeFm8MfqmU9H1q y19zl9AH8i/Nc6HjOSVDj4BlGtKCXpbLxQGsw4T/60DnqdXAL7200v9NK+2Mz8UFnBK2 C+TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=WXBxmoFo; 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=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dc11-20020a056a0035cb00b0066675b3f21esi4395022pfb.36.2023.07.31.07.11.03; Mon, 31 Jul 2023 07:11:15 -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=@linux.dev header.s=key1 header.b=WXBxmoFo; 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=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230382AbjGaNrh (ORCPT + 99 others); Mon, 31 Jul 2023 09:47:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230205AbjGaNrc (ORCPT ); Mon, 31 Jul 2023 09:47:32 -0400 X-Greylist: delayed 99 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 31 Jul 2023 06:47:29 PDT Received: from out-99.mta1.migadu.com (out-99.mta1.migadu.com [95.215.58.99]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0AE7170D for ; Mon, 31 Jul 2023 06:47:29 -0700 (PDT) Message-ID: <337b535c-e2a3-bd65-d1c5-fd7199432891@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1690811149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fLKb003HBI5xzLCoz1yU7MsFEkEiCvyVgDi7hTTof4c=; b=WXBxmoFogi4S8Yp707opUTnSN81JhKHLHVCKYlQWrFDVCwSVryXdHrXf9AgrAo/OOgr+LM 2T/NKplQowTlRQGULTwQx9ELezPVE142NdknNXSIvmAU1Xk4ngM3p4FPtSa3toreTlFMiW /crMI/HrTHzeOi95+LpZPtdczVZOeYI= Date: Mon, 31 Jul 2023 14:45:45 +0100 MIME-Version: 1.0 Subject: Re: [PATCH net-next] net: lan743x: skip timestamping for non-PTP packets Content-Language: en-US To: Vishvambar Panth S , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: bryan.whitehead@microchip.com, UNGLinuxDriver@microchip.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, richardcochran@gmail.com References: <20230731125418.75140-1-vishvambarpanth.s@microchip.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: <20230731125418.75140-1-vishvambarpanth.s@microchip.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,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 31/07/2023 13:54, Vishvambar Panth S wrote: > Currently all the RX packets are timestamped and the timestamp is appended > to the RX packet for processing, this reduces RX throughput. This can be > optimized by timestamping packets only when the PTP messages are received. > The RX PTP Configuration register [PTP_RX_TS_CFG] specifies what are the > PTP message types to be timestamped. The PTP_RX_TS_CFG_MSG_EN_ configures > Sync, Delay_Req, Pdelay_Req, Pdelay_Resp Message types to be timestamped. > The RX_CFG_B_TS_ALL_RX_ bit enables storing the timestamp for all RX > frames, now this is cleared as only PTP packets will be timestamped. The > RX_CFG_B_TS_DESCR_EN_ enables storing the timestamp in an extension > descriptor. When PTP messages are received the timestamp will be stored > in an extension descriptor of the RX packet. Even though the performance benefit is clear, the PTP subsystem provides options to select whether PTP filters must be applied or all packets must be stamped. I think it's better to implement both options as the hardware supports them, there are use cases where timestamps are needed for all packets. Linuxptp can be easily configured for both variants, the hardware/driver documentation can state that there will be performance degradation for all RX packets timestamps mode.