Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8952116rwb; Thu, 24 Nov 2022 06:19:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf4DTS8SsRrP1+QwpE0r2GZuF3qhv/icuvBBsB3oO+YtG57HkpLddSHa8lAKKk/ItyYIDxL2 X-Received: by 2002:a17:902:bc43:b0:186:da90:5936 with SMTP id t3-20020a170902bc4300b00186da905936mr14448666plz.158.1669299597636; Thu, 24 Nov 2022 06:19:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669299597; cv=none; d=google.com; s=arc-20160816; b=LtFOtexUdMdYuHE6Yh8VqtAPwp103jbPVYyoDzsyDCPK/fr7b1iZDH3BEbVMxz2O+j Y17pmJ260DaSohL1G4LsZ4XvmR7biSL0FkAF81w4GmJO4jy6SPTNEYPsgyAL2PlxWNH6 s5Be+C/G0Gp8pRC0wQMTHjmIQdOaHaQnmvEGE5Oi34voJMfk9rk9TJOevoEtkWk7Z8J5 mMWotErBV5LYGbFApz1UJCC00URvHEKyhDM9jiMubIN8RVkxkflOsKz6q6dGO/28is8J 69OZEazvwXloZ9SFaEZSj98zuWvH2oiWcshLG/eNZS+oOVNJtPgY2RDY524DHLkPxX4j 4Ayg== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=VmbvuSM4gaHt0wF6CYlwWdmkwgoCO7ZVvFZi9V+mMbg=; b=Hct/kkiFri2yAxu0/iCFJowgK8mZGiZ8LmX+BTfY1g7/1tu49A7DTxZOu4/hJ8Xb4A lErgkbm/NK+z6KNvy0yL/k/HGTh7IfcF/GqQ+VtupeknlbBdG/NgtqNm4j91LYShVFB+ 0gQ1nAb3KjIUPYDzA7z0VzoCZ9mTtGJZ6XRnmbaeGbgXoJVZe8CC8e0TJsnAmO1e9dgk L9u3jsJtaRt8ehDuR/ajAUZWPUjo2bK07OBJAaAZiBTmRG/02Kzv7er3A/fa2NnTVDeS o20Nrw6BfBFnXNpmep5FtolcwIK9Ek6ruHTtNudx49BR7ImbEc3qDkvv6Ho4+ac93DLm 1Tcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="H/YpQNPv"; 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 g14-20020a056a001a0e00b00565c337c562si1247198pfv.100.2022.11.24.06.19.46; Thu, 24 Nov 2022 06:19:57 -0800 (PST) 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=20210112 header.b="H/YpQNPv"; 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 S230033AbiKXOPG (ORCPT + 86 others); Thu, 24 Nov 2022 09:15:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229684AbiKXOPD (ORCPT ); Thu, 24 Nov 2022 09:15:03 -0500 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E52B51316; Thu, 24 Nov 2022 06:15:02 -0800 (PST) Received: by mail-ej1-x62d.google.com with SMTP id ha10so4486018ejb.3; Thu, 24 Nov 2022 06:15:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=VmbvuSM4gaHt0wF6CYlwWdmkwgoCO7ZVvFZi9V+mMbg=; b=H/YpQNPvu/OHLUtSHqZu+AwPJYJZDYZRsxEP23Poh30rrIWfrxZyx+O3KyyZzS5GUP 6vEzKrmgshBQhDlS9lqr1Ybyb7hRaLrCYrRaUW17RqxOyydjn+uB98AZfZ0NGvUg/llH VCgL4mj4SUZDIz90dSpGfJ7Q7VvOrcmkIX7sG5vN6y1edoaDwQOJR7QRHQAa1PGacRY8 ySBHdQ2vDxzf/A6LLt958z5XUbQ+Oq1fmaeCNH/jNc/C2r+UZSxEFedmLe/okA5bTmXE wmHdBKW+ElYVeR5Si81wx15M1iafH89gy8qh1vy1+akc0WgnkCwmvTOYoDxPraywpAwU cIJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to: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=VmbvuSM4gaHt0wF6CYlwWdmkwgoCO7ZVvFZi9V+mMbg=; b=yo9BVMzcBOY2m+b2Fw62LV+nbPWHa7Jg3G4eO6cMZc6sj7XAirabfcrUUqa1r1yJpf Ib4aOIDcVAb4P23wtuquDSV2/pBBWGD6gfSSCQuQFvHMhYhA8VX6IBtWKEEKU53V53e7 YTj6MaHHL5J8gTFOdysFPqEVwusPPQ8/IxKrISFSLlNAdgoi+lzmkH+tDKAhBXbPd1hB iZNluk4hRRl6evN9SM0McvGX07bSkLZg4GsExSx7qHmkESSrF1XyaTiJzXMK421gTq6G Tdn9ZEegFufZzkCOUeN9Mn5jH3J56OBGpSO+PGEsa2pzi+3xpGRSg9rho2Ek3VNpL3gr 9XeQ== X-Gm-Message-State: ANoB5pkIQ8Q0oClkVyO0+LKaeWsX1czoFbMSs0g1+T5ekucj0mKFLKA9 v++rWaUseUXAv+tw4V4dsXg= X-Received: by 2002:a17:906:fcac:b0:7ba:a9cb:8643 with SMTP id qw12-20020a170906fcac00b007baa9cb8643mr4410054ejb.298.1669299300445; Thu, 24 Nov 2022 06:15:00 -0800 (PST) Received: from skbuf ([188.26.57.184]) by smtp.gmail.com with ESMTPSA id d5-20020a056402516500b00457b5ba968csm555383ede.27.2022.11.24.06.14.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Nov 2022 06:14:59 -0800 (PST) Date: Thu, 24 Nov 2022 16:14:56 +0200 From: Vladimir Oltean To: Arun.Ramadoss@microchip.com Cc: andrew@lunn.ch, linux-kernel@vger.kernel.org, UNGLinuxDriver@microchip.com, vivien.didelot@gmail.com, linux@armlinux.org.uk, Tristram.Ha@microchip.com, f.fainelli@gmail.com, kuba@kernel.org, edumazet@google.com, pabeni@redhat.com, richardcochran@gmail.com, netdev@vger.kernel.org, Woojung.Huh@microchip.com, davem@davemloft.net Subject: Re: [RFC Patch net-next v2 3/8] net: dsa: microchip: Initial hardware time stamping support Message-ID: <20221124141456.ruxxiu7bfmsihz35@skbuf> References: <20221121154150.9573-1-arun.ramadoss@microchip.com> <20221121154150.9573-4-arun.ramadoss@microchip.com> <20221121231314.kabhej6ae6bl3qtj@skbuf> <298f4117872301da3e4fe4fed221f51e9faab5d0.camel@microchip.com> <20221124102221.2xldwevfmjbekx43@skbuf> <0d7df00d4c3a5228571fd408ea7ca3d71885bf6f.camel@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0d7df00d4c3a5228571fd408ea7ca3d71885bf6f.camel@microchip.com> 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 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 Thu, Nov 24, 2022 at 10:52:46AM +0000, Arun.Ramadoss@microchip.com wrote: > Mistake here. It is carried forwarded from Christian Eggers patch. Still taken from sja1105_hwtstamp_set(). Anyway, doesn't matter where it's taken from, as long as it has a justification for being there. > > Why do you need to call hwtstamp_set_state anyway? > > In tag_ksz.c, xmit function query this state, to determine whether to > allocate the 4 PTP timestamp bytes in the skb_buffer or not. Using this > tagger_data set state, ptp enable and disable is communicated between > ksz_ptp.c and tag_ksz.c Why do you need to query this state in particular, considering that the skb goes first through the port_txtstamp() dsa_switch_ops function? Can't you just check there if TX timestamping is enabled, and leave a mark in KSZ_SKB_CB()?