Fix rxcsum issue introduced in r338838
r338838 attempted to fix issues with rxcsum and rxcsum6. However, the rxcsum bits were set as though if_setcapenablebit() was being called, not if_togglecapenable() which is in use. As a result, it was not possible to disable rxcsum when rxcsum6 was supported. PR: 233004 Reported by: lev Reviewed by: lev MFC after: 3 days Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D17881
This commit is contained in:
parent
db3b3f63c4
commit
667cdfb2d4
@ -4256,18 +4256,13 @@ iflib_if_ioctl(if_t ifp, u_long command, caddr_t data)
|
||||
setmask |= (mask & IFCAP_WOL);
|
||||
|
||||
/*
|
||||
* If we're disabling any RX csum, disable all the ones
|
||||
* the driver supports. This assumes all supported are
|
||||
* enabled.
|
||||
*
|
||||
* Otherwise, if they've changed, enable all of them.
|
||||
* If any RX csum has changed, change all the ones that
|
||||
* are supported by the driver.
|
||||
*/
|
||||
if ((setmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) <
|
||||
(oldmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)))
|
||||
setmask &= ~(IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6);
|
||||
else if ((setmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) !=
|
||||
(oldmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)))
|
||||
setmask |= (mask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6));
|
||||
if (setmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) {
|
||||
setmask |= ctx->ifc_softc_ctx.isc_capabilities &
|
||||
(IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6);
|
||||
}
|
||||
|
||||
/*
|
||||
* want to ensure that traffic has stopped before we change any of the flags
|
||||
|
Loading…
Reference in New Issue
Block a user