mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 20:51:44 +00:00
Merge branch 'devlink-fixes'
Jakub Kicinski says: ==================== devlink: region snapshot locking fix and selftest adjustments Minor fix for region snapshot locking and adjustments to selftests. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
3e31d209ed
@ -11925,8 +11925,10 @@ void devl_region_destroy(struct devlink_region *region)
|
||||
devl_assert_locked(devlink);
|
||||
|
||||
/* Free all snapshots of region */
|
||||
mutex_lock(®ion->snapshot_lock);
|
||||
list_for_each_entry_safe(snapshot, ts, ®ion->snapshot_list, list)
|
||||
devlink_region_snapshot_del(region, snapshot);
|
||||
mutex_unlock(®ion->snapshot_lock);
|
||||
|
||||
list_del(®ion->list);
|
||||
mutex_destroy(®ion->snapshot_lock);
|
||||
|
@ -496,8 +496,8 @@ dummy_reporter_test()
|
||||
|
||||
check_reporter_info dummy healthy 3 3 10 true
|
||||
|
||||
echo 8192> $DEBUGFS_DIR/health/binary_len
|
||||
check_fail $? "Failed set dummy reporter binary len to 8192"
|
||||
echo 8192 > $DEBUGFS_DIR/health/binary_len
|
||||
check_err $? "Failed set dummy reporter binary len to 8192"
|
||||
|
||||
local dump=$(devlink health dump show $DL_HANDLE reporter dummy -j)
|
||||
check_err $? "Failed show dump of dummy reporter"
|
||||
|
@ -47,6 +47,17 @@ if [ -d "${NETDEVSIM_PATH}/devices/netdevsim${DEV_ADDR}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
check_netdev_down()
|
||||
{
|
||||
state=$(cat /sys/class/net/${NETDEV}/flags)
|
||||
|
||||
if [ $((state & 1)) -ne 0 ]; then
|
||||
echo "WARNING: unexpected interface UP, disable NetworkManager?"
|
||||
|
||||
ip link set dev $NETDEV down
|
||||
fi
|
||||
}
|
||||
|
||||
init_test()
|
||||
{
|
||||
RET=0
|
||||
@ -151,6 +162,7 @@ trap_stats_test()
|
||||
|
||||
RET=0
|
||||
|
||||
check_netdev_down
|
||||
for trap_name in $(devlink_traps_get); do
|
||||
devlink_trap_stats_idle_test $trap_name
|
||||
check_err $? "Stats of trap $trap_name not idle when netdev down"
|
||||
@ -254,6 +266,7 @@ trap_group_stats_test()
|
||||
|
||||
RET=0
|
||||
|
||||
check_netdev_down
|
||||
for group_name in $(devlink_trap_groups_get); do
|
||||
devlink_trap_group_stats_idle_test $group_name
|
||||
check_err $? "Stats of trap group $group_name not idle when netdev down"
|
||||
|
Loading…
Reference in New Issue
Block a user