Re: [Linuxptp-users] One-step sync and P2P mode issue
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Keller, J. E <jac...@in...> - 2014-09-03 00:29:14
|
Hi, > -----Original Message----- > From: Sriharsha Basavapatna > [mailto:Sri...@Em...] > Sent: Tuesday, September 02, 2014 3:00 AM > To: Richard Cochran > Cc: Keller, Jacob E; lin...@li... > Subject: RE: [Linuxptp-users] One-step sync and P2P mode issue > > 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). > I do not know if one-step mode is specific to SYNC packets or should handle any transmit timestamps. Richard, do you know? You may have to check these. At any rate, I believe we already implement packet filters which will do this for you very efficiently. In the one-step case, you will configure hardware to directly insert the timestamp into the packet buffer as it transmits it In the other case, you configure hardware to notify driver of the timestamp, and then return it via skb_tstamp_tx I do actually believe that one-step works for any PTP transmitted timestamp, and if you enable TX_ONESTEP_SYNC that you actually have to do this for all packets, but I honestly cannot remember. Regards, Jake > 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 |