devlink: Add support for creating region snapshots
authorAlex Vesker <valex@mellanox.com>
Thu, 12 Jul 2018 12:13:10 +0000 (15:13 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Jul 2018 00:37:13 +0000 (17:37 -0700)
commitd7e5272282d93bedbbeb6174b8af8425d7dcfd6f
tree6b87e385cd12d9eaa3bf154ba6d06abbba04f5de
parentccadfa444b34c6ec7bb458eee17fdd8c9a456c63
devlink: Add support for creating region snapshots

Each device address region can store multiple snapshots,
each snapshot is identified using a different numerical ID.
This ID is used when deleting a snapshot or showing an address
region specific snapshot. This patch exposes a callback to add
a new snapshot to an address region.
The snapshot will be deleted using the destructor function
when destroying a region or when a snapshot delete command
from devlink user tool.

Signed-off-by: Alex Vesker <valex@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/devlink.h
net/core/devlink.c