Date: Tue, 18 Oct 2016 13:22:44 +0000 (UTC) From: Sean Bruno <sbruno@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r307562 - head/sys/net Message-ID: <201610181322.u9IDMi1l097605@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sbruno Date: Tue Oct 18 13:22:44 2016 New Revision: 307562 URL: https://svnweb.freebsd.org/changeset/base/307562 Log: Toggle v4/v6 rxcsum together Only re-init if driver is running ref: https://github.com/NextBSD/NextBSD/commit/106518e874ec9a61daf4c09894170d24e2f4d60d Submitted by: mmacy@nextbsd.org Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Tue Oct 18 13:16:27 2016 (r307561) +++ head/sys/net/iflib.c Tue Oct 18 13:22:44 2016 (r307562) @@ -3162,8 +3162,6 @@ iflib_if_qflush(if_t ifp) IFCAP_TSO4 | IFCAP_TSO6 | IFCAP_VLAN_HWTAGGING | \ IFCAP_VLAN_MTU | IFCAP_VLAN_HWFILTER | IFCAP_VLAN_HWTSO) -#define IFCAP_REINIT IFCAP_FLAGS - static int iflib_if_ioctl(if_t ifp, u_long command, caddr_t data) { @@ -3288,6 +3286,8 @@ iflib_if_ioctl(if_t ifp, u_long command, #endif setmask |= (mask & IFCAP_FLAGS); + if (setmask & (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)); @@ -3298,10 +3298,10 @@ iflib_if_ioctl(if_t ifp, u_long command, if (setmask) { CTX_LOCK(ctx); bits = if_getdrvflags(ifp); - if (setmask & IFCAP_REINIT) + if (bits & IFF_DRV_RUNNING) iflib_stop(ctx); if_togglecapenable(ifp, setmask); - if (setmask & IFCAP_REINIT) + if (bits & IFF_DRV_RUNNING) iflib_init_locked(ctx); if_setdrvflags(ifp, bits); CTX_UNLOCK(ctx);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610181322.u9IDMi1l097605>