linux/include/uapi/linux
Jacob Keller 5d5b4128c4 devlink: introduce flash update overwrite mask
Sections of device flash may contain settings or device identifying
information. When performing a flash update, it is generally expected
that these settings and identifiers are not overwritten.

However, it may sometimes be useful to allow overwriting these fields
when performing a flash update. Some examples include, 1) customizing
the initial device config on first programming, such as overwriting
default device identifying information, or 2) reverting a device
configuration to known good state provided in the new firmware image, or
3) in case it is suspected that current firmware logic for managing the
preservation of fields during an update is broken.

Although some devices are able to completely separate these types of
settings and fields into separate components, this is not true for all
hardware.

To support controlling this behavior, a new
DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK is defined. This is an
nla_bitfield32 which will define what subset of fields in a component
should be overwritten during an update.

If no bits are specified, or of the overwrite mask is not provided, then
an update should not overwrite anything, and should maintain the
settings and identifiers as they are in the previous image.

If the overwrite mask has the DEVLINK_FLASH_OVERWRITE_SETTINGS bit set,
then the device should be configured to overwrite any of the settings in
the requested component with settings found in the provided image.

Similarly, if the DEVLINK_FLASH_OVERWRITE_IDENTIFIERS bit is set, the
device should be configured to overwrite any device identifiers in the
requested component with the identifiers from the image.

Multiple overwrite modes may be combined to indicate that a combination
of the set of fields that should be overwritten.

