Re: [Linuxptp-users] One-step sync and P2P mode issue
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Sriharsha B. <Sri...@Em...> - 2014-09-02 10:00:35
|
Thanks for the pointer to the flag. But this is still an issue for the driver, since it'd have to parse the packet to find that it's a Sync pkt; please correct me if I'm missing something here. The driver saves this flag when it gets the ioctl request. Then at transmit completion time the driver would still have to check that the flag HWTSTAMP_TX_ONESTEP_SYNC has been set and it should not queue the packet in the error queue if it's a Sync pkt. For other packets say Delay Request it should still continue to queue the pkt in error queue. For example, here's the pseudo code. Before checking the msg type below, the driver would have to parse the packet to find that it's a PTP Sync msg(in a raw Ethernet frame or UDP/IPv4/IPV6 pkt). if (skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP && (ptp_msg->type != MSG_SYNC || (dev-inst->ptp_flags & HWTSTAMP_TX_ONESTEP_SYNC) == 0)) { /* add skb to error queue */ } Thanks, -Harsha -----Original Message----- From: Richard Cochran [mailto:ric...@gm...] Sent: Thursday, August 14, 2014 1:32 PM To: Sriharsha Basavapatna Cc: Keller, Jacob E; lin...@li... Subject: Re: [Linuxptp-users] One-step sync and P2P mode issue On Thu, Aug 14, 2014 at 06:07:29AM +0000, Sriharsha Basavapatna wrote: > May be I didn't explain it clearly earlier. > > I understand one-step mode is where HW support is needed and our > hardware does insert the timestamp. But because the protocol stack > sets the SKBTX_HW_TSTAMP bit in the skb, the driver (which is supposed > to return the tx timestamp back up the stack based on this flag) can't > distinguish this as a special case for Yes, it can. /* * Enables time stamping for outgoing packets just as * HWTSTAMP_TX_ON does, but also enables time stamp insertion * directly into Sync packets. In this case, transmitted Sync * packets will not received a time stamp via the socket error * queue. */ HWTSTAMP_TX_ONESTEP_SYNC, Thanks, Richard |