On 12/29/2021 1:12 PM, pecka...@fel.cvut.cz wrote: > Thanks for the ftrace tips, Jake. > > I ran it with a 'igb_*' filter and grepped everything with ptp and > excluded the rx_hang calls. This is the whole trace after starting the > PTP client: > > ptp4l-23256 [007] ...1 1064642.422359: igb_ptp_gettime_82576 > <-ptp_clock_gettime > ptp4l-23256 [007] d..2 1064642.422362: igb_ptp_read_82576 > <-timecounter_read > ptp4l-23256 [007] d..2 1064642.422362: igb_rd32 > <-igb_ptp_read_82576 > ptp4l-23256 [007] d..2 1064642.422366: igb_rd32 > <-igb_ptp_read_82576 > ptp4l-23256 [007] ...1 1064642.422388: igb_ptp_adjfreq_82576 > <-ptp_clock_adjtime > ptp4l-23256 [007] ...1 1064642.472550: igb_ptp_set_ts_config > <-igb_ioctl > ptp4l-23256 [007] ...1 1064642.472551: igb_ptp_set_timestamp_mode > <-igb_ptp_set_ts_config > ptp4l-23256 [007] ...1 1064642.472552: igb_rd32 > <-igb_ptp_set_timestamp_mode > ptp4l-23256 [007] ...1 1064642.472557: igb_rd32 > <-igb_ptp_set_timestamp_mode > ptp4l-23256 [007] ...1 1064642.472567: igb_rd32 > <-igb_ptp_set_timestamp_mode > ptp4l-23256 [007] ...1 1064642.472571: igb_rd32 > <-igb_ptp_set_timestamp_mode > ptp4l-23256 [007] ...1 1064642.472576: igb_rd32 > <-igb_ptp_set_timestamp_mode > ptp4l-23256 [007] ...1 1064642.472581: igb_rd32 > <-igb_ptp_set_timestamp_mode > ptp4l-23256 [007] ...1 1064642.472585: igb_rd32 > <-igb_ptp_set_timestamp_mode > kworker/7:0-19672 [007] ...1 1064642.682658: igb_ptp_tx_work > <-process_one_work > kworker/7:0-19672 [007] ...1 1064642.682660: igb_rd32 <-igb_ptp_tx_work > kworker/7:0-19672 [007] ...1 1064642.682666: igb_rd32 <-igb_ptp_tx_work > kworker/7:0-19672 [007] ...1 1064642.682670: igb_rd32 <-igb_ptp_tx_work > kworker/7:0-19672 [007] ...1 1064642.682673: igb_ptp_systim_to_hwtstamp > <-igb_ptp_tx_work > kworker/7:0-19672 [007] ...1 1064644.014869: igb_ptp_tx_work > <-process_one_work > kworker/7:0-19672 [007] ...1 1064644.014878: igb_rd32 <-igb_ptp_tx_work > kworker/7:0-19672 [007] ...1 1064644.014884: igb_rd32 <-igb_ptp_tx_work > kworker/7:0-19672 [007] ...1 1064644.014888: igb_rd32 <-igb_ptp_tx_work > kworker/7:0-19672 [007] ...1 1064644.014891: igb_ptp_systim_to_hwtstamp > <-igb_ptp_tx_work > kworker/7:0-19672 [007] ...1 1064645.055664: igb_ptp_tx_work > <-process_one_work > kworker/7:0-19672 [007] ...1 1064645.055665: igb_rd32 <-igb_ptp_tx_work > kworker/7:0-19672 [007] ...1 1064645.055672: igb_rd32 <-igb_ptp_tx_work > kworker/7:0-19672 [007] ...1 1064645.055675: igb_rd32 <-igb_ptp_tx_work > kworker/7:0-19672 [007] ...1 1064645.055679: igb_ptp_systim_to_hwtstamp > <-igb_ptp_tx_work > kworker/7:0-19672 [007] ...1 1064645.521853: igb_ptp_tx_work > <-process_one_work > kworker/7:0-19672 [007] ...1 1064645.521854: igb_rd32 <-igb_ptp_tx_work > kworker/7:0-19672 [007] ...1 1064645.521860: igb_rd32 <-igb_ptp_tx_work > kworker/7:0-19672 [007] ...1 1064645.521864: igb_rd32 <-igb_ptp_tx_work > kworker/7:0-19672 [007] ...1 1064645.521867: igb_ptp_systim_to_hwtstamp > <-igb_ptp_tx_work > > So there's not a single call to igb_ptp_rx_rgtstamp . There's even not a > single call to igb_process_skb_fields . That's kind of weird. But > wireshark sees packets coming, so they should not be discarded. >
You won't see igb_process_skb_fields in the grep for ptp, because it doesn't have ptp in its name, nor does its caller. Your particular device, if I remember, should be an older card which only supports one timestamp at a time. Because this hardware only supports timestamping one frame at a time, it is plausible that somehow the config for what packets to timestamp is broken.. But I checked the set timestamp mode function and it looks reasonable. For L2 packets this sets an ethertype filter on the PTP ethertype. For L4 packets it sets a filter for the PTP UDP port. Unless you have some network setup that is weird like VLANs, changing the port numbers, etc.. I don't see much else that could be wrong here. Nothing obvious is different between newer drivers, though its possible there is a bug in both this driver version and the most recent driver... > If it helps, I think this is the exact version of igb running on the > machine: > https://nv-tegra.nvidia.com/r/gitweb?p=linux-4.9.git;a=tree;f=drivers/net/ethernet/intel/igb;hb=43744be0144f1aefb06ade8e684fe5497d557e6f > . It is compiled in the kernel, not as a module. > I did fetch this and take a closer look. There are some changes but nothing in the PTP area that looks especially problematic. > Thanks for further hints. On Jan 3 I should get back to the hardware, so > then I can provide a "diff" of the trace with the working igb card. > Right. I suspect this comparison won't help us much because the newer card supports timestamping all frames, while this card does not. At this point, I think I've exhausted all the potential obvious avenues of known issues I recall being fixed. > Martin > > -- > Mgr. Martin Pecka, Ph.D. > Researcher at Vision for Robotics and Autonomous Systems group > Faculty of Electrical Engineering > Czech Technical University in Prague > Phone: +420 22435 7269 > _______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users