FreeBSD Bugzilla – Attachment 197054 Details for
Bug 231151
ifconfig: unable to disable rxcsum, rxcsum6 and vlanhwcsum on em driver
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Allow rxcsum to be disabled, but keep it tied to rxcsum6
rxcsum-fix.patch (text/plain), 1.29 KB, created by
Stephen Hurd
on 2018-09-12 14:19:30 UTC
(
hide
)
Description:
Allow rxcsum to be disabled, but keep it tied to rxcsum6
Filename:
MIME Type:
Creator:
Stephen Hurd
Created:
2018-09-12 14:19:30 UTC
Size:
1.29 KB
patch
obsolete
>Index: iflib.c >=================================================================== >--- iflib.c (revision 338505) >+++ iflib.c (working copy) >@@ -4223,9 +4223,11 @@ > } > case SIOCSIFCAP: > { >- int mask, setmask; >+ int mask, setmask, oldmask; > >- mask = ifr->ifr_reqcap ^ if_getcapenable(ifp); >+ oldmask = if_getcapenable(ifp); >+ mask = ifr->ifr_reqcap ^ oldmask; >+ mask &= ctx->ifc_softc_ctx.isc_capabilities; > setmask = 0; > #ifdef TCP_OFFLOAD > setmask |= mask & (IFCAP_TOE4|IFCAP_TOE6); >@@ -4232,8 +4234,20 @@ > #endif > setmask |= (mask & IFCAP_FLAGS); > >- if (setmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) >+ /* >+ * 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 ((setmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) < >+ (oldmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6))) >+ setmask &= ~((IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6) & IFCAP_FLAGS); >+ else if ((setmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) != >+ (oldmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6))) > setmask |= (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6); >+ > if ((mask & IFCAP_WOL) && > (if_getcapabilities(ifp) & IFCAP_WOL) != 0) > setmask |= (mask & (IFCAP_WOL_MCAST|IFCAP_WOL_MAGIC));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 231151
:
197023
|
197054
|
197061