linux_dsm_epyc7002/include/uapi/linux
Alexei Starovoitov 3274f52073 bpf: add 'flags' attribute to BPF_MAP_UPDATE_ELEM command
the current meaning of BPF_MAP_UPDATE_ELEM syscall command is:
either update existing map element or create a new one.
Initially the plan was to add a new command to handle the case of
'create new element if it didn't exist', but 'flags' style looks
cleaner and overall diff is much smaller (more code reused), so add 'flags'
attribute to BPF_MAP_UPDATE_ELEM command with the following meaning:
 #define BPF_ANY	0 /* create new element or update existing */
 #define BPF_NOEXIST	1 /* create new element if it didn't exist */
 #define BPF_EXIST	2 /* update existing element */

bpf_update_elem(fd, key, value, BPF_NOEXIST) call can fail with EEXIST
if element already exists.

bpf_update_elem(fd, key, value, BPF_EXIST) can fail with ENOENT
if element doesn't exist.

Userspace will call it as:
int bpf_update_elem(int fd, void *key, void *value, __u64 flags)
{
    union bpf_attr attr = {
        .map_fd = fd,
        .key = ptr_to_u64(key),
        .value = ptr_to_u64(value),
        .flags = flags;
    };

    return bpf(BPF_MAP_UPDATE_ELEM, &attr, sizeof(attr));
}

First two bits of 'flags' are used to encode style of bpf_update_elem() command.
Bits 2-63 are reserved for future use.

Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-18 13:43:25 -05:00
..
byteorder
caif
can
cifs
dvb
genwqe
hdlc
hsi
isdn
mmc
netfilter
netfilter_arp
netfilter_bridge
netfilter_ipv4
netfilter_ipv6
nfsd
raid md: discard PRINT_RAID_DEBUG ioctl 2014-10-14 13:08:29 +11:00
spi
sunrpc
tc_act
tc_ematch
usb
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: add 'flags' attribute to BPF_MAP_UPDATE_ELEM command 2014-11-18 13:43:25 -05: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-log-userspace.h
dn.h
dqblk_xfs.h
edd.h
efs_fs_sb.h
elf-em.h
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
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
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
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
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: include in6.h in if_bridge.h for struct in6_addr 2014-11-05 17:13:34 -05:00
if_cablemodem.h
if_eql.h
if_ether.h
if_fc.h
if_fddi.h
if_frad.h
if_hippi.h
if_infiniband.h
if_link.h bridge: Add support for IEEE 802.11 Proxy ARP 2014-10-27 19:02:04 -04: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
in_route.h
in.h
inet_diag.h
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
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 uapi: resort Kbuild entries 2014-11-07 14:49:37 -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
keyboard.h
keyctl.h
kvm_para.h
kvm.h
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
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
net_dropmon.h
net_tstamp.h
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 cfg80211: 802.11p OCB mode handling 2014-11-04 13:18:17 +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
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
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
serial_reg.h
serial.h
serio.h
shm.h
signal.h
signalfd.h
smiapp.h
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
taskstats.h
tcp_metrics.h
tcp.h
telephony.h
termios.h
time.h
times.h
timex.h
tiocl.h
tipc_config.h
tipc.h
toshiba.h
tty_flags.h
tty.h
types.h
udf_fs_i.h
udp.h
uhid.h
uinput.h
uio.h
ultrasound.h
un.h
unistd.h
unix_diag.h
usbdevice_fs.h
usbip.h
utime.h
utsname.h
uuid.h
uvcvideo.h
v4l2-common.h
v4l2-controls.h
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
vhost.h
videodev2.h
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
wimax.h
wireless.h
x25.h
xattr.h
xfrm.h
zorro_ids.h
zorro.h