linux_dsm_epyc7002/include/uapi/linux
Willem de Bruijn 829ae9d611 net-timestamp: allow reading recv cmsg on errqueue with origin tstamp
Allow reading of timestamps and cmsg at the same time on all relevant
socket families. One use is to correlate timestamps with egress
device, by asking for cmsg IP_PKTINFO.

on AF_INET sockets, call the relevant function (ip_cmsg_recv). To
avoid changing legacy expectations, only do so if the caller sets a
new timestamping flag SOF_TIMESTAMPING_OPT_CMSG.

on AF_INET6 sockets, IPV6_PKTINFO and all other recv cmsg are already
returned for all origins. only change is to set ifindex, which is
not initialized for all error origins.

In both cases, only generate the pktinfo message if an ifindex is
known. This is not the case for ACK timestamps.

The difference between the protocol families is probably a historical
accident as a result of the different conditions for generating cmsg
in the relevant ip(v6)_recv_error function:

ipv4:        if (serr->ee.ee_origin == SO_EE_ORIGIN_ICMP) {
ipv6:        if (serr->ee.ee_origin != SO_EE_ORIGIN_LOCAL) {

At one time, this was the same test bar for the ICMP/ICMP6
distinction. This is no longer true.

Signed-off-by: Willem de Bruijn <willemb@google.com>

----

Changes
  v1 -> v2
    large rewrite
    - integrate with existing pktinfo cmsg generation code
    - on ipv4: only send with new flag, to maintain legacy behavior
    - on ipv6: send at most a single pktinfo cmsg
    - on ipv6: initialize fields if not yet initialized

The recv cmsg interfaces are also relevant to the discussion of
whether looping packet headers is problematic. For v6, cmsgs that
identify many headers are already returned. This patch expands
that to v4. If it sounds reasonable, I will follow with patches

1. request timestamps without payload with SOF_TIMESTAMPING_OPT_TSONLY
   (http://patchwork.ozlabs.org/patch/366967/)
2. sysctl to conditionally drop all timestamps that have payload or
   cmsg from users without CAP_NET_RAW.
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-12-08 20:20:48 -05:00
..
byteorder
caif
can
cifs
dvb
genwqe GenWQE: Update author information 2014-09-23 23:15:46 -07:00
hdlc
hsi
isdn
mmc
netfilter netfilter: ipset: Alignment problem between 64bit kernel 32bit userspace 2014-12-03 12:43:35 +01:00
netfilter_arp uapi: netfilter_arp: use __u8 instead of u_int8_t 2014-08-20 15:13:08 +02:00
netfilter_bridge
netfilter_ipv4
netfilter_ipv6
nfsd nfsd: allow turning off nfsv3 readdir_plus 2014-08-18 15:12:14 -04:00
raid md: discard PRINT_RAID_DEBUG ioctl 2014-10-14 13:08:29 +11:00
spi
sunrpc
tc_act sched: introduce vlan action 2014-11-21 14:20:18 -05:00
tc_ematch
usb usb: gadget: f_fs: virtual endpoint address mapping 2014-09-16 09:58:21 -05:00
wimax
a.out.h
acct.h
adb.h
adfs_fs.h
affs_hardblocks.h
agpgart.h
aio_abi.h
apm_bios.h
arcfb.h
atalk.h
atm_eni.h
atm_he.h
atm_idt77105.h
atm_nicstar.h
atm_tcp.h
atm_zatm.h
atm.h
atmapi.h
atmarp.h
atmbr2684.h
atmclip.h
atmdev.h
atmioc.h
atmlec.h
atmmpc.h
atmppp.h
atmsap.h
atmsvc.h
audit.h Merge git://git.infradead.org/users/eparis/audit 2014-10-19 16:25:56 -07:00
auto_fs4.h
auto_fs.h
auxvec.h
ax25.h
b1lli.h
baycom.h
bcache.h
bcm933xx_hcs.h
bfs_fs.h
binfmts.h
blkpg.h
blktrace_api.h
bpf_common.h net: filter: move common defines into bpf_common.h 2014-10-14 16:06:45 -04:00
bpf.h bpf: verifier: add checks for BPF_ABS | BPF_IND instructions 2014-12-05 21:47:32 -08:00
bpqether.h
bsg.h
btrfs.h
can.h
capability.h
capi.h
cciss_defs.h
cciss_ioctl.h
cdrom.h
cgroupstats.h
chio.h
cm4000_cs.h
cn_proc.h
coda_psdev.h
coda.h
coff.h
connector.h
const.h
cramfs_fs.h
cuda.h
cyclades.h
cycx_cfm.h
dcbnl.h
dccp.h
dlm_device.h
dlm_netlink.h
dlm_plock.h
dlm.h
dlmconstants.h
dm-ioctl.h dm: allow active and inactive tables to share dm_devs 2014-10-05 20:03:35 -04:00
dm-log-userspace.h
dn.h
dqblk_xfs.h
edd.h
efs_fs_sb.h
elf-em.h next: openrisc: Fix build 2014-09-26 14:53:23 -04:00
elf-fdpic.h
elf.h s390: add support for vector extension 2014-10-09 09:14:13 +02:00
elfcore.h
errno.h
errqueue.h net-timestamp: ACK timestamp for bytestreams 2014-08-05 16:35:54 -07:00
ethtool.h ethtool, net/mlx4_en: Add 100M, 20G, 56G speeds ethtool reporting support 2014-10-28 17:18:00 -04:00
eventpoll.h
fadvise.h
falloc.h
fanotify.h
fb.h
fcntl.h shm: add sealing API 2014-08-08 15:57:31 -07:00
fd.h
fdreg.h
fib_rules.h
fiemap.h
filter.h net: filter: move common defines into bpf_common.h 2014-10-14 16:06:45 -04:00
firewire-cdev.h
firewire-constants.h
flat.h
fou.h gue: Receive side for Generic UDP Encapsulation 2014-10-03 16:53:33 -07:00
fs.h vfs: add RENAME_WHITEOUT 2014-10-24 00:14:37 +02:00
fsl_hypervisor.h
fuse.h
futex.h
gameport.h
gen_stats.h
genetlink.h
gfs2_ondisk.h
gigaset_dev.h
hash_info.h
hdlc.h
hdlcdrv.h
hdreg.h
hid.h
hiddev.h
hidraw.h
hpet.h
hsr_netlink.h
hw_breakpoint.h
hyperv.h Drivers: hv: util: Properly pack the data for file copy functionality 2014-09-23 23:31:21 -07:00
hysdn_if.h
i2c-dev.h
i2c.h
i2o-dev.h
i8k.h
icmp.h
icmpv6.h
if_addr.h
if_addrlabel.h
if_alg.h
if_arcnet.h
if_arp.h
if_bonding.h
if_bridge.h bridge: add new hwmode swdev 2014-12-02 20:01:23 -08:00
if_cablemodem.h
if_eql.h
if_ether.h net: dsa: reduce number of protocol hooks 2014-08-27 22:59:39 -07:00
if_fc.h
if_fddi.h
if_frad.h
if_hippi.h
if_infiniband.h
if_link.h bridge: add new brport flag LEARNING_SYNC 2014-12-02 20:01:23 -08:00
if_ltalk.h
if_packet.h
if_phonet.h
if_plip.h
if_ppp.h
if_pppol2tp.h
if_pppox.h
if_slip.h
if_team.h
if_tun.h
if_tunnel.h gue: TX support for using remote checksum offload option 2014-11-05 16:30:03 -05:00
if_vlan.h
if_x25.h
if.h
igmp.h
in6.h net: reallocate new socket option number for IPV6_AUTOFLOWLABEL 2014-08-06 15:25:01 -07:00
in_route.h
in.h
inet_diag.h net: tcp: add DCTCP congestion control algorithm 2014-09-29 00:13:10 -04:00
inotify.h
input.h HID: add keyboard input assist hid usages 2014-10-20 21:03:58 +02:00
ioctl.h
ip6_tunnel.h
ip_vs.h ipvs: Add destination address family to netlink interface 2014-09-16 09:03:33 +09:00
ip.h
ipc.h
ipmi_msgdefs.h
ipmi.h
ipsec.h
ipv6_route.h
ipv6.h net: ipv6: Add a sysctl to make optimistic addresses useful candidates 2014-10-29 15:11:36 -04:00
ipx.h
irda.h
irqnr.h
isdn_divertif.h
isdn_ppp.h
isdn.h
isdnif.h
iso_fs.h
ivtv.h
ivtvfb.h
ixjuser.h
jffs2.h
joystick.h
Kbuild tipc: add tipc_netlink.h to uapi Kbuild 2014-11-24 16:21:10 -05:00
kd.h
kdev_t.h
kernel-page-flags.h mm/balloon_compaction: add vmstat counters and kpageflags bit 2014-10-09 22:26:01 -04:00
kernel.h
kernelcapi.h
kexec.h kexec: implementation of new syscall kexec_file_load 2014-08-08 15:57:32 -07:00
keyboard.h
keyctl.h
kvm_para.h
kvm.h KVM: device: add simple registration mechanism for kvm_device_ops 2014-09-17 13:10:08 +02:00
l2tp.h
libc-compat.h
limits.h
llc.h
loop.h
lp.h
magic.h
major.h
map_to_7segment.h
matroxfb.h
mdio.h
media.h
mei.h
memfd.h shm: add memfd_create() syscall 2014-08-08 15:57:31 -07:00
mempolicy.h
meye.h
mic_common.h
mic_ioctl.h
mii.h
minix_fs.h
mman.h
mmtimer.h
module.h
mpls.h
mqueue.h
mroute6.h
mroute.h
msdos_fs.h
msg.h
mtio.h
n_r3964.h
nbd.h
ncp_fs.h
ncp_mount.h
ncp_no.h
ncp.h
neighbour.h bridge: add API to notify bridge driver of learned FBD on offloaded device 2014-12-02 20:01:22 -08:00
net_dropmon.h
net_tstamp.h net-timestamp: allow reading recv cmsg on errqueue with origin tstamp 2014-12-08 20:20:48 -05:00
net.h
netconf.h
netdevice.h
netfilter_arp.h
netfilter_bridge.h
netfilter_decnet.h
netfilter_ipv4.h
netfilter_ipv6.h
netfilter.h
netlink_diag.h
netlink.h
netrom.h
nfc.h
nfs2.h
nfs3.h
nfs4_mount.h
nfs4.h
nfs_fs.h
nfs_idmap.h
nfs_mount.h
nfs.h
nfsacl.h
nl80211.h nl80211: Replace interface socket owner attribute with more generic one 2014-11-19 18:54:40 +01:00
nubus.h
nvme.h
nvram.h
omap3isp.h
omapfb.h
oom.h
openvswitch.h openvswitch: Add support for OVS_FLOW_ATTR_PROBE. 2014-11-09 18:58:44 -08:00
packet_diag.h
param.h
parport.h
patchkey.h
pci_regs.h Merge branches 'pci/aer' and 'pci/virtualization' into next 2014-10-01 12:30:58 -06:00
pci.h
perf_event.h perf: Fix typos in sample code in the perf_event.h header 2014-10-28 10:51:02 +01:00
personality.h
pfkeyv2.h
pg.h
phantom.h
phonet.h
pkt_cls.h
pkt_sched.h
pktcdvd.h
pmu.h
poll.h
posix_types.h
ppdev.h
ppp_defs.h
ppp-comp.h
ppp-ioctl.h
pps.h
prctl.h prctl: PR_SET_MM -- introduce PR_SET_MM_MAP operation 2014-10-09 22:25:55 -04:00
psci.h
ptp_clock.h
ptrace.h
qnx4_fs.h
qnxtypes.h
quota.h
radeonfb.h
random.h random: introduce getrandom(2) system call 2014-08-05 16:41:22 -04:00
raw.h
rds.h
reboot.h
reiserfs_fs.h
reiserfs_xattr.h
resource.h
rfkill.h
romfs_fs.h
rose.h
route.h
rtc.h
rtnetlink.h rtnetlink: add babel protocol recognition 2014-11-10 12:05:59 -05:00
scc.h
sched.h sched: Update comments for CLONE_NEWNS 2014-10-28 10:46:08 +01:00
screen_info.h
sctp.h
sdla.h
seccomp.h
securebits.h
selinux_netlink.h
sem.h
serial_core.h ARM: meson: serial: add MesonX SoC on-chip uart driver 2014-09-08 16:12:40 -07:00
serial_reg.h
serial.h
serio.h
shm.h
signal.h
signalfd.h
smiapp.h [media] smiapp: Add driver-specific test pattern menu item definitions 2014-08-21 15:25:11 -05:00
snmp.h udp: Increment UDP_MIB_IGNOREDMULTI for arriving unmatched multicasts 2014-11-07 15:45:50 -05:00
sock_diag.h
socket.h
sockios.h
som.h
sonet.h
sonypi.h
sound.h
soundcard.h
stat.h
stddef.h
string.h
suspend_ioctls.h
swab.h
synclink.h
sysctl.h
sysinfo.h
target_core_user.h target: Add a user-passthrough backstore 2014-10-03 11:15:20 -07:00
taskstats.h
tcp_metrics.h
tcp.h
telephony.h
termios.h
time.h
times.h
timex.h
tiocl.h
tipc_config.h
tipc_netlink.h tipc: add name table dump to new netlink api 2014-11-21 15:01:32 -05:00
tipc.h
toshiba.h
tty_flags.h
tty.h
types.h
udf_fs_i.h
udp.h
uhid.h HID: uhid: report to user-space whether reports are numbered 2014-08-25 03:28:08 -05:00
uinput.h
uio.h
ultrasound.h
un.h
unistd.h
unix_diag.h
usbdevice_fs.h
usbip.h usbip: move usbip kernel code out of staging 2014-08-25 10:40:06 -07:00
utime.h
utsname.h
uuid.h
uvcvideo.h
v4l2-common.h
v4l2-controls.h [media] v4l: Add camera pan/tilt speed controls 2014-09-21 20:23:39 -03:00
v4l2-dv-timings.h Revert "[media] v4l2-dv-timings: fix a sparse warning" 2014-10-24 08:58:09 -02:00
v4l2-mediabus.h
v4l2-subdev.h
veth.h
vfio.h vfio/iommu_type1: add new VFIO_TYPE1_NESTING_IOMMU IOMMU type 2014-09-29 10:06:19 -06:00
vhost.h
videodev2.h [media] v4l: Add ARGB555X and XRGB555X pixel formats 2014-09-21 20:28:32 -03:00
virtio_9p.h
virtio_balloon.h
virtio_blk.h
virtio_config.h
virtio_console.h
virtio_ids.h
virtio_net.h
virtio_pci.h
virtio_ring.h
virtio_rng.h
vm_sockets.h
vsp1.h
vt.h
wait.h
wanrouter.h
watchdog.h
wil6210_uapi.h wil6210: atomic I/O for the card memory 2014-10-02 14:23:14 -04:00
wimax.h
wireless.h
x25.h
xattr.h xattr: fix check for simultaneous glibc header inclusion 2014-08-29 16:28:16 -07:00
xfrm.h xfrm: configure policy hash table thresholds by netlink 2014-09-02 13:37:56 +02:00
zorro_ids.h
zorro.h