WSL2-Linux-Kernel/net
Jakub Kicinski 043b3e2276 devlink: let kernel allocate region snapshot id
Currently users have to choose a free snapshot id before
calling DEVLINK_CMD_REGION_NEW. This is potentially racy
and inconvenient.

Make the DEVLINK_ATTR_REGION_SNAPSHOT_ID optional and try
to allocate id automatically. Send a message back to the
caller with the snapshot info.

Example use:
$ devlink region new netdevsim/netdevsim1/dummy
netdevsim/netdevsim1/dummy: snapshot 1

$ id=$(devlink -j region new netdevsim/netdevsim1/dummy | \
       jq '.[][][][]')
$ devlink region dump netdevsim/netdevsim1/dummy snapshot $id
[...]
$ devlink region del netdevsim/netdevsim1/dummy snapshot $id

v4:
 - inline the notification code
v3:
 - send the notification only once snapshot creation completed.
v2:
 - don't wrap the line containing extack;
 - add a few sentences to the docs.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-05-04 11:58:31 -07:00
..
6lowpan
9p
802
8021q
appletalk
atm docs: networking: convert atm.txt to ReST 2020-04-28 14:38:38 -07:00
ax25 docs: networking: convert ax25.txt to ReST 2020-04-28 14:38:38 -07:00
batman-adv batman-adv: remove unused inline function batadv_arp_change_timeout 2020-04-24 15:22:41 +02:00
bluetooth Bluetooth: Enhanced Connection Complete event belongs to LL Privacy 2020-04-16 12:43:03 +03:00
bpf
bpfilter SPDX patches for 5.7-rc1. 2020-04-03 13:12:26 -07:00
bridge Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2020-05-01 17:02:27 -07:00
caif net: caif: Fix use correct return type for ndo_start_xmit() 2020-04-30 12:13:07 -07:00
can
ceph docs: networking: convert dns_resolver.txt to ReST 2020-04-28 14:39:46 -07:00
core devlink: let kernel allocate region snapshot id 2020-05-04 11:58:31 -07:00
dcb
dccp dccp: remove unused inline function dccp_set_seqno 2020-04-25 20:42:57 -07:00
decnet Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2020-05-01 17:02:27 -07:00
dns_resolver docs: networking: convert dns_resolver.txt to ReST 2020-04-28 14:39:46 -07:00
dsa Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-04-25 20:18:53 -07:00
ethernet
ethtool drivers: Remove inclusion of vermagic header 2020-04-21 13:27:37 -07:00
hsr hsr: remove hsr interface if all slaves are removed 2020-04-30 13:25:18 -07:00
ieee802154
ife
ipv4 inet_diag: bc: read cgroup id only for full sockets 2020-05-02 16:42:51 -07:00
ipv6 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2020-05-01 17:02:27 -07:00
iucv
kcm
key
l2tp l2tp: Allow management of tunnels and session in user namespace 2020-04-08 14:30:46 -07:00
l3mdev
lapb docs: networking: convert lapb-module.txt to ReST 2020-04-30 12:56:35 -07:00
llc
mac80211 docs: networking: convert mac80211-injection.txt to ReST 2020-04-30 12:56:36 -07:00
mac802154
mpls sysctl: pass kernel pointers to ->proc_handler 2020-04-27 02:07:40 -04:00
mptcp tcp: mptcp: use mptcp receive buffer space to select rcv window 2020-04-25 20:37:52 -07:00
ncsi
netfilter Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2020-05-01 17:02:27 -07:00
netlabel netlabel: Kconfig: Update reference for NetLabel Tools project 2020-04-22 19:55:01 -07:00
netlink netlink: add infrastructure to expose policies to userspace 2020-04-30 17:51:42 -07:00
netrom net: netrom: Fix potential nr_neigh refcnt leak in nr_add_node 2020-04-18 13:09:46 -07:00
nfc
nsh
openvswitch net: openvswitch: use div_u64() for 64-by-32 divisions 2020-04-25 20:48:21 -07:00
packet
phonet sysctl: pass kernel pointers to ->proc_handler 2020-04-27 02:07:40 -04:00
psample
qrtr net: qrtr: Add tracepoint support 2020-04-22 12:55:54 -07:00
rds Merge branch 'work.sysctl' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2020-04-28 21:23:38 +02:00
rfkill
rose
rxrpc docs: networking: convert rxrpc.txt to ReST 2020-04-30 12:56:38 -07:00
sched net_sched: sch_fq: add horizon attribute 2020-05-04 11:56:17 -07:00
sctp Merge branch 'work.sysctl' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2020-04-28 21:23:38 +02:00
smc net/smc: save SMC-R peer link_uid 2020-05-04 10:54:39 -07:00
strparser
sunrpc Merge branch 'work.sysctl' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2020-04-28 21:23:38 +02:00
switchdev
tipc tipc: Fix potential tipc_node refcnt leak in tipc_rcv 2020-04-18 13:24:20 -07:00
tls net/tls: fix const assignment warning 2020-04-08 14:34:02 -07:00
unix
vmw_vsock
wimax
wireless netlink: remove NLA_EXACT_LEN_WARN 2020-04-30 17:51:42 -07:00
x25 docs: networking: convert x25.txt to ReST 2020-05-01 12:24:40 -07:00
xdp xsk: Fix typo in xsk_umem_consume_tx and xsk_generic_xmit comments 2020-04-26 09:41:31 -07:00
xfrm Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next 2020-03-30 10:59:20 -07:00
Kconfig docs: networking: convert pktgen.txt to ReST 2020-04-30 12:56:37 -07:00
Makefile
compat.c
socket.c for-5.7/io_uring-2020-03-29 2020-03-30 12:18:49 -07:00
sysctl_net.c