netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: Willem de Bruijn <willemb@google.com>
Cc: Paul Chavent <Paul.Chavent@onera.fr>,
	Daniel Borkmann <dborkman@redhat.com>,
	Eric Dumazet <edumazet@google.com>,
	daniel.borkmann@tik.ee.ethz.ch, xemul@parallels.com,
	ebiederm@xmission.com, netdev@vger.kernel.org
Subject: Re: [PATCH] net-packet: tx timestamping on tpacket ring
Date: Wed, 17 Apr 2013 12:22:18 +0200	[thread overview]
Message-ID: <20130417102218.GA13873@netboy> (raw)
In-Reply-To: <CA+FuTSdGdhgpRARbv9zFnDESzCQBzT=DS-WgGZRWBLBvhN_sNg@mail.gmail.com>

On Mon, Apr 15, 2013 at 12:59:26PM -0400, Willem de Bruijn wrote:
> 
> If I understand correctly, the problem that Richard refers to is that
> when one socket requests rx timestamping, all rx skbuffs have to be
> timestamped as it is not known early in the datapath to which socket
> they will be enqueued. As a result, the timestamps in skbuffs depend
> on the preferences of other active sockets. Correct me if I'm wrong.

No, that is not it.

Hardware time stamping needs to be globally enabled at the driver
level using the SIOCSHWTSTAMP [1] ioctl. The hardware has various
different abilities, usually one of:

- no time stamping
- some subset of PTP packets
- all packets

So depending on the mode, not all packets will receive a time
stamp. In addition, some of the hardware can only time stamp one
packet at a time. Furthermore, time stamps can get dropped in high
traffic situations.

The code in af_packet.c unconditionally delivers some sort of time
stamp, with an inexplicable fall back to gettimeofday. Thus, the user
space has no way of knowing what is being reported in the time stamp.

Thanks,
Richard

1. See Documentation/networking/timestamping.txt

  reply	other threads:[~2013-04-17 10:22 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-12 15:29 [RFC] net : add tx timestamp to packet mmap Paul Chavent
2012-12-12 19:23 ` David Miller
2012-12-13  7:13   ` Paul Chavent
2012-12-13 13:29 ` Richard Cochran
2012-12-13 16:13   ` Paul Chavent
2012-12-13 18:17     ` Richard Cochran
2012-12-14  7:57       ` Paul Chavent
2013-04-09 10:42       ` Paul Chavent
2013-04-09 13:15         ` Richard Cochran
2013-04-13 18:33     ` Willem de Bruijn
2013-04-13 18:56       ` [PATCH] net-packet: tx timestamping on tpacket ring Willem de Bruijn
2013-04-13 22:18         ` Daniel Borkmann
2013-04-13 22:47           ` David Miller
2013-04-14  0:04             ` Willem de Bruijn
2013-04-14  0:16               ` Willem de Bruijn
2013-04-14  0:49                 ` Willem de Bruijn
2013-04-14  5:16                   ` Daniel Borkmann
2013-04-14  0:00           ` Willem de Bruijn
2013-04-14 10:52             ` Daniel Borkmann
2013-04-14 13:07               ` Richard Cochran
2013-04-15  7:37                 ` Paul Chavent
2013-04-15 16:56                   ` Richard Cochran
2013-04-15 16:59                   ` Willem de Bruijn
2013-04-17 10:22                     ` Richard Cochran [this message]
2013-04-19 21:51                     ` [PATCH net-next v2] packet: " Willem de Bruijn
2013-04-20 12:33                       ` Daniel Borkmann
2013-04-21  2:30                         ` Willem de Bruijn
2013-04-21 10:10                           ` Daniel Borkmann
2013-04-21 16:42                             ` Willem de Bruijn
2013-04-21 18:14                               ` Daniel Borkmann
2013-04-22  8:19                               ` Paul Chavent
2013-04-22 10:25                                 ` Daniel Borkmann
2013-04-22 14:23                                 ` Willem de Bruijn
2013-04-20 16:43                       ` Richard Cochran
2013-04-21  2:34                         ` Willem de Bruijn
2013-04-15 15:41               ` [PATCH] net-packet: " Paul Chavent
2013-04-15  9:45           ` David Laight
2013-04-15 17:08             ` Willem de Bruijn
2013-04-15 17:31             ` David Miller
2013-04-15  7:31         ` Paul Chavent
2013-04-15 16:37           ` Willem de Bruijn

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=20130417102218.GA13873@netboy \
    --to=richardcochran@gmail.com \
    --cc=Paul.Chavent@onera.fr \
    --cc=daniel.borkmann@tik.ee.ethz.ch \
    --cc=dborkman@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=willemb@google.com \
    --cc=xemul@parallels.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).