net: new user space API for time stamping of incoming and outgoing packets
authorPatrick Ohly <patrick.ohly@intel.com>
Thu, 12 Feb 2009 05:03:36 +0000 (05:03 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Feb 2009 06:43:33 +0000 (22:43 -0800)
commitcb9eff097831007afb30d64373f29d99825d0068
tree823a5668c6f4b3f577a1d4cc73b3df2d7e33c5c4
parenta75244c3d519fcb490ca2bf3f123c98017f1e8d0
net: new user space API for time stamping of incoming and outgoing packets

User space can request hardware and/or software time stamping.
Reporting of the result(s) via a new control message is enabled
separately for each field in the message because some of the
fields may require additional computation and thus cause overhead.
User space can tell the different kinds of time stamps apart
and choose what suits its needs.

When a TX timestamp operation is requested, the TX skb will be cloned
and the clone will be time stamped (in hardware or software) and added
to the socket error queue of the skb, if the skb has a socket
associated with it.

The actual TX timestamp will reach userspace as a RX timestamp on the
cloned packet. If timestamping is requested and no timestamping is
done in the device driver (potentially this may use hardware
timestamping), it will be done in software after the device's
start_hard_xmit routine.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
26 files changed:
Documentation/networking/timestamping.txt [new file with mode: 0644]
Documentation/networking/timestamping/.gitignore [new file with mode: 0644]
Documentation/networking/timestamping/Makefile [new file with mode: 0644]
Documentation/networking/timestamping/timestamping.c [new file with mode: 0644]
arch/alpha/include/asm/socket.h
arch/arm/include/asm/socket.h
arch/avr32/include/asm/socket.h
arch/blackfin/include/asm/socket.h
arch/cris/include/asm/socket.h
arch/h8300/include/asm/socket.h
arch/ia64/include/asm/socket.h
arch/m68k/include/asm/socket.h
arch/mips/include/asm/socket.h
arch/parisc/include/asm/socket.h
arch/powerpc/include/asm/socket.h
arch/s390/include/asm/socket.h
arch/sh/include/asm/socket.h
arch/sparc/include/asm/socket.h
arch/x86/include/asm/socket.h
arch/xtensa/include/asm/socket.h
include/asm-frv/socket.h
include/asm-m32r/socket.h
include/asm-mn10300/socket.h
include/linux/errqueue.h
include/linux/net_tstamp.h [new file with mode: 0644]
include/linux/sockios.h