mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 02:10:52 +07:00
selftests: Clean forgotten resources as part of cleanup()
[ Upstream commit e67dfb8d15deb33c425d0b0ee22f2e5eef54c162 ] Several tests do not set some ports down as part of their cleanup(), resulting in IPv6 link-local addresses and associated routes not being deleted. These leaks were found using a BPF tool that monitors ASIC resources. Solve this by setting the ports down at the end of the tests. Signed-off-by: Amit Cohen <amcohen@nvidia.com> Reviewed-by: Petr Machata <petrm@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
8a4318c14a
commit
e613f67f1b
@ -108,6 +108,9 @@ router_destroy()
|
||||
__addr_add_del $rp1 del 192.0.2.2/24 2001:db8:1::2/64
|
||||
|
||||
tc qdisc del dev $rp2 clsact
|
||||
|
||||
ip link set dev $rp2 down
|
||||
ip link set dev $rp1 down
|
||||
}
|
||||
|
||||
setup_prepare()
|
||||
|
@ -111,6 +111,9 @@ router_destroy()
|
||||
__addr_add_del $rp1 del 192.0.2.2/24 2001:db8:1::2/64
|
||||
|
||||
tc qdisc del dev $rp2 clsact
|
||||
|
||||
ip link set dev $rp2 down
|
||||
ip link set dev $rp1 down
|
||||
}
|
||||
|
||||
setup_prepare()
|
||||
|
@ -93,7 +93,9 @@ switch_destroy()
|
||||
lldptool -T -i $swp1 -V APP -d $(dscp_map 10) >/dev/null
|
||||
lldpad_app_wait_del
|
||||
|
||||
ip link set dev $swp2 down
|
||||
ip link set dev $swp2 nomaster
|
||||
ip link set dev $swp1 down
|
||||
ip link set dev $swp1 nomaster
|
||||
ip link del dev br1
|
||||
}
|
||||
|
@ -75,7 +75,9 @@ switch_destroy()
|
||||
tc qdisc del dev $swp2 clsact
|
||||
tc qdisc del dev $swp1 clsact
|
||||
|
||||
ip link set dev $swp2 down
|
||||
ip link set dev $swp2 nomaster
|
||||
ip link set dev $swp1 down
|
||||
ip link set dev $swp1 nomaster
|
||||
ip link del dev br1
|
||||
}
|
||||
|
@ -71,7 +71,9 @@ switch_destroy()
|
||||
tc qdisc del dev $swp2 clsact
|
||||
tc qdisc del dev $swp1 clsact
|
||||
|
||||
ip link set dev $swp2 down
|
||||
ip link set dev $swp2 nomaster
|
||||
ip link set dev $swp1 down
|
||||
ip link set dev $swp1 nomaster
|
||||
ip link del dev br1
|
||||
}
|
||||
|
@ -72,7 +72,9 @@ switch_destroy()
|
||||
tc qdisc del dev $swp2 clsact
|
||||
tc qdisc del dev $swp1 clsact
|
||||
|
||||
ip link set dev $swp2 down
|
||||
ip link set dev $swp2 nomaster
|
||||
ip link set dev $swp1 down
|
||||
ip link set dev $swp1 nomaster
|
||||
ip link del dev br1
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user