Netdev Archive on lore.kernel.org
 help / color / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: Kurt Kanzenbach <kurt.kanzenbach@linutronix.de>
Cc: Russell King <rmk+kernel@armlinux.org.uk>,
	Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org
Subject: Re: [PATCH RFC net-next] net: phy: add Marvell PHY PTP support
Date: Mon, 20 Jul 2020 07:21:46 -0700
Message-ID: <20200720142146.GB16001@hoboy> (raw)
In-Reply-To: <20200718022446.GA4599@hoboy>

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;


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

Thanks,
Richard

  reply index

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-14 16:26 Russell King
2020-07-15 18:38 ` Andrew Lunn
2020-07-15 18:56   ` Russell King - ARM Linux admin
2020-07-16 11:33     ` Russell King - ARM Linux admin
2020-07-16 20:53       ` Richard Cochran
2020-07-16 20:48 ` Richard Cochran
2020-07-17  7:54   ` Kurt Kanzenbach
2020-07-18  2:24     ` Richard Cochran
2020-07-20 14:21       ` Richard Cochran [this message]
2020-07-20 14:37         ` Kurt Kanzenbach
2020-07-26 23:48 ` Russell King - ARM Linux admin
2020-07-29 10:58 ` Russell King - ARM Linux admin
2020-07-29 13:19   ` Richard Cochran
2020-07-29 13:28     ` Russell King - ARM Linux admin
2020-07-29 22:07       ` Russell King - ARM Linux admin
2020-07-29 22:53         ` Vladimir Oltean
2020-07-30 15:53         ` Richard Cochran
2020-07-30 18:38           ` Russell King - ARM Linux admin
2020-07-30 19:32             ` Richard Cochran
2020-07-30 19:44               ` Russell King - ARM Linux admin
2020-07-30 11:06     ` [PATCH RFC net-next] net: phy: add Marvell PHY PTP support [multicast/DSA issues] Russell King - ARM Linux admin
2020-07-30 11:54       ` Russell King - ARM Linux admin
2020-07-30 12:47         ` Russell King - ARM Linux admin
2020-07-30 15:50         ` Richard Cochran
2020-07-31 14:41         ` Andrew Lunn

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=20200720142146.GB16001@hoboy \
    --to=richardcochran@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=kurt.kanzenbach@linutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=rmk+kernel@armlinux.org.uk \
    /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

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lkml.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lkml.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lkml.kernel.org/netdev \
		netdev@vger.kernel.org
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git