netdevsim: add support for flash_update overwrite mask
The devlink interface recently gained support for a new "overwrite mask" parameter that allows specifying how various sub-sections of a flash component are modified when updating. Add support for this to netdevsim, to enable easily testing the interface. Make the allowed overwrite mask values controllable via a debugfs parameter. This enables testing a flow where the driver rejects an unsupportable overwrite mask. 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>
This commit is contained in:
committed by
David S. Miller
parent
5d5b4128c4
commit
cbb58368fb
@@ -26,6 +26,24 @@ fw_flash_test()
|
||||
devlink dev flash $DL_HANDLE file dummy component fw.mgmt
|
||||
check_err $? "Failed to flash with component attribute"
|
||||
|
||||
devlink dev flash $DL_HANDLE file dummy overwrite settings
|
||||
check_fail $? "Flash with overwrite settings should be rejected"
|
||||
|
||||
echo "1"> $DEBUGFS_DIR/fw_update_overwrite_mask
|
||||
check_err $? "Failed to change allowed overwrite mask"
|
||||
|
||||
devlink dev flash $DL_HANDLE file dummy overwrite settings
|
||||
check_err $? "Failed to flash with settings overwrite enabled"
|
||||
|
||||
devlink dev flash $DL_HANDLE file dummy overwrite identifiers
|
||||
check_fail $? "Flash with overwrite settings should be identifiers"
|
||||
|
||||
echo "3"> $DEBUGFS_DIR/fw_update_overwrite_mask
|
||||
check_err $? "Failed to change allowed overwrite mask"
|
||||
|
||||
devlink dev flash $DL_HANDLE file dummy overwrite identifiers overwrite settings
|
||||
check_err $? "Failed to flash with settings and identifiers overwrite enabled"
|
||||
|
||||
echo "n"> $DEBUGFS_DIR/fw_update_status
|
||||
check_err $? "Failed to disable status updates"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user