diff mbox series

[net,v2,2/2] tools: selftests: Update tests for new IPv6 route MTU behavior

Message ID 1655182915-12897-3-git-send-email-quic_subashab@quicinc.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series net: ipv6: Update route MTU behavior | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 4 maintainers not CCed: pabeni@redhat.com shuah@kernel.org linux-kselftest@vger.kernel.org edumazet@google.com
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success net selftest script(s) already in Makefile
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch warning WARNING: line length of 86 exceeds 80 columns WARNING: line length of 88 exceeds 80 columns
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Subash Abhinov Kasiviswanathan (KS) June 14, 2022, 5:01 a.m. UTC
The IPv6 route MTU no longer increases in case the interface MTU is
increased. Update the tests pmtu_ipv6_exception and  pmtu_vti6_exception
to account for this behavior.

Suggested-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Sean Tranchetti <quic_stranche@quicinc.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <quic_subashab@quicinc.com>
---
v2: New patch added to the series

 tools/testing/selftests/net/pmtu.sh | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/tools/testing/selftests/net/pmtu.sh b/tools/testing/selftests/net/pmtu.sh
index 736e358..dac2101 100755
--- a/tools/testing/selftests/net/pmtu.sh
+++ b/tools/testing/selftests/net/pmtu.sh
@@ -1067,11 +1067,15 @@  test_pmtu_ipvX() {
 	pmtu_2="$(route_get_dst_pmtu_from_exception "${ns_a}" ${dst2})"
 	check_pmtu_value "1500" "${pmtu_2}" "changing local MTU on a link not on this path" || return 1
 
-	# Increase MTU, check for PMTU increase in route exception
+	# Increase MTU, check for PMTU increase in route exception for IPv4 only
 	mtu "${ns_a}"  veth_A-R1 1700
 	mtu "${ns_r1}" veth_R1-A 1700
 	pmtu_1="$(route_get_dst_pmtu_from_exception "${ns_a}" ${dst1})"
-	check_pmtu_value "1700" "${pmtu_1}" "increasing local MTU" || return 1
+	if [ ${family} -eq 4 ]; then
+		check_pmtu_value "1700" "${pmtu_1}" "increasing local MTU" || return 1
+	else
+		check_pmtu_value "1300" "${pmtu_1}" "no change in local MTU" || return 1
+	fi
 	# Second exception shouldn't be modified
 	pmtu_2="$(route_get_dst_pmtu_from_exception "${ns_a}" ${dst2})"
 	check_pmtu_value "1500" "${pmtu_2}" "changing local MTU on a link not on this path" || return 1
@@ -1637,10 +1641,10 @@  test_pmtu_vti6_exception() {
 	pmtu="$(route_get_dst_pmtu_from_exception "${ns_a}" ${tunnel6_b_addr})"
 	check_pmtu_value "3000" "${pmtu}" "decreasing tunnel MTU" || fail=1
 
-	# Increase tunnel MTU, check for PMTU increase in route exception
+	# Increase tunnel MTU, confirm no PMTU increase in route exception
 	mtu "${ns_a}" vti6_a 9000
 	pmtu="$(route_get_dst_pmtu_from_exception "${ns_a}" ${tunnel6_b_addr})"
-	check_pmtu_value "9000" "${pmtu}" "increasing tunnel MTU" || fail=1
+	check_pmtu_value "3000" "${pmtu}" "no change in tunnel MTU" || fail=1
 
 	return ${fail}
 }