The enabling and/or disabling takes place during configuration which is based on the actual HW the driver is loading on. So I think the current code is correct. The HW just won't timestamp at all if it can't or can't be put into that mode. Did you read the datasheet on how the actual HW works regarding timestamping? While "all" can be set for the 82576 HW it can't really do it as there need to be a register read per packet which can't happen in the time when another frame arrives. This will result in all packets arriving being timestamped with the same timestamp until the register is read. So all are being timestamped, just not the way you would expect. That is why it is clearly called out in the HW datasheet that timestamping is only recommended for PTP packets on the 82576 HW. Other Intel Ethernet HW can timestamp all packets.
Cheers, John ----------------------------------------------------------- "...that your people will judge you on what you can build, not what you destroy.", B. Obama, 2009 >-----Original Message----- >From: Ali Gholami Rudi [mailto:[email protected]] >Sent: Monday, December 07, 2009 9:57 AM >To: Ronciak, John; Brandeburg, Jesse; [email protected] >Subject: Re: [E1000-devel] HWTSTAMP_FILTER_ALL for igb > >"Ronciak, John" <[email protected]> wrote: >> >I believe that behavior is expected, 82575/576 don't support >> >timestamp all as I recall. >> > >> Jesse is corerect, the 576 HW only supports the timestamping of 1588 >> idenetifed packets. The 575 HW does not support tinestamping at all. > >Then maybe something like the included patch can be applied (according >to timestamping.txt). Should I resend it to netdev with appropriate >CC's? > > Ali > >diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c >index 714c3a4..bb9400b 100644 >--- a/drivers/net/igb/igb_main.c >+++ b/drivers/net/igb/igb_main.c >@@ -4972,18 +4972,6 @@ static int igb_hwtstamp_ioctl(struct >net_device *netdev, > case HWTSTAMP_FILTER_NONE: > tsync_rx_ctl_bit = 0; > break; >- case HWTSTAMP_FILTER_PTP_V1_L4_EVENT: >- case HWTSTAMP_FILTER_PTP_V2_L4_EVENT: >- case HWTSTAMP_FILTER_PTP_V2_L2_EVENT: >- case HWTSTAMP_FILTER_ALL: >- /* >- * register TSYNCRXCFG must be set, therefore it is not >- * possible to time stamp both Sync and >Delay_Req messages >- * => fall back to time stamping all packets >- */ >- tsync_rx_ctl_type = E1000_TSYNCRXCTL_TYPE_ALL; >- config.rx_filter = HWTSTAMP_FILTER_ALL; >- break; > case HWTSTAMP_FILTER_PTP_V1_L4_SYNC: > tsync_rx_ctl_type = E1000_TSYNCRXCTL_TYPE_L4_V1; > tsync_rx_cfg = E1000_TSYNCRXCFG_PTP_V1_SYNC_MESSAGE; >@@ -5017,6 +5005,10 @@ static int igb_hwtstamp_ioctl(struct >net_device *netdev, > config.rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT; > is_l2 = 1; > break; >+ case HWTSTAMP_FILTER_PTP_V1_L4_EVENT: >+ case HWTSTAMP_FILTER_PTP_V2_L4_EVENT: >+ case HWTSTAMP_FILTER_PTP_V2_L2_EVENT: >+ case HWTSTAMP_FILTER_ALL: > default: > return -ERANGE; > } > ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ E1000-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/e1000-devel
