netdevsim: implement support for devlink region and snapshots

Implement dummy region of size 32K and allow user to create snapshots
or random data using debugfs file trigger.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jiri Pirko
2019-08-15 15:46:33 +02:00
committed by David S. Miller
parent bd00cc363e
commit 4418f862d6
2 changed files with 63 additions and 1 deletions

View File

@@ -160,6 +160,7 @@ struct nsim_dev {
bool fw_update_status;
u32 max_macs;
bool test1;
struct devlink_region *dummy_region;
};
int nsim_dev_init(void);