Re: [PATCH RFC net-next] net: phy: add Marvell PHY PTP support

From
Richard Cochran <richardcochran@gmail.com>
Date
2020-07-20 14:21:50
Reply to
Richard Cochran, 2020-07-18
On Fri, Jul 17, 2020 at 07:24:46PM -0700, Richard Cochran wrote:
On Fri, Jul 17, 2020 at 09:54:07AM +0200, Kurt Kanzenbach wrote:
quoted
I'll post the next version of the hellcreek DSA driver probably next
week. I can include a generic ptp_header() function if you like in that
patch series. But, where to put it? ptp core or maybe ptp_classify?
Either place is fine with me.  Maybe it makes most sense in ptp_classify?
Please put the re-factoring in a separate patches, before the new
driver.
And maybe the new header parsing routine should provide a pointer to a
structure with the message layout.  Something similar to this (from
the linuxptp user stack) might work.

struct ptp_header {
	uint8_t             tsmt; /* transportSpecific | messageType */
	uint8_t             ver;  /* reserved          | versionPTP  */
	UInteger16          messageLength;
	UInteger8           domainNumber;
	Octet               reserved1;
	Octet               flagField[2];
	Integer64           correction;
	UInteger32          reserved2;
	struct PortIdentity sourcePortIdentity;
	UInteger16          sequenceId;
	UInteger8           control;
	Integer8            logMessageInterval;
} PACKED;


Of course, the structure should use the kernel types that include the
big endian annotations.

Thanks,
Richard
Thread (74 messages) 74 messages, 9 authors, last reply 2023-04-28
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help