git: a98b5f3ff34e - stable/14 - vtnet: improve control of transmit offloading
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 01 Oct 2025 07:37:15 UTC
The branch stable/14 has been updated by tuexen:
URL: https://cgit.FreeBSD.org/src/commit/?id=a98b5f3ff34e7ff851f6127a64ebd88818c8d004
commit a98b5f3ff34e7ff851f6127a64ebd88818c8d004
Author: Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2025-09-28 09:01:18 +0000
Commit: Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2025-10-01 07:36:43 +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 c2f55bb37054..38e7e0f48cf4 100644
--- a/sys/dev/virtio/network/if_vtnet.c
+++ b/sys/dev/virtio/network/if_vtnet.c
@@ -1343,14 +1343,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)) {
/*