netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: "Stefan Sørensen" <stefan.sorensen@spectralink.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] dp83640: Fix receive timestamp race condition
Date: Thu, 17 Jul 2014 20:12:22 +0200	[thread overview]
Message-ID: <20140717181222.GB23623@localhost.localdomain> (raw)
In-Reply-To: <1405603079-23572-1-git-send-email-stefan.sorensen@spectralink.com>

On Thu, Jul 17, 2014 at 03:17:59PM +0200, Stefan Sørensen wrote:
> When timestamping received packets, rx_timestamp_work may be scheduled before
> the timestamps is received from the hardware resulting in the packet beeing
> delivered without the timestamp.
> 
> This is fixed by changing the receive timestamp path: On receiving a packet
> that need timestamping, it is added to a queue. When a timestamp arrives, the
> queue is traversed and if a matching packet is found, it is deliverd with the
> timestamp. In case the hardware drops a timestamp, a workqueue regularly
> checks the queue for old packets and delivers them without a timestamp.

And what happens when the timestamp arrives *before* the PTP packet?

The original code was desgined to handle this possibility. Although it
makes logical sense for the PHY to deliver the status frame after the
regular frame, there is nothing in the documentation that confirms
this behavior, and hardware engineering decisions are not always
logical. If some newer silicon revision were to buffer the incoming
packet, waiting for the time stamp logic, then the driver should still
work.

Thanks,
Richard

  reply	other threads:[~2014-07-17 18:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-17 13:17 [PATCH net-next] dp83640: Fix receive timestamp race condition Stefan Sørensen
2014-07-17 18:12 ` Richard Cochran [this message]
2014-07-17 19:24   ` Richard Cochran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140717181222.GB23623@localhost.localdomain \
    --to=richardcochran@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=stefan.sorensen@spectralink.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).