-----Original Message-----
From: Keller, Jacob E [mailto:[email protected]]
Sent: Wednesday, September 03, 2014 5:59 AM
To: Sriharsha Basavapatna; Richard Cochran
Cc: [email protected]
Subject: RE: [Linuxptp-users] One-step sync and P2P mode issue
Hi,
> -----Original Message-----
> From: Sriharsha Basavapatna
> [mailto:[email protected]]
> Sent: Tuesday, September 02, 2014 3:00 AM
> To: Richard Cochran
> Cc: Keller, Jacob E;
> [email protected]<mailto:[email protected]>
> 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?
>> I believe it is specific to SYNC packets only in this context; at least
>> w.r.t the flag HWTSTAMP_TX_ONESTEP_SYNC.
You may have to check these. At any rate, I believe we already implement packet
filters which will do this for you very efficiently.
>> It'd be better if we can avoid this condition itself, which requires packet
>> filtering.
In the one-step case, you will configure hardware to directly insert the
timestamp into the packet buffer as it transmits it
>> HW inserts the timestamp (see my earlier email with details). And provides a
>> copy of timestamp to driver. The driver has been asked by the stack to give
>> a copy of the transmitted packet via the error queue, as clearly indicated
>> by skb->tx_flags: SKBTX_HW_TSTAMP. But the driver has to make an exception
>> just for the 1-step Sync packet and to know that it's a 1-step Sync, it has
>> to parse the packet.
Thanks,
-Harsha
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
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Linuxptp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-users