Date: Wed, 1 Oct 2025 07:33:04 GMT From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: bd7f55a1d815 - stable/15 - vtnet: improve control of transmit offloading Message-ID: <202510010733.5917X4kZ081209@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=bd7f55a1d815f841bd20e04bb1d8df0a5c023778 commit bd7f55a1d815f841bd20e04bb1d8df0a5c023778 Author: Michael Tuexen <tuexen@FreeBSD.org> AuthorDate: 2025-09-28 09:01:18 +0000 Commit: Michael Tuexen <tuexen@FreeBSD.org> CommitDate: 2025-09-30 21:49:23 +0000 vtnet: improve control of transmit offloading Keep the hwassist flags for transmit checksum offload and transmit segment offload in sync with the enabled capabilities. Reported by: Timo Völker Reviewed by: Timo Völker Differential Revision: https://reviews.freebsd.org/D52765 (cherry picked from commit f2575d56c8c9a8acad4a61a3586546dff4febce1) --- sys/dev/virtio/network/if_vtnet.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index a4bb57adc609..634ba0de2d55 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -1345,14 +1345,22 @@ vtnet_ioctl_ifcap(struct vtnet_softc *sc, struct ifreq *ifr) VTNET_CORE_LOCK_ASSERT(sc); - if (mask & IFCAP_TXCSUM) + if (mask & IFCAP_TXCSUM) { if_togglecapenable(ifp, IFCAP_TXCSUM); - if (mask & IFCAP_TXCSUM_IPV6) + if_togglehwassist(ifp, VTNET_CSUM_OFFLOAD); + } + if (mask & IFCAP_TXCSUM_IPV6) { if_togglecapenable(ifp, IFCAP_TXCSUM_IPV6); - if (mask & IFCAP_TSO4) + if_togglehwassist(ifp, VTNET_CSUM_OFFLOAD_IPV6); + } + if (mask & IFCAP_TSO4) { if_togglecapenable(ifp, IFCAP_TSO4); - if (mask & IFCAP_TSO6) + if_togglehwassist(ifp, IFCAP_TSO4); + } + if (mask & IFCAP_TSO6) { if_togglecapenable(ifp, IFCAP_TSO6); + if_togglehwassist(ifp, IFCAP_TSO6); + } if (mask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6 | IFCAP_LRO)) { /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202510010733.5917X4kZ081209>