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
This commit is contained in:
Michael Tuexen
2025-09-04 13:52:37 +02:00
parent e21c3dae67
commit bd8296e717
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -103,6 +103,7 @@ def create_iface(cls, alias_name: str, iface_name: str) -> List["VnetInterface"]
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);
+5
View File
@@ -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}