Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1265061rbb; Mon, 26 Feb 2024 04:18:35 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWie4Hz5QMQF75JOBP0p3JXth13qYqvEB8nE8Z6ZAK77ex+fVynrrYWZuk2fOeJS5gZjDEFJySHOuJKcDIOSe+9/ufxkrn5EyA3fZxjyQ== X-Google-Smtp-Source: AGHT+IGJ2C5mpnbgIk9bJ89gxarAJ2Q++N/i45c+ITk6auX9QXJ8mnVLqwzLqESCVymAxnRRTiDM X-Received: by 2002:a05:6358:761d:b0:17b:62a1:c35b with SMTP id r29-20020a056358761d00b0017b62a1c35bmr8430229rwg.6.1708949915626; Mon, 26 Feb 2024 04:18:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708949915; cv=pass; d=google.com; s=arc-20160816; b=qbeKzT/sOqyj3Hgq2vnmVq2qH4pauZdkgcFKEmCsFXonz+Fhv1hFwfFm4XEcxTmvZB z/3TTx9opCmDcO6UuZRbV/q4KYDcbK6oLV+k2qeBYTaGo6e3HuudT8kLZrUOu0hH4yxH yiC6k5iX6+31JIFd2l1PvXGJLnY4vRKkygImpK3CumjKJMIAfnlxo6TDoxDRGoPctqi4 0yU6WcZn4pXUTpyo5b6GHnzXTb7/YIeBorieCei4kNPjYG6XJ0nZCTUmvBfX7Yp6kqJx TkOBtSZCGDSZ+HJZ1vzr1CdVjJxVGaiwUUFMwCKxMnSTKonA8jCAN7T9YsSoA58X2RpQ gJGQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=6wF1kZbTklj8g3cTphdUDCXq4suW/p2HL9ZIiV/7CFE=; fh=DhnXAdQ/aYiWMn7+JwqzZ6JwCZ1IJ3J04dKCbGMzwBM=; b=T+6Wz78uwHxOMzIvW7F+kKQIA2w8qprkEFHrZW6inlpUsLjDwI4wlB4nPFH49UsVy7 hcqKSFgbe5qsM7fMXjregCf6v+6l7qSDVrLprBg2nsMSutV+YNXeIAlO6WIOE0fj4HZ2 9HOPyjxvX6Zg4sFQGE8FgLQuNOi4ssDSE0Rzp0+E4tklPEv5048CMadNAi/0Wlv1ZG2c bv8onAoYLXdTN8GRebICNmzUUugjmb58JiUcfoPOrEodm2uIueAZc97tCRIVdka2alv0 1iBxkaJFN0gnlz8WwWSRqrimCwooh/LJSPAlOClq2+0RZCnAVldYUKez/aXJxX1RRSHX xpWA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=E3ffn9bd; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-81352-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81352-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u132-20020a63798a000000b005dbf27229edsi3625532pgc.290.2024.02.26.04.18.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 04:18:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81352-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=E3ffn9bd; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-81352-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81352-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4DF12286AE9 for ; Mon, 26 Feb 2024 12:18:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 526AF604D0; Mon, 26 Feb 2024 12:18:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="E3ffn9bd" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 75940604BA; Mon, 26 Feb 2024 12:18:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708949908; cv=none; b=FxCwoznXTKdbafmL2h4ip6QY9cYvUyoADHi1wgubjbNMnSXETDg5C2c5uY+RQhrCIB6Ue4JyOaYpIPuFL9l/0a8CRQZYTAC8lqxUXHy4VJxyJzqvIzTBkW6KMxSOxKOVdOwybfRzM41amq5snZhO+QDr7LLlFR/mNir8FRaKCjk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708949908; c=relaxed/simple; bh=VSnvGelLdUIxZaIuWRNLfdqqVKrr+uqj31Ykk1ZLMCY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=g7ng5c1FEF+5N1NsI9B0c+4QwwPRH65yTFHmwfFUWRydw/izYeSzfdwyxH4jxi7wIyCSRtc2NPYhFsVLTa2UoTwjdLhPgBPGnfA9XnrzA/qW2otUj2X8ech7KutL6pMpmZBP7Ak5Wbk9o2O/qCAj45lWeyP3KbK4qmt5Slxx3Yg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=E3ffn9bd; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5EC11C433F1; Mon, 26 Feb 2024 12:18:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708949908; bh=VSnvGelLdUIxZaIuWRNLfdqqVKrr+uqj31Ykk1ZLMCY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=E3ffn9bdlAqqJECX5jOmuhuODqmMzGVocETBwQE3reLPzykSZ3ycyJ0TEf4AZ+KJb yLRnbdhjiPrrgHEcwKAv+u68lWMGraKvyP59AB4dytfWg/mjHpABqrOYxdFiIo7jxO 25vwmq+dwb8iVzkGSjTsfeRvcAghQSmfRSwtzw40EPNFKNSh3LupfSzaLtWD7BUMUR Fmw4V9sOwsRMO5d6oZiRtMLskwDTYjhrZoJD6B5xYb0PIQV88SjdZO8l3XDEnFgRC+ URKxKJ8vyhcnocyQDFMf9NhLtOU/ZTSvriJeQK35sgCGdSP0rz0PMrr1Fwse/g7gpY gHlpcOgeJt3Mw== Message-ID: Date: Mon, 26 Feb 2024 14:18:22 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next 2/2] net: ethernet: ti: am65-cpsw: Enable RX HW timestamp only for PTP packets To: Siddharth Vadapalli Cc: Chintan Vankar , Dan Carpenter , Richard Cochran , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Pekka Varis References: <20240215110953.3225099-1-c-vankar@ti.com> <20240215110953.3225099-2-c-vankar@ti.com> <4c82705d-b05c-4ee8-88ed-42f944a023ac@kernel.org> <03d53049-e649-4714-8ad4-49619a5e9475@ti.com> Content-Language: en-US From: Roger Quadros In-Reply-To: <03d53049-e649-4714-8ad4-49619a5e9475@ti.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 24/02/2024 10:59, Siddharth Vadapalli wrote: > On Mon, Feb 19, 2024 at 12:59:55PM +0200, Roger Quadros wrote: >> Hi, >> >> On 15/02/2024 13:09, Chintan Vankar wrote: >>> The CPSW peripherals on J7AHP, J7VCL, J7AEP, J7ES, AM64 SoCs have >>> an errata i2401 "CPSW: Host Timestamps Cause CPSW Port to Lock up". >> > ... > >>> >>> @@ -856,6 +852,9 @@ static int am65_cpsw_nuss_rx_packets(struct am65_cpsw_common *common, >>> ndev_priv = netdev_priv(ndev); >>> am65_cpsw_nuss_set_offload_fwd_mark(skb, ndev_priv->offload_fwd_mark); >>> skb_put(skb, pkt_len); >>> + skb_reset_mac_header(skb); >> >> Why do you need to add skb_reset_mac_header here? >> >>> + if (port->rx_ts_enabled) >>> + am65_cpts_rx_timestamp(common->cpts, skb); >> >> The timestamp should be added before you do skb_put(). > > Roger, > > Could you please clarify why the timestamp should be added before > skb_put()? My bad. hwtimestamps lies after skb->end so it doesn't matter. -- cheers, -roger