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
4bf4b0f139
commit
a42546df88
@ -4256,18 +4256,13 @@ iflib_if_ioctl(if_t ifp, u_long command, caddr_t data)
|
|||||||
setmask |= (mask & IFCAP_WOL);
|
setmask |= (mask & IFCAP_WOL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we're disabling any RX csum, disable all the ones
|
* If any RX csum has changed, change all the ones that
|
||||||
* the driver supports. This assumes all supported are
|
* are supported by the driver.
|
||||||
* enabled.
|
|
||||||
*
|
|
||||||
* Otherwise, if they've changed, enable all of them.
|
|
||||||
*/
|
*/
|
||||||
if ((setmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) <
|
if (setmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) {
|
||||||
(oldmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)))
|
setmask |= ctx->ifc_softc_ctx.isc_capabilities &
|
||||||
setmask &= ~(IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6);
|
(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));
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* want to ensure that traffic has stopped before we change any of the flags
|
* want to ensure that traffic has stopped before we change any of the flags
|
||||||
|
Loading…
x
Reference in New Issue
Block a user