Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp877156lqd; Wed, 24 Apr 2024 22:09:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXDjaYq6QktRjQIkcxP2Wa0IbJ/McXi2/luhWtr3toms7eHhOrPqCEdhiS5ZAraMuT//JH4OBQgNlzd21gGEOGjGYTUD1ZDu+nNdH/8aQ== X-Google-Smtp-Source: AGHT+IHB4M3QrxAlUYh4RyP5wef6X7WNzLXSBm3HbyMQW+L1pX6+W8VRLXar7Ce12IwhIesOXvbm X-Received: by 2002:a05:620a:468b:b0:790:98e9:337f with SMTP id bq11-20020a05620a468b00b0079098e9337fmr1845126qkb.2.1714021788449; Wed, 24 Apr 2024 22:09:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714021788; cv=pass; d=google.com; s=arc-20160816; b=v60omxKoqkho2KBNLvbrNoYwh0f//v1bcYxg+0JG9H4UcwpwfcPAg0XIG/EajcA6vk X5J0I8S3nrRbjiT+8RoFuZIF3fk+YTuVpucV7xOO54oeFnGdXSjbranRI8CDhzpodKAh s+dWUI6hAUsEotsqVwy/IF670SW9yktcAWo/pHGJmaqMuaC3DWMlkD3iuDOW8xbUVBbD sVE7wjW9QRo9Fponv1e/Zgy/JfSJ2yhmJO0NqSLISJ6sLekNKZOyGVMks7RCeLG6CauQ cgzbjPop9WhVcDV8ML3u3FxX2wG745hko/f1nA/ekrAgW94ydvtL70FWNDDQ0AHKtz6E rcAA== 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=abCh8DJAQ8EITF5dNI93dkBuAr1ujFzQM9OnIyIGsoY=; fh=PrFr5DIyjW/qtK51GodxJE56TXEJGyPEQtIKVMNpT5E=; b=sx2YSCOuWqn+q4PA6qoRdn7c8YdA3XeJTC0WYq7D5u3tdBK4peBpYu1OclJDJRM5Jr iwjuKEyQ5mNRBcRkA0piKfZAYyPOgMcNBOL9jGhwXS1X0emcty8cqHY3OGLyZTbfPLkD foBsCPQwh8JGnbeFgjasg+SV24m8vgFLZQa6Uy6jkxF3T34raL7sqf1v+DzZYMJrK0oE mpc6+jeptg5CTzQGxjf8Jow7arxhRw9sr7zV/IpGPyAl4D+nbdjuOGC5SndNJpxeROc2 sc673dp1K+OKdgNjTM6JY4OFPNnsjMD/u3VZB8Er5rJLYskLf9SWgcOXcCvCpnNVYIzw lQQA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=fhLlvLAc; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-158014-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158014-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id pc25-20020a05620a841900b0078eec775435si16050528qkn.612.2024.04.24.22.09.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 22:09:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158014-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=fhLlvLAc; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-158014-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158014-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D534B1C212BB for ; Thu, 25 Apr 2024 05:09:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4B4663AC0C; Thu, 25 Apr 2024 05:09:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="fhLlvLAc" Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (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 6ED5D23CE; Thu, 25 Apr 2024 05:09:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.248 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714021776; cv=none; b=iGOmjUUUN9Mz1gkUz0bc6F0aSoDLMLTfVA7M06hBZoYsdgqTO+mXzGS9ufWXU1NG7otK67bwqitd+Z6aMJo0KGg17OUHBDUbsD2ZYpfm4VtGLksqLB1+1doQSqr/UdaLBeBIge6I3AzM5zAL7aEWyFe6A7m25SJFvL6MfDcPenE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714021776; c=relaxed/simple; bh=btL2U0xX8vOa3CUE0RGK83zpb2weZMhXS7KZYm21kNc=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=PuUKLXCyuNyOZYSEugQnZ9CSSIcawIomputLKtC3LY2jmmSK/KKLZGiSXbE/7OqN5HqaaslDbXe8L5pWZ0HxLMnX1GNGBSM8hV7N1UtSKRTSPLZAHqpEUvHacyHO4SMOtcBKDdFtZ8Ee7qD14d6O8L7rXoeGBnkkgNpEgcke2Jo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=fhLlvLAc; arc=none smtp.client-ip=198.47.23.248 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 43P59Mdm031618; Thu, 25 Apr 2024 00:09:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1714021762; bh=abCh8DJAQ8EITF5dNI93dkBuAr1ujFzQM9OnIyIGsoY=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=fhLlvLAcGS8HMNys+wT5KisP/ZvAPNom+9RmsRSApuaX2MbE1lHobFtsier8+tKaN bpRPsAWTuKwsLErQor1u8sKLW9wSRknW4LhAJ0OPm/moFwQTqfCa2wmLEk1aLPqoyH IPyIUVwGGNdcOfiSux7MIOVLfe+qQbp+ZLCDt9Wk= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 43P59Mra101601 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 25 Apr 2024 00:09:22 -0500 Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 25 Apr 2024 00:09:22 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 25 Apr 2024 00:09:22 -0500 Received: from [172.24.227.88] (uda0500640.dhcp.ti.com [172.24.227.88]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 43P59HJg113693; Thu, 25 Apr 2024 00:09:18 -0500 Message-ID: Date: Thu, 25 Apr 2024 10:39:17 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH net v2] net: ethernet: ti: am65-cpts: Fix PTPv1 message type on TX packets To: "Trexel, Ed" , "s-vadapalli@ti.com" , "rogerq@kernel.org" CC: "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , "richardcochran@gmail.com" , "jreeder@ti.com" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "srk@ti.com" , Ravi Gunasekaran References: <20240424071626.32558-1-r-gunasekaran@ti.com> Content-Language: en-US From: Ravi Gunasekaran In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Ed, On 4/25/24 7:06 AM, Trexel, Ed wrote: > From: Ravi Gunasekaran > Sent: Wednesday, April 24, 2024 1:16 AM > To: s-vadapalli@ti.com; rogerq@kernel.org; r-gunasekaran@ti.com > Cc: davem@davemloft.net; edumazet@google.com; kuba@kernel.org; pabeni@redhat.com; richardcochran@gmail.com; jreeder@ti.com; netdev@vger.kernel.org; linux-kernel@vger.kernel.org; srk@ti.com; Trexel, Ed > Subject: [PATCH net v2] net: ethernet: ti: am65-cpts: Fix PTPv1 message type on TX packets > > CAUTION: External Email > From: Jason Reeder > > The CPTS, by design, captures the messageType (Sync, Delay_Req, etc.) > field from the second nibble of the PTP header which is defined in the > PTPv2 (1588-2008) specification. In the PTPv1 (1588-2002) specification > the first two bytes of the PTP header are defined as the versionType > which is always 0x0001. This means that any PTPv1 packets that are > tagged for TX timestamping by the CPTS will have their messageType set > to 0x0 which corresponds to a Sync message type. This causes issues > when a PTPv1 stack is expecting a Delay_Req (messageType: 0x1) > timestamp that never appears. > > Fix this by checking if the ptp_class of the timestamped TX packet is > PTP_CLASS_V1 and then matching the PTP sequence ID to the stored > sequence ID in the skb->cb data structure. If the sequence IDs match > and the packet is of type PTPv1 then there is a chance that the > messageType has been incorrectly stored by the CPTS so overwrite the > messageType stored by the CPTS with the messageType from the skb->cb > data structure. This allows the PTPv1 stack to receive TX timestamps > for Delay_Req packets which are necessary to lock onto a PTP Leader. > > Fixes: f6bd59526ca5 ("net: ethernet: ti: introduce am654 common platform time sync driver") > Signed-off-by: Jason Reeder > Signed-off-by: Ravi Gunasekaran > Tested-by: Ed Trexel Seems like your email client is not configured as per guidelines [1]. Also Tested-by reply is not inline with norm. Once your mail client is configured correctly, could you please reply with your "Tested-by" tag to the original patch mail? [1] - https://www.kernel.org/doc/html/v4.10/process/email-clients.html -- Regards, Ravi