twx-linux/include/uapi/linux
Daniel Borkmann d67b9cd28c xdp: refine xdp api with regards to generic xdp
While working on the iproute2 generic XDP frontend, I noticed that
as of right now it's possible to have native *and* generic XDP
programs loaded both at the same time for the case when a driver
supports native XDP.

The intended model for generic XDP from b5cdae3291f7 ("net: Generic
XDP") is, however, that only one out of the two can be present at
once which is also indicated as such in the XDP netlink dump part.
The main rationale for generic XDP is to ease accessibility (in
case a driver does not yet have XDP support) and to generically
provide a semantical model as an example for driver developers
wanting to add XDP support. The generic XDP option for an XDP
aware driver can still be useful for comparing and testing both
implementations.

However, it is not intended to have a second XDP processing stage
or layer with exactly the same functionality of the first native
stage. Only reason could be to have a partial fallback for future
XDP features that are not supported yet in the native implementation
and we probably also shouldn't strive for such fallback and instead
encourage native feature support in the first place. Given there's
currently no such fallback issue or use case, lets not go there yet
if we don't need to.

Therefore, change semantics for loading XDP and bail out if the
user tries to load a generic XDP program when a native one is
present and vice versa. Another alternative to bailing out would
be to handle the transition from one flavor to another gracefully,
but that would require to bring the device down, exchange both
types of programs, and bring it up again in order to avoid a tiny
window where a packet could hit both hooks. Given this complicates
the logic for just a debugging feature in the native case, I went
with the simpler variant.

For the dump, remove IFLA_XDP_FLAGS that was added with b5cdae3291f7
and reuse IFLA_XDP_ATTACHED for indicating the mode. Dumping all
or just a subset of flags that were used for loading the XDP prog
is suboptimal in the long run since not all flags are useful for
dumping and if we start to reuse the same flag definitions for
load and dump, then we'll waste bit space. What we really just
want is to dump the mode for now.

Current IFLA_XDP_ATTACHED semantics are: nothing was installed (0),
a program is running at the native driver layer (1). Thus, add a
mode that says that a program is running at generic XDP layer (2).
Applications will handle this fine in that older binaries will
just indicate that something is attached at XDP layer, effectively
this is similar to IFLA_XDP_FLAGS attr that we would have had
modulo the redundancy.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-05-11 21:30:57 -04:00
..
android binder: Add support for file-descriptor arrays 2017-02-10 16:00:01 +01:00
byteorder
caif
can can: add Virtual CAN Tunnel driver (vxcan) 2017-04-25 09:04:30 +02:00
cifs
dvb
genwqe
hdlc
hsi
iio iio: Add channel for Gravity 2017-01-05 13:02:25 +00:00
isdn
mmc
netfilter Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf 2017-05-03 10:11:26 -04:00
netfilter_arp
netfilter_bridge
netfilter_ipv4
netfilter_ipv6
nfsd nfsd: opt in to labeled nfs per export 2017-01-31 12:31:54 -05:00
raid uapi: fix linux/raid/md_p.h userspace compilation error 2017-04-20 09:41:45 -07:00
sched sched/headers: Move various ABI definitions to <uapi/linux/sched/types.h> 2017-03-02 08:42:42 +01:00
spi
sunrpc
tc_act net/act_pedit: Introduce 'add' operation 2017-02-10 13:18:33 -05:00
tc_ematch
usb usb: fix some references for /proc/bus/usb 2017-04-18 16:54:19 +02:00
wimax
a.out.h
acct.h
adb.h
adfs_fs.h
affs_hardblocks.h
agpgart.h
aio_abi.h
am437x-vpfe.h
apm_bios.h
arcfb.h
aspeed-lpc-ctrl.h aspeed-lpc-ctrl: include linux/types.h for uapi header 2017-04-08 17:37:20 +02:00
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 branch 'stable-4.11' of git://git.infradead.org/users/pcmoore/audit 2017-02-21 13:25:50 -08:00
auto_dev-ioctl.h autofs: remove duplicated AUTOFS_DEV_IOCTL_SIZE definition 2017-02-27 18:43:45 -08:00
auto_fs4.h autofs: add command enum/macros for root-dir ioctls 2017-02-27 18:43:45 -08:00
auto_fs.h autofs: add command enum/macros for root-dir ioctls 2017-02-27 18:43:45 -08:00
auxvec.h
ax25.h
b1lli.h
batman_adv.h batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
baycom.h
bcache.h
bcm933xx_hcs.h
bfs_fs.h
binfmts.h
blkpg.h
blktrace_api.h
blkzoned.h
bpf_common.h
bpf_perf_event.h
bpf.h bpf: Add strict alignment flag for BPF_PROG_LOAD. 2017-05-11 14:19:00 -04:00
bpqether.h
bsg.h
bt-bmc.h
btrfs_tree.h
btrfs.h btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h 2017-03-07 14:10:17 +01:00
can.h
capability.h usb: fix some references for /proc/bus/usb 2017-04-18 16:54:19 +02:00
capi.h
cciss_defs.h
cciss_ioctl.h
cdrom.h
cec-funcs.h [media] cec: fix report_current_latency 2016-12-21 06:59:13 -02:00
cec.h [media] cec.h: small typo fix 2017-03-03 07:24:00 -03:00
cgroupstats.h
chio.h
cm4000_cs.h
cn_proc.h
coda_psdev.h
coda.h
coff.h
connector.h
const.h
coresight-stm.h
cramfs_fs.h
cryptouser.h crypto: user - Prepare for CRYPTO_MAX_ALG_NAME expansion 2017-04-10 19:17:26 +08:00
cuda.h
cyclades.h
cycx_cfm.h
dcbnl.h
dccp.h
devlink.h net/devlink: Add E-Switch encapsulation control 2017-04-22 20:26:37 +03:00
dlm_device.h
dlm_netlink.h
dlm_plock.h
dlm.h
dlmconstants.h
dm-ioctl.h
dm-log-userspace.h
dma-buf.h
dn.h
dqblk_xfs.h
edd.h
efs_fs_sb.h
elf-em.h avr32: remove support for AVR32 architecture 2017-05-01 09:27:15 +02:00
elf-fdpic.h
elf.h ARC updates for 4.12 2017-05-09 10:10:15 -07:00
elfcore.h
errno.h
errqueue.h
ethtool.h IB/ipoib: add get_link_ksettings in ethtool 2017-05-04 19:31:46 -04:00
eventpoll.h eventpoll.h: add missing epoll event masks 2017-03-14 09:47:33 +08:00
fadvise.h
falloc.h
fanotify.h
fb.h
fcntl.h statx: Add a system call to make enhanced file info available 2017-03-02 20:51:15 -05:00
fd.h
fdreg.h
fib_rules.h
fiemap.h
filter.h
firewire-cdev.h
firewire-constants.h
flat.h
fou.h
fs.h fscrypt: Remove __packed from fscrypt_policy 2017-04-30 01:26:34 -04:00
fsl_hypervisor.h
fsmap.h vfs: add common GETFSMAP ioctl definitions 2017-04-03 15:18:16 -07:00
fuse.h
futex.h
gameport.h
gen_stats.h
genetlink.h
gfs2_ondisk.h
gigaset_dev.h
gpio.h
gsmmux.h
gtp.h gtp: rename SGSN netlink attribute 2017-03-25 20:11:19 -07:00
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
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 VSOCK: Add vsockmon tap functions 2017-04-24 12:35:56 -04:00
if_bonding.h
if_bridge.h bridge: uapi: add per vlan tunnel info 2017-02-03 15:21:21 -05:00
if_cablemodem.h
if_eql.h
if_ether.h RDMA: Adding ethertype ETH_P_IBOE 2017-01-10 14:05:11 -05:00
if_fc.h
if_fddi.h
if_frad.h
if_hippi.h
if_infiniband.h
if_link.h xdp: refine xdp api with regards to generic xdp 2017-05-11 21:30:57 -04:00
if_ltalk.h
if_macsec.h
if_packet.h packet: add PACKET_FANOUT_FLAG_UNIQUEID to assign new fanout group id. 2017-04-24 12:46:00 -04:00
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 ip6_tunnel: Allow policy-based routing through tunnels 2017-04-21 13:21:30 -04:00
if_vlan.h
if_x25.h
if.h uapi: fix linux/if.h userspace compilation errors 2017-02-22 16:09:04 -05:00
ife.h net: Introduce ife encapsulation module 2017-02-03 15:16:45 -05:00
igmp.h bridge: sparse fixes in br_ip6_multicast_alloc_query() 2017-01-17 15:22:05 -05:00
ila.h
in6.h
in_route.h
in.h
inet_diag.h
inotify.h
input-event-codes.h HID: wacom: generic: add 3 tablet touch keys 2017-03-06 14:06:51 +01:00
input.h HID: sony: Report DS4 motion sensors through a separate device 2017-03-21 15:11:32 +01:00
ioctl.h
ip6_tunnel.h uapi: fix linux/ip6_tunnel.h userspace compilation errors 2017-02-23 10:46:07 -05:00
ip_vs.h
ip.h
ipc.h
ipmi_msgdefs.h
ipmi.h scripts/spelling.txt: add regsiter -> register spelling mistake 2017-05-08 17:15:13 -07:00
ipsec.h
ipv6_route.h net: ipv6: RTF_PCPU should not be settable from userspace 2017-04-21 13:55:33 -04:00
ipv6.h net: ipv6: Add sysctl for minimum prefix len acceptable in RIOs. 2017-03-22 14:20:54 -07: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 pci-v4.12-changes 2017-05-08 19:03:25 -07:00
kcm.h
kcmp.h
kcov.h
kd.h
kdev_t.h
kernel-page-flags.h
kernel.h
kernelcapi.h
kexec.h
keyboard.h
keyctl.h KEYS: add SP800-56A KDF support for DH 2017-04-04 22:33:38 +01:00
kfd_ioctl.h
kvm_para.h KVM: x86: add KVM_HC_CLOCK_PAIRING hypercall 2017-02-07 18:16:45 +01:00
kvm.h KVM/ARM Changes for v4.12. 2017-04-27 17:33:14 +02:00
l2tp.h uapi: fix linux/if_pppol2tp.h userspace compilation errors 2017-02-14 22:18:05 -05:00
libc-compat.h
lightnvm.h lightnvm: allow to init targets on factory mode 2017-04-16 10:06:25 -06:00
limits.h
lirc.h
llc.h uapi: fix linux/llc.h userspace compilation error 2017-02-23 10:46:08 -05:00
loop.h
lp.h
lwtunnel.h
magic.h
major.h
map_to_7segment.h
matroxfb.h
mdio.h
media-bus-format.h media: uapi: Add RGB and YUV bus formats for Synopsys HDMI TX Controller 2017-04-03 11:45:08 -04:00
media.h
mei.h
membarrier.h
memfd.h
mempolicy.h
meye.h
mic_common.h
mic_ioctl.h
mii.h
minix_fs.h
mman.h
mmtimer.h
module.h
mpls_iptunnel.h mpls: allow TTL propagation from IP packets to be configured 2017-03-13 15:29:22 -07:00
mpls.h mpls: Packet stats 2017-01-17 14:38:43 -05:00
mqueue.h uapi: mqueue.h: add missing linux/types.h include 2017-02-24 17:46:56 -08:00
mroute6.h uapi: fix linux/mroute6.h userspace compilation errors 2017-02-19 18:15:12 -05:00
mroute.h uapi: fix linux/mroute.h userspace compilation errors 2017-02-19 18:15:12 -05:00
msdos_fs.h
msg.h
mtio.h
n_r3964.h
nbd-netlink.h nbd: add a status netlink command 2017-04-17 09:58:42 -06:00
nbd.h nbd: add a flag to destroy an nbd device on disconnect 2017-04-17 09:58:42 -06:00
ncp_fs.h
ncp_mount.h
ncp_no.h
ncp.h
ndctl.h libnvdimm: handle locked label storage areas 2017-05-04 15:41:39 -07:00
neighbour.h vxlan: support fdb and learning in COLLECT_METADATA mode 2017-02-03 15:21:21 -05:00
net_dropmon.h
net_namespace.h
net_tstamp.h
net.h
netconf.h net: mpls: Add support for netconf 2017-02-20 11:13:37 -05:00
netdevice.h
netfilter_arp.h
netfilter_bridge.h
netfilter_decnet.h
netfilter_ipv4.h
netfilter_ipv6.h
netfilter.h uapi: stop including linux/sysctl.h in uapi/linux/netfilter.h 2017-02-23 21:51:39 +01:00
netlink_diag.h netlink/diag: report flags for netlink sockets 2017-04-05 07:13:56 -07:00
netlink.h netlink: allow sending extended ACK with cookie on success 2017-04-13 13:58:21 -04:00
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
nilfs2_api.h
nilfs2_ondisk.h
nl80211.h nl80211: add support for BSSIDs in scheduled scan matchsets 2017-04-26 23:17:39 +02:00
nsfs.h nsfs: Add an ioctl() to return owner UID of a userns 2017-02-03 14:35:43 +13:00
nubus.h nubus: Add MVC and VSC video card definitions 2017-04-20 09:54:24 +02:00
nvme_ioctl.h
nvram.h
omap3isp.h
omapfb.h
oom.h
openvswitch.h openvswitch: Add eventmask support to CT action. 2017-04-24 13:53:25 -04:00
packet_diag.h uapi: fix linux/packet_diag.h userspace compilation error 2017-03-09 13:22:28 -08:00
param.h
parport.h
patchkey.h
pci_regs.h pci-v4.12-changes 2017-05-08 19:03:25 -07:00
pci.h
pcitest.h misc: Add host side PCI driver for PCI test function device 2017-04-28 10:23:19 -05:00
perf_event.h powerpc updates for 4.12 part 1. 2017-05-05 11:36:44 -07:00
personality.h
pfkeyv2.h
pg.h
phantom.h
phonet.h
pkt_cls.h net: sched: add helpers to handle extended actions 2017-05-02 15:33:54 -04:00
pkt_sched.h mqprio: Change handling of hw u8 to allow for multiple hardware offload modes 2017-03-15 15:20:27 -07:00
pktcdvd.h
pmu.h
poll.h
posix_acl_xattr.h
posix_acl.h
posix_types.h
ppdev.h
ppp_defs.h
ppp-comp.h
ppp-ioctl.h
pps.h pps: fix padding issue with PPS_FETCH for ioctl_compat 2017-03-17 15:10:49 +09:00
pr.h
prctl.h
psample.h net: Introduce psample, a new genetlink channel for packet sampling 2017-01-24 13:44:28 -05:00
psci.h
ptp_clock.h
ptrace.h
qnx4_fs.h
qnxtypes.h
qrtr.h
quota.h
radeonfb.h
random.h
raw.h
rds.h uapi: fix linux/rds.h userspace compilation errors 2017-02-23 10:55:08 -05:00
reboot.h
reiserfs_fs.h
reiserfs_xattr.h
resource.h
rfkill.h
rio_cm_cdev.h
rio_mport_cdev.h
romfs_fs.h
rose.h
route.h
rpmsg.h rpmsg: Driver for user space endpoint interface 2017-01-18 10:43:15 -08:00
rtc.h
rtnetlink.h rtnetlink: Add RTM_DELNETCONF 2017-03-28 22:32:42 -07:00
scc.h
sched.h
scif_ioctl.h
screen_info.h
sctp.h sctp: add SCTP_PR_STREAM_STATUS sockopt for prsctp 2017-04-03 14:52:35 -07:00
sdla.h
seccomp.h
securebits.h
sed-opal.h uapi: sed-opal fix IOW for activate lsp to use correct struct 2017-02-14 19:47:16 -07:00
seg6_genl.h
seg6_hmac.h ipv6: sr: add missing Kbuild export for header files 2017-01-16 14:47:21 -05:00
seg6_iptunnel.h uapi: fix linux/seg6.h and linux/seg6_iptunnel.h userspace compilation errors 2017-02-23 10:55:08 -05:00
seg6.h uapi: fix linux/seg6.h and linux/seg6_iptunnel.h userspace compilation errors 2017-02-23 10:55:08 -05:00
selinux_netlink.h
sem.h
serial_core.h serial: 8250: Add new port type for TI DA8xx/66AK2x 2017-01-12 11:51:25 +01:00
serial_reg.h serial: exar: Move register defines from uapi header to consumer site 2017-02-10 15:13:26 +01:00
serial.h
serio.h [media] serio.h: add SERIO_RAINSHADOW_CEC ID 2017-04-10 12:34:01 -03:00
shm.h
signal.h
signalfd.h
smc_diag.h smc: netlink interface for SMC sockets 2017-01-09 16:07:41 -05:00
smc.h smc: establish pnet table management 2017-01-09 16:07:38 -05:00
smiapp.h
snmp.h net/tcp_fastopen: Add snmp counter for blackhole detection 2017-04-24 14:27:17 -04:00
sock_diag.h
socket.h
sockios.h
sonet.h
sonypi.h
sound.h
soundcard.h
stat.h uapi: change the type of struct statx_timestamp.tv_nsec to unsigned 2017-04-26 21:19:05 -04:00
stddef.h
stm.h
string.h
suspend_ioctls.h
swab.h
switchtec_ioctl.h switchtec: Add IOCTLs to the Switchtec driver 2017-04-12 12:23:37 -05:00
sync_file.h
synclink.h
sysctl.h net: Remove NET_CORE_BUDGET_USECS from sysctl binary interface. 2017-04-21 15:59:52 -04:00
sysinfo.h
target_core_user.h uapi: fix linux/target_core_user.h userspace compilation errors 2017-02-18 21:44:59 -08:00
taskstats.h
tcp_metrics.h
tcp.h tcp: record pkts sent and retransmistted 2017-01-29 19:17:23 -05:00
telephony.h
termios.h
thermal.h
time.h
timerfd.h timerfd: export defines to userspace 2017-01-10 18:31:55 -08:00
times.h
timex.h
tiocl.h
tipc_config.h
tipc_netlink.h
tipc.h tipc: make replicast a user selectable option 2017-01-20 12:10:17 -05:00
toshiba.h
tty_flags.h
tty.h
types.h linux/types.h: enable endian checks for all sparse builds 2016-12-16 00:13:39 +02:00
udf_fs_i.h
udp.h
uhid.h
uinput.h
uio.h
uleds.h
ultrasound.h
un.h unix: add ioctl to open a unix socket file with O_PATH 2017-02-02 21:58:02 -05:00
unistd.h
unix_diag.h
usbdevice_fs.h
usbip.h
userfaultfd.h userfaultfd: non-cooperative: rollback userfaultfd_exit 2017-03-09 17:01:09 -08:00
userio.h
utime.h
utsname.h
uuid.h
uvcvideo.h
v4l2-common.h
v4l2-controls.h
v4l2-dv-timings.h
v4l2-mediabus.h
v4l2-subdev.h
veth.h
vfio_ccw.h vfio: ccw: introduce ccw_io_region 2017-03-31 12:55:06 +02:00
vfio.h vfio: ccw: realize VFIO_DEVICE_G(S)ET_IRQ_INFO ioctls 2017-03-31 12:55:09 +02:00
vhost.h vhost: remove unused feature bit 2016-12-16 00:13:38 +02:00
videodev2.h [media] videodev.h: add V4L2_CTRL_FLAG_MODIFY_LAYOUT 2017-04-14 22:54:01 -03:00
virtio_9p.h
virtio_balloon.h
virtio_blk.h
virtio_config.h
virtio_console.h
virtio_crypto.h crypto: add virtio-crypto driver 2016-12-16 00:13:32 +02:00
virtio_gpu.h
virtio_ids.h crypto: add virtio-crypto driver 2016-12-16 00:13:32 +02:00
virtio_input.h
virtio_mmio.h virtio_mmio: expose header to userspace 2017-02-27 16:31:23 +02:00
virtio_net.h
virtio_pci.h Revert "virtio_pci: don't duplicate the msix_enable flag in struct pci_dev" 2017-04-11 00:28:41 +03:00
virtio_ring.h
virtio_rng.h
virtio_scsi.h
virtio_types.h linux: drop __bitwise__ everywhere 2016-12-16 00:13:41 +02:00
virtio_vsock.h
vm_sockets.h
vsockmon.h VSOCK: Add vsockmon device 2017-04-24 12:35:56 -04:00
vt.h
vtpm_proxy.h
wait.h
wanrouter.h
watchdog.h
wil6210_uapi.h
wimax.h
wireless.h
x25.h
xattr.h
xfrm.h xfrm: Add an IPsec hardware offloading API 2017-04-14 10:06:10 +02:00
xilinx-v4l2-controls.h
zorro_ids.h
zorro.h