linux/include/uapi/asm-generic
Miroslav Lichvar aad9c8c470 net: add new control message for incoming HW-timestamped packets
Add SOF_TIMESTAMPING_OPT_PKTINFO option to request a new control message
for incoming packets with hardware timestamps. It contains the index of
the real interface which received the packet and the length of the
packet at layer 2.

The index is useful with bonding, bridges and other interfaces, where
IP_PKTINFO doesn't allow applications to determine which PHC made the
timestamp. With the L2 length (and link speed) it is possible to
transpose preamble timestamps to trailer timestamps, which are used in
the NTP protocol.

While this information could be provided by two new socket options
independently from timestamping, it doesn't look like they would be very
useful. With this option any performance impact is limited to hardware
timestamping.

Use dev_get_by_napi_id() to get the device and its index. On kernels
with disabled CONFIG_NET_RX_BUSY_POLL or drivers not using NAPI, a zero
index will be returned in the control message.

CC: Richard Cochran <richardcochran@gmail.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-05-21 13:37:32 -04:00
..
Kbuild.asm uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
auxvec.h
bitsperlong.h
errno-base.h
errno.h errno.h: Improve ENOSYS's comment 2015-04-17 09:03:58 -04:00
fcntl.h vfs: renumber FMODE_NONOTIFY and add to uniqueness check 2015-01-08 15:10:52 -08:00
int-l64.h
int-ll64.h
ioctl.h userfaultfd: document _IOR/_IOW 2017-02-22 16:41:27 -08:00
ioctls.h
ipcbuf.h
kvm_para.h
mman-common.h x86/pkeys: Allocation/free syscalls 2016-09-09 13:02:27 +02:00
mman.h mm: mlock: add mlock flags to enable VM_LOCKONFAULT usage 2015-11-05 19:34:48 -08:00
msgbuf.h
param.h
poll.h
posix_types.h
resource.h
sembuf.h
setup.h
shmbuf.h
shmparam.h
siginfo.h mm/pkeys: Fix siginfo ABI breakage caused by new u64 field 2016-03-05 15:00:06 +01:00
signal-defs.h
signal.h arm64: Fix MINSIGSTKSZ and SIGSTKSZ 2015-10-12 17:40:12 +01:00
socket.h net: add new control message for incoming HW-timestamped packets 2017-05-21 13:37:32 -04:00
sockios.h
stat.h
statfs.h
swab.h
termbits.h
termios.h
types.h
ucontext.h
unistd.h Remove compat_sys_getdents64() 2017-04-17 12:52:22 -04:00