netdevsim: support taking immediate snapshot via devlink
Implement the .snapshot region operation for the dummy data region. This enables a region snapshot to be taken upon request via the new DEVLINK_CMD_REGION_SNAPSHOT command. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
b9a17abfde
commit
3fe0fd531a
@@ -141,6 +141,16 @@ regions_test()
|
||||
|
||||
check_region_snapshot_count dummy post-first-delete 2
|
||||
|
||||
devlink region new $DL_HANDLE/dummy snapshot 25
|
||||
check_err $? "Failed to create a new snapshot with id 25"
|
||||
|
||||
check_region_snapshot_count dummy post-first-request 3
|
||||
|
||||
devlink region del $DL_HANDLE/dummy snapshot 25
|
||||
check_err $? "Failed to delete snapshot with id 25"
|
||||
|
||||
check_region_snapshot_count dummy post-second-delete 2
|
||||
|
||||
log_test "regions test"
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user