[Intel-wired-lan] [next PATCH S49-V2 12/15] i40e: correct check for reading TSYNINDX from the receive descriptor
Bowers, AndrewX
andrewx.bowers at intel.com
Fri Oct 7 16:33:33 UTC 2016
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Bimmy Pujari
> Sent: Wednesday, October 05, 2016 9:31 AM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S49-V2 12/15] i40e: correct check for
> reading TSYNINDX from the receive descriptor
>
> From: Jacob Keller <jacob.e.keller at intel.com>
>
> When hardware has taken a timestamp for a received packet, it indicates
> which RXTIME register the timestamp was placed in by some bits in the
> receive descriptor. It uses 3 bits, one to indicate if the descriptor index is valid
> (ie: there was a timestamp) and 2 bits to indicate which of the 4 registers to
> read. However, the driver currently does not check the TSYNVALID bit and
> only checks the index. It assumes a zero index means no timestamp, and a
> non zero index means a timestamp occurred.
> While this appears to be true, it prevents ever reading a timestamp in
> RXTIME[0], and causes the first timestamp the device captures to be ignored.
>
> Fix this by using the TSYNVALID bit correctly as the true indicator of whether
> the packet has an associated timestamp.
>
> Also rename the variable rsyn to tsyn as this is more descriptive and matches
> the register names.
>
> Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
> Change-ID: I4437e8f3a3df2c2ddb458b0fb61420f3dafc4c12
> ---
> drivers/net/ethernet/intel/i40e/i40e_txrx.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
Tested-by: Andrew Bowers <andrewx.bowers at intel.com>
More information about the Intel-wired-lan
mailing list