The branch stable/14 has been updated by tuexen:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=c456341202556f1119ae21c8a707d5dd327f5149

commit c456341202556f1119ae21c8a707d5dd327f5149
Author:     Michael Tuexen <tue...@freebsd.org>
AuthorDate: 2025-09-04 11:52:37 +0000
Commit:     Michael Tuexen <tue...@freebsd.org>
CommitDate: 2025-09-11 06:33:55 +0000

    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
    Differential Revision:  https://reviews.freebsd.org/D52379
    
    (cherry picked from commit bd8296e7173aa625f6d4d766aac2df6be639e49a)
---
 tests/atf_python/sys/net/vnet.py | 1 +
 tests/sys/common/vnet.subr       | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/tests/atf_python/sys/net/vnet.py b/tests/atf_python/sys/net/vnet.py
index 7af63aa2b0c3..41d612fc7c7f 100644
--- a/tests/atf_python/sys/net/vnet.py
+++ b/tests/atf_python/sys/net/vnet.py
@@ -104,6 +104,7 @@ class VnetInterface(object):
             raise Exception("Unable to create iface {}".format(iface_name))
         ret = [cls(alias_name, name)]
         if name.startswith("epair"):
+            run_cmd("/sbin/ifconfig {} -txcsum -txcsum6".format(name))
             ret.append(cls(alias_name, name[:-1] + "b"))
         return ret
 
diff --git a/tests/sys/common/vnet.subr b/tests/sys/common/vnet.subr
index ee498cda64f3..57a2863a42f2 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}

Reply via email to