mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ravi Gunasekaran <r-gunasekaran@ti.com>
To: "Trexel, Ed" <ed.trexel@hp.com>,
	"s-vadapalli@ti.com" <s-vadapalli@ti.com>,
	"rogerq@kernel.org" <rogerq@kernel.org>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"richardcochran@gmail.com" <richardcochran@gmail.com>,
	"jreeder@ti.com" <jreeder@ti.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"srk@ti.com" <srk@ti.com>,
	Ravi Gunasekaran <r-gunasekaran@ti.com>
Subject: Re: [PATCH net v2] net: ethernet: ti: am65-cpts: Fix PTPv1 message type on TX packets
Date: Thu, 25 Apr 2024 10:39:17 +0530	[thread overview]
Message-ID: <d5b1864b-9756-92f0-ba32-1009aa89e83d@ti.com> (raw)
In-Reply-To: <MW5PR84MB157272BC110ED170C35983F790172@MW5PR84MB1572.NAMPRD84.PROD.OUTLOOK.COM>

Ed,

On 4/25/24 7:06 AM, Trexel, Ed wrote:
> From: Ravi Gunasekaran <r-gunasekaran@ti.com> 
> 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 <ed.trexel@hp.com>
> Subject: [PATCH net v2] net: ethernet: ti: am65-cpts: Fix PTPv1 message type on TX packets
> 
> CAUTION: External Email 
> From: Jason Reeder <mailto:jreeder@ti.com>
> 
> 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 <mailto:jreeder@ti.com>
> Signed-off-by: Ravi Gunasekaran <mailto:r-gunasekaran@ti.com>
> Tested-by: Ed Trexel <ed.trexel@hp.com>

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

  reply	other threads:[~2024-04-25  5:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-24  7:16 Ravi Gunasekaran
2024-04-25  1:36 ` Trexel, Ed
2024-04-25  5:09   ` Ravi Gunasekaran [this message]
2024-04-25 15:30 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d5b1864b-9756-92f0-ba32-1009aa89e83d@ti.com \
    --to=r-gunasekaran@ti.com \
    --cc=davem@davemloft.net \
    --cc=ed.trexel@hp.com \
    --cc=edumazet@google.com \
    --cc=jreeder@ti.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=rogerq@kernel.org \
    --cc=s-vadapalli@ti.com \
    --cc=srk@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®