From: Patrick Ohly <patrick.ohly@intel.com>
To: netdev@vger.kernel.org
Cc: Octavian Purdila <opurdila@ixiacom.com>,
Stephen Hemminger <shemminger@vyatta.com>,
Ingo Oeser <netdev@axxeo.de>, Andi Kleen <ak@linux.intel.com>,
John Ronciak <john.ronciak@intel.com>,
Eric Dumazet <dada1@cosmosbay.com>,
Oliver Hartkopp <oliver@hartkopp.net>
Subject: [RFC PATCH 00/13] hardware time stamping + igb example implementation
Date: Tue, 11 Nov 2008 15:44:57 +0100 [thread overview]
Message-ID: <1226414697.17450.852.camel@ecld0pohly> (raw)
Hello all!
This patch series is related to Octavian's proposals a while ago ("net:
support for TX timestamps", "net: support for hardware timestamps"). It
mostly implements the revised plan discussed recently ("hardware time
stamps + existing time stamp usage").
As part of that discussion there was no consensus on storing hardware
time stamps in sk_buff. One suggested solution for avoiding a new field
was based on storing a transformed hardware time stamp in the existing
field (thus keeping the existing code happy) and then transforming back
to the original hardware time base if needed.
This patch series follows that approach, but the utility code which is
used to transform from hardware time to system time doesn't implement
the necessary inverse transformation. This means that although access to
the original, raw hardware time stamp is part of the API, the
corresponding value is never actually reported by the existing code. If
this value is required, then the final patch shows how a separate
hardware time stamp field solves the problem with a lot less hassle.
If the extra field is considered acceptable unconditionally, then the
#ifdefs become redundant and the code much cleaner. I would prefer this
solution, but I don't know what the performance impact of a larger
sk_buff really is.
This patch series is currently based on v2.6.27. If it is considered for
inclusion, then I'd make sure that PTPd indeed works with this patch
(currently it has only been tested with the included example program)
and resubmit the patch based on the latest netdev branch. This is my
first contribution to the Linux kernel; it hasn't been discussed inside
Intel either. So please give it the treatment that a newbie patch
deserves: thorough, but not too harsh critisism ;-) Thanks!
I'm sure there will be things to correct. To spare you the trouble of
searching for them, here are some I already know of:
* there's currently no locking of the newly added fields in the
igb private data structure; I don't quite understand how locking
currently works in the igb driver (or net_device in general)
* because of the missing locking I also haven't fully implemented
the part which matches TX time stamps with the right outgoing
packet and the "time stamp all packets" mode
* as noted in the patch, the assumption that skb->sk is still
valid after net_device->hard_start_xmit is not always true (this
was what I mentioned earlier on this list, without actually
understanding what was happening at that time)
* in combination with IP_MULTICAST_LOOP packets which already
carry a time stamp reach dev_start_hard_xmit(), which conflicts
with the use of the time stamp field to carry time stamping
requests
Any tips regarding them are very much appreciated.
--
Best Regards, Patrick Ohly
The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.
next reply other threads:[~2008-11-11 14:56 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-11 14:44 Patrick Ohly [this message]
2008-10-22 8:17 ` [RFC PATCH 02/13] extended semantic of sk_buff::tstamp: lowest bit marks hardware time stamps Patrick Ohly
2008-11-12 7:41 ` Eric Dumazet
2008-11-12 8:09 ` Patrick Ohly
2008-11-12 10:09 ` David Miller
2008-11-12 9:58 ` David Miller
2008-11-19 12:50 ` Patrick Ohly
2008-10-22 12:46 ` [RFC PATCH 01/13] put_cmsg_compat + SO_TIMESTAMP[NS]: use same name for value as caller Patrick Ohly
2008-11-12 9:55 ` David Miller
2008-10-22 15:01 ` [RFC PATCH 03/13] user space API for time stamping of incoming and outgoing packets Patrick Ohly
2008-11-12 10:02 ` David Miller
2008-10-24 13:41 ` [RFC PATCH 04/13] net: implement generic SOF_TIMESTAMPING_TX_* support Patrick Ohly
2008-11-11 23:15 ` Octavian Purdila
2008-11-12 8:38 ` Patrick Ohly
2008-10-24 13:49 ` [RFC PATCH 05/13] ip: support for TX timestamps on UDP and RAW sockets Patrick Ohly
2008-11-12 9:59 ` David Miller
2008-10-29 14:48 ` [RFC PATCH 06/13] workaround: detect time stamp when command flags are expected Patrick Ohly
2008-11-12 10:00 ` David Miller
2008-10-31 11:43 ` [RFC PATCH 07/13] net: add SIOCSHWTSTAMP - hardware time stamping of packets Patrick Ohly
2008-10-31 12:21 ` [RFC PATCH 08/13] igb: stub support for SIOCSHWTSTAMP Patrick Ohly
2008-11-04 9:23 ` [RFC PATCH 09/13] clocksource: allow usage independent of timekeeping.c Patrick Ohly
2008-11-12 10:04 ` David Miller
2008-11-04 9:27 ` [RFC PATCH 10/13] igb: infrastructure for hardware time stamping Patrick Ohly
2008-11-05 9:58 ` [RFC PATCH 11/13] time sync: generic infrastructure to map between time stamps generated by a clock source and system time Patrick Ohly
2008-11-11 16:18 ` Andi Kleen
2008-11-12 8:01 ` Patrick Ohly
2008-11-12 10:08 ` David Miller
2008-11-12 16:14 ` Patrick Ohly
2008-11-12 16:28 ` Eric Dumazet
2008-11-12 10:05 ` David Miller
2008-11-06 11:13 ` [RFC PATCH 12/13] igb: use clocksync to implement hardware time stamping Patrick Ohly
2008-11-07 9:26 ` [RFC PATCH 13/13] skbuff: optionally store hardware time stamps in new field Patrick Ohly
2008-11-12 16:06 ` [RFC PATCH 00/13] hardware time stamping + igb example implementation Andi Kleen
2008-11-12 16:25 ` Patrick Ohly
2008-11-12 18:44 ` Oliver Hartkopp
2008-11-12 19:22 ` Eric Dumazet
2008-11-12 20:23 ` Andi Kleen
2008-11-12 20:23 ` Andi Kleen
2008-11-12 20:56 ` Eric Dumazet
2008-11-12 21:34 ` Andi Kleen
2008-11-12 22:26 ` Oliver Hartkopp
2008-11-13 15:53 ` Ohly, Patrick
2008-11-13 6:15 ` Oliver Hartkopp
2008-11-13 6:29 ` Eric Dumazet
2008-11-13 16:05 ` Ohly, Patrick
2008-11-16 8:15 ` Andrew Shewmaker
2008-11-12 22:17 ` David Miller
2008-11-19 12:39 ` Patrick Ohly
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=1226414697.17450.852.camel@ecld0pohly \
--to=patrick.ohly@intel.com \
--cc=ak@linux.intel.com \
--cc=dada1@cosmosbay.com \
--cc=john.ronciak@intel.com \
--cc=netdev@axxeo.de \
--cc=netdev@vger.kernel.org \
--cc=oliver@hartkopp.net \
--cc=opurdila@ixiacom.com \
--cc=shemminger@vyatta.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).