git: fb69ed397e4f - main - Revert "if_vlan: do not enable LRO for bridge interaces"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 12 Aug 2023 16:01:25 UTC
The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=fb69ed397e4f455d4c338edcfa210d763bb87189 commit fb69ed397e4f455d4c338edcfa210d763bb87189 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2023-08-12 13:56:21 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2023-08-12 13:56:21 +0000 Revert "if_vlan: do not enable LRO for bridge interaces" This reverts commit 5f11a33ceeb385477cb22d9ad5941061c5a26be9. As requested by Kevin Bowling. He explains: > The subtle bug was that vlan_capabilities() in if_vlan was not obeying > the requested mask from its IFCAP ioctl. --- sys/net/if_vlan.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 92e4e4247e3d..6aa872a19364 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -2067,22 +2067,14 @@ vlan_capabilities(struct ifvlan *ifv) } /* - * If the parent interface is not a bridge and can do LRO and - * checksum offloading on VLANs, then guess it may do LRO on VLANs. - * False positive here cost nothing, while false negative may lead - * to some confusions. According to Wikipedia: - * - * "LRO should not operate on machines acting as routers, as it breaks - * the end-to-end principle and can significantly impact performance." - * - * The same reasoning applies to machines acting as bridges. + * If the parent interface can do LRO and checksum offloading on + * VLANs, then guess it may do LRO on VLANs. False positive here + * cost nothing, while false negative may lead to some confusions. */ - if (ifp->if_bridge == NULL) { - if (p->if_capabilities & IFCAP_VLAN_HWCSUM) - cap |= p->if_capabilities & IFCAP_LRO; - if (p->if_capenable & IFCAP_VLAN_HWCSUM) - ena |= p->if_capenable & IFCAP_LRO; - } + if (p->if_capabilities & IFCAP_VLAN_HWCSUM) + cap |= p->if_capabilities & IFCAP_LRO; + if (p->if_capenable & IFCAP_VLAN_HWCSUM) + ena |= p->if_capenable & IFCAP_LRO; /* * If the parent interface can offload TCP connections over VLANs then