Subject: More info on SO_TIMESTAMPING problems in V6

From: "Marcus D. Leech" <[email-masked]>
Date: Tue, 10 Nov 2009 14:03:19 -0500

It looks like there *isn't* support on the V6 side for SO_TIMESTAMPING.

The ipv6/udp.c  calls the V4 udp_sendmsg when the packet is a "V4 on a 
V6 socket", but otherwise
   the necessary "goop" doesn't appear to be implemented for V6.

In particular, the V4 udp_sendmsg function has a structure, ipcm_cookie, 
which appears to
   be used to carry the shtx flags, including the "hardware" flag that 
indicates hardware
   timestamping.  It's not clear exactly where this gets "attached" to 
the outgoing SKB, but
   none of this appears in the V6 version of udp.c

While the V6 udp.c is quite *similar* to the V4 version, some of the 
data structures are
   quite different, and it's not clear to me where to begin.  Further, I 
got a note from Patrick
   Ohly indicating that the e1000 driver guys at Intel have been the 
ones maintaining the
   SO_TIMESTAMPING code, so I don't want to replicate work that may 
already be in-progress/
   done.

Looking at even the latest kernel code, there's no hint that this has 
been addressed.

Also, there's no hint of implementation for net/packet (AF_PACKET).

The context of all this is a PTPV2 (IEEE1588-2008) implementation that 
requires hardware time-stamping support for all three of: IPV4, IPV6, 
and ETHERNET (AF_PACKET/SOCK_DGRAM).

I've been testing with IPV4 exclusively, and it has been working quite well.