aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2025-09-04 13:52:37 +0200
committerMichael Tuexen <tuexen@FreeBSD.org>2025-09-04 13:52:37 +0200
commitbd8296e7173aa625f6d4d766aac2df6be639e49a (patch)
tree8f04cc3ac601b0f3553b708da8092b5567fa1ea0 /tests
parente21c3dae676776518b2abf69ef960084c13a21c1 (diff)
tests: disable transmit checksum offloading for epair interfaces
When transmit checksum offloading is enabled, if_epair does not compute checksums, it just marks packets that this computation still needs to be done. However, some test cases verify the checksum. Therefore disable this for IPv4 and IPv6. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52379
Diffstat (limited to 'tests')
-rw-r--r--tests/atf_python/sys/net/vnet.py1
-rw-r--r--tests/sys/common/vnet.subr5
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/atf_python/sys/net/vnet.py b/tests/atf_python/sys/net/vnet.py
index 7afb5c721bf3..c96eb5d671fc 100644
--- a/tests/atf_python/sys/net/vnet.py
+++ b/tests/atf_python/sys/net/vnet.py
@@ -103,6 +103,7 @@ class VnetInterface(object):
if1 = cls(alias_name, name)
ret = [if1]
if name.startswith("epair"):
+ run_cmd("/sbin/ifconfig {} -txcsum -txcsum6".format(name))
if2 = cls(alias_name, name[:-1] + "b")
if1.epairb = if2
ret.append(if2);
diff --git a/tests/sys/common/vnet.subr b/tests/sys/common/vnet.subr
index bd98b02da33f..0a32e6caf813 100644
--- a/tests/sys/common/vnet.subr
+++ b/tests/sys/common/vnet.subr
@@ -42,6 +42,11 @@ vnet_init()
vnet_mkepair()
{
ifname=$(ifconfig epair create)
+ # When transmit checksum offloading is enabled, if_epair does not
+ # compute checksums, it just marks packets that this computation still
+ # needs to be done. However, some test cases verify the checksum.
+ # Therefore disable this for IPv4 and IPv6.
+ ifconfig ${ifname} -txcsum -txcsum6
list_interface $ifname
list_interface ${ifname%a}b
echo ${ifname%a}