Drivers which support the new overwrite mask must set the
DEVLINK_SUPPORT_FLASH_UPDATE_OVERWRITE_MASK in the
supported_flash_update_params field of their devlink_ops.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-25 17:20:57 -07:00
..
android
byteorder
caif
can
cifs
dvb
genwqe
hdlc
hsi
iio
isdn
mmc
netfilter Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next 2020-09-09 11:21:19 -07:00
netfilter_arp
netfilter_bridge
netfilter_ipv4
netfilter_ipv6
nfsd
raid
sched
spi
sunrpc
tc_act
tc_ematch
usb include/: replace HTTP links with HTTPS ones 2020-08-12 10:57:59 -07: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
arm_sdei.h
aspeed-lpc-ctrl.h
aspeed-p2a-ctrl.h
atalk.h
atm.h
atm_eni.h
atm_he.h
atm_idt77105.h
atm_nicstar.h
atm_tcp.h
atm_zatm.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
auto_dev-ioctl.h autofs: fix doubled word 2020-08-12 10:58:00 -07:00
auto_fs.h
auto_fs4.h
auxvec.h
ax25.h
batadv_packet.h
batman_adv.h
baycom.h
bcache.h bcache: add bucket_size_hi into struct cache_sb_disk for large bucket 2020-07-25 07:38:21 -06:00
bcm933xx_hcs.h
bfs_fs.h
binfmts.h
blkpg.h
blktrace_api.h
blkzoned.h
bpf.h bpf: Add BPF_PROG_BIND_MAP syscall 2020-09-15 18:28:27 -07:00
bpf_common.h
bpf_perf_event.h
bpfilter.h
bpqether.h
bsg.h
bt-bmc.h
btf.h
btrfs.h btrfs: add metadata_uuid to FS_INFO ioctl 2020-07-27 12:55:43 +02:00
btrfs_tree.h btrfs: use __u16 for the return value of btrfs_qgroup_level() 2020-07-27 12:55:37 +02:00
can.h
capability.h
capi.h
cciss_defs.h
cciss_ioctl.h
cdrom.h
cec-funcs.h
cec.h
cgroupstats.h
chio.h
close_range.h
cm4000_cs.h
cn_proc.h
coda.h
coff.h
connector.h
const.h
coresight-stm.h
cramfs_fs.h
cryptouser.h
cuda.h
cyclades.h
cycx_cfm.h
dcbnl.h
dccp.h
devlink.h devlink: introduce flash update overwrite mask 2020-09-25 17:20:57 -07:00
dlm.h
dlm_device.h
dlm_netlink.h
dlm_plock.h
dlmconstants.h
dm-ioctl.h
dm-log-userspace.h
dma-buf.h
dma-heap.h
dn.h
dns_resolver.h
dqblk_xfs.h
edd.h
efs_fs_sb.h
elf-em.h
elf-fdpic.h
elf.h include/: replace HTTP links with HTTPS ones 2020-08-12 10:57:59 -07:00
errno.h
errqueue.h
erspan.h
ethtool.h ethtool: Add 100base-FX link mode entries 2020-09-19 16:54:35 -07:00
ethtool_netlink.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-22 16:45:34 -07:00
eventpoll.h
fadvise.h
falloc.h
fanotify.h fanotify: add support for FAN_REPORT_NAME 2020-07-27 23:24:00 +02:00
fb.h
fcntl.h
fd.h
fdreg.h
fib_rules.h
fiemap.h
filter.h
firewire-cdev.h
firewire-constants.h
fou.h
fpga-dfl.h
fs.h
fscrypt.h
fsi.h
fsl_hypervisor.h
fsmap.h
fsverity.h
fuse.h
futex.h
gameport.h
gen_stats.h
genetlink.h
gfs2_ondisk.h
gpio.h
gsmmux.h
gtp.h gtp: add notification mechanism 2020-08-27 08:01:47 -07:00
hash_info.h
hdlc.h
hdlcdrv.h
hdreg.h
hid.h
hiddev.h
hidraw.h
hpet.h
hsr_netlink.h hsr: enhance netlink socket interface to support PRP 2020-07-27 12:20:40 -07:00
hw_breakpoint.h
hyperv.h
i2c-dev.h
i2c.h
i2o-dev.h
i8k.h
icmp.h
icmpv6.h icmp6: support rfc 4884 2020-07-24 17:12:41 -07:00
idxd.h Merge branch 'for-linus' into fixes 2020-08-05 19:02:07 +05:30
if.h
if_addr.h
if_addrlabel.h
if_alg.h
if_arcnet.h
if_arp.h
if_bonding.h
if_bridge.h net: bridge: mcast: add support for blocked port groups 2020-09-23 13:24:34 -07: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 net: remove comments on struct rtnl_link_stats 2020-09-17 17:58:13 -07:00
if_ltalk.h
if_macsec.h
if_packet.h
if_phonet.h
if_plip.h
if_ppp.h
if_pppol2tp.h l2tp: remove tunnel and session debug flags field 2020-08-22 12:44:37 -07:00
if_pppox.h
if_slip.h
if_team.h
if_tun.h
if_tunnel.h
if_vlan.h
if_x25.h
if_xdp.h
ife.h
igmp.h
ila.h
in.h net: Fix some comments 2020-08-27 07:55:59 -07:00
in6.h icmp6: support rfc 4884 2020-07-24 17:12:41 -07:00
in_route.h
inet_diag.h ip: expose inet sockopts through inet_diag 2020-09-03 15:17:28 -07:00
inotify.h
input-event-codes.h
input.h
io_uring.h
ioctl.h
iommu.h
ip.h
ip6_tunnel.h
ip_vs.h
ipc.h
ipmi.h
ipmi_bmc.h
ipmi_msgdefs.h
ipsec.h
ipv6.h
ipv6_route.h
ipx.h
irqnr.h
iso_fs.h
isst_if.h platform/x86: ISST: drop a duplicated word in isst_if.h 2020-07-27 16:34:12 +03:00
ivtv.h
ivtvfb.h
jffs2.h
joystick.h
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
kfd_ioctl.h
kvm.h KVM: MIPS: Change the definition of kvm type 2020-09-11 13:22:52 -04:00
kvm_para.h
l2tp.h l2tp: remove tunnel and session debug flags field 2020-08-22 12:44:37 -07:00
libc-compat.h
lightnvm.h
limits.h
lirc.h
llc.h
loop.h
lp.h
lwtunnel.h
magic.h
major.h
map_to_7segment.h include/: replace HTTP links with HTTPS ones 2020-08-12 10:57:59 -07:00
matroxfb.h
max2175.h
mdio.h
media-bus-format.h
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
mount.h
mpls.h
mpls_iptunnel.h
mptcp.h
mqueue.h
mroute.h ipmr: Add high byte of VIF ID to igmpmsg 2020-09-10 12:25:51 -07:00
mroute6.h
mrp_bridge.h
msdos_fs.h
msg.h
mtio.h
n_r3964.h
nbd-netlink.h
nbd.h
ncsi.h
ndctl.h ACPI: NFIT: Define runtime firmware activation commands 2020-07-25 19:34:47 -06:00
neighbour.h
net.h
net_dropmon.h
net_namespace.h
net_tstamp.h
netconf.h
netdevice.h
netfilter.h
netfilter_arp.h
netfilter_bridge.h
netfilter_decnet.h
netfilter_ipv4.h
netfilter_ipv6.h
netlink.h
netlink_diag.h
netrom.h
nexthop.h
nfc.h
nfs.h
nfs2.h
nfs3.h
nfs4.h
nfs4_mount.h
nfs_fs.h
nfs_idmap.h
nfs_mount.h
nfsacl.h
nilfs2_api.h
nilfs2_ondisk.h
nl80211.h nl80211: Unsolicited broadcast probe response support 2020-09-18 14:06:20 +02:00
nsfs.h
nubus.h
nvme_ioctl.h
nvram.h
omap3isp.h
omapfb.h
oom.h
openat2.h
openvswitch.h net: openvswitch: make masks cache size configurable 2020-08-03 15:17:48 -07:00
packet_diag.h
param.h
parport.h
patchkey.h
pci.h
pci_regs.h
pcitest.h
perf_event.h - HW support updates: 2020-08-03 14:51:09 -07:00
personality.h
pfkeyv2.h
pg.h
phantom.h
phonet.h
pkt_cls.h
pkt_sched.h
pktcdvd.h
pmu.h
poll.h
posix_acl.h
posix_acl_xattr.h
posix_types.h
ppdev.h
ppp-comp.h
ppp-ioctl.h
ppp_defs.h
pps.h
pr.h
prctl.h
psample.h
psci.h
psp-sev.h
ptp_clock.h
ptrace.h
qemu_fw_cfg.h
qnx4_fs.h
qnxtypes.h
qrtr.h
quota.h
radeonfb.h
random.h
raw.h
rds.h
reboot.h
reiserfs_fs.h
reiserfs_xattr.h
remoteproc_cdev.h remoteproc: Add remoteproc character device interface 2020-08-04 20:16:37 -07:00
resource.h
rfkill.h
rio_cm_cdev.h
rio_mport_cdev.h
romfs_fs.h
rose.h
route.h
rpl.h
rpl_iptunnel.h
rpmsg.h
rseq.h
rtc.h
rtnetlink.h
rxrpc.h
scc.h
sched.h
scif_ioctl.h
screen_info.h
sctp.h
sdla.h
seccomp.h
securebits.h
sed-opal.h
seg6.h
seg6_genl.h
seg6_hmac.h
seg6_iptunnel.h seg6_iptunnel: Refactor seg6_lwt_headroom out of uapi header 2020-08-03 17:57:40 -07:00
seg6_local.h
selinux_netlink.h
sem.h
serial.h
serial_core.h
serial_reg.h
serio.h
shm.h
signal.h
signalfd.h
smc.h
smc_diag.h
smiapp.h
snmp.h
sock_diag.h
socket.h
sockios.h
sonet.h
sonypi.h
sound.h
soundcard.h
stat.h
stddef.h
stm.h
string.h
suspend_ioctls.h
swab.h
switchtec_ioctl.h
sync_file.h
synclink.h
sysctl.h
sysinfo.h
target_core_user.h scsi: target: tcmu: Implement tmr_notify callback 2020-07-28 22:25:30 -04:00
taskstats.h
tcp.h tcp: add earliest departure time to SCM_TIMESTAMPING_OPT_STATS 2020-07-31 17:00:44 -07:00
tcp_metrics.h
tee.h
termios.h
thermal.h
time.h
time_types.h
timerfd.h
times.h
timex.h
tiocl.h
tipc.h tipc: add automatic rekeying for encryption key 2020-09-18 13:58:37 -07:00
tipc_config.h
tipc_netlink.h tipc: add automatic rekeying for encryption key 2020-09-18 13:58:37 -07:00
tipc_sockets_diag.h
tls.h
toshiba.h
tty.h
tty_flags.h
types.h include/: replace HTTP links with HTTPS ones 2020-08-12 10:57:59 -07:00
udf_fs_i.h
udmabuf.h
udp.h
uhid.h
uinput.h
uio.h
uleds.h
ultrasound.h
um_timetravel.h
un.h
unistd.h
unix_diag.h
usbdevice_fs.h
usbip.h
userfaultfd.h
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
vbox_err.h
vbox_vmmdev_types.h
vboxguest.h
veth.h
vfio.h
vfio_ccw.h
vhost.h vhost-vdpa: support IOTLB batching hints 2020-08-05 18:39:18 -04:00
vhost_types.h vhost-vdpa: support IOTLB batching hints 2020-08-05 18:39:18 -04:00
videodev2.h
virtio_9p.h virtio_9p: correct tags for config space fields 2020-08-05 09:30:19 -04:00
virtio_balloon.h virtio_balloon: correct tags for config space fields 2020-08-05 09:30:20 -04:00
virtio_blk.h virtio_blk: correct tags for config space fields 2020-08-05 11:08:39 -04:00
virtio_config.h virtio: VIRTIO_F_IOMMU_PLATFORM -> VIRTIO_F_ACCESS_PLATFORM 2020-08-03 16:11:42 -04:00
virtio_console.h virtio_console: correct tags for config space fields 2020-08-05 11:08:39 -04:00
virtio_crypto.h virtio_crypto: correct tags for config space fields 2020-08-05 11:08:39 -04:00
virtio_fs.h virtio_fs: correct tags for config space fields 2020-08-05 11:08:39 -04:00
virtio_gpu.h virtio_gpu: correct tags for config space fields 2020-08-05 11:08:40 -04:00
virtio_ids.h
virtio_input.h virtio_input: correct tags for config space fields 2020-08-05 11:08:40 -04:00
virtio_iommu.h virtio_iommu: correct tags for config space fields 2020-08-05 11:08:40 -04:00
virtio_mem.h virtio_mem: correct tags for config space fields 2020-08-05 11:08:40 -04:00
virtio_mmio.h
virtio_net.h virtio_net: use LE accessors for speed/duplex 2020-08-05 11:08:41 -04:00
virtio_pci.h
virtio_pmem.h virtio_pmem: correct tags for config space fields 2020-08-05 11:08:40 -04:00
virtio_ring.h
virtio_rng.h
virtio_scsi.h virtio_scsi: correct tags for config space fields 2020-08-05 11:08:40 -04:00
virtio_types.h
virtio_vsock.h
vm_sockets.h
vm_sockets_diag.h
vmcore.h
vsockmon.h
vt.h
vtpm_proxy.h
wait.h
watch_queue.h
watchdog.h
wimax.h
wireguard.h
wireless.h net/wireless: wireless.h: drop duplicate word in comments 2020-07-31 09:24:23 +02:00
wmi.h
x25.h
xattr.h
xdp_diag.h
xfrm.h
xilinx-v4l2-controls.h
zorro.h
zorro_ids.h