kern/128766: [ PATCH ] VGE's [rt]xcsum can't be switched off
Dan Lukes
dan at obluda.cz
Mon Nov 10 13:30:02 PST 2008
>Number: 128766
>Category: kern
>Synopsis: [ PATCH ] VGE's [rt]xcsum can't be switched off
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Nov 10 21:30:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Dan Lukes
>Release: FreeBSD
>Organization:
Obludarium
>Environment:
FreeBSD >=6.0, >=7.0, CURRENT
if_vge.c revisions
HEAD: >=1.19 (affect all 7.x releases also)
RELENG_6: >=1.14.2.3 (e.g. 6.0-RELEASE and newer)
>Description:
During the Glebius's "big polling(4) cleanup"
of the VGE network card driver the processing of
(re)set of {r|t}xcsum capabilities has been broken.
The line
ifp->if_capenable &= -IFCAP_HWCSUM;
disapeared from code and the current code ...
-----------
if (mask & IFCAP_HWCSUM) {
ifp->if_capenable |= ifr->ifr_reqcap & (IFCAP_HWCSUM);
-----------
... allow no deactivation of capabilities.
As both of *csum are activated on default, there
is no way to turn them off.
>How-To-Repeat:
Try ifconfig vge0 -txcsum -rxcsum - it do nothing
>Fix:
I hope it will be MFCed not only to RELENG_7 but into RELENG_6
as well (I not trying to ask it will be MFCed into RELENG_6_4 also)
--- /usr/src/sys/dev/vge/if_vge.c.orig 2008-11-10 16:50:21.000000000 +0100
+++ /usr/src/sys/dev/vge/if_vge.c 2008-11-10 21:01:08.000000000 +0100
@@ -2230,7 +2230,7 @@
}
#endif /* DEVICE_POLLING */
if (mask & IFCAP_HWCSUM) {
- ifp->if_capenable |= ifr->ifr_reqcap & (IFCAP_HWCSUM);
+ ifp->if_capenable ^= (mask & IFCAP_HWCSUM);
if (ifp->if_capenable & IFCAP_TXCSUM)
ifp->if_hwassist = VGE_CSUM_FEATURES;
else
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list