[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ft9m9rr9.fsf@kurt>
Date: Mon, 20 Jul 2020 16:37:46 +0200
From: Kurt Kanzenbach <kurt.kanzenbach@...utronix.de>
To: Richard Cochran <richardcochran@...il.com>
Cc: Russell King <rmk+kernel@...linux.org.uk>,
Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
Heiner Kallweit <hkallweit1@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org
Subject: Re: [PATCH RFC net-next] net: phy: add Marvell PHY PTP support
On Mon Jul 20 2020, Richard Cochran wrote:
> 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:
>> > 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;
Yes, makes sense. It should work.
>
>
> Of course, the structure should use the kernel types that include the
> big endian annotations.
Sure.
Thanks,
Kurt
Download attachment "signature.asc" of type "application/pgp-signature" (833 bytes)
Powered by blists - more mailing lists