Date: Thu, 13 Jan 2011 22:49:10 +0000 (UTC) From: Pyun YongHyeon <yongari@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r217381 - head/sys/dev/re Message-ID: <201101132249.p0DMnAHD066063@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yongari Date: Thu Jan 13 22:49:10 2011 New Revision: 217381 URL: http://svn.freebsd.org/changeset/base/217381 Log: Allow TX/RX checksum offloading to be configured independently. Modified: head/sys/dev/re/if_re.c Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Thu Jan 13 21:53:51 2011 (r217380) +++ head/sys/dev/re/if_re.c Thu Jan 13 22:49:10 2011 (r217381) @@ -2923,14 +2923,20 @@ re_ioctl(struct ifnet *ifp, u_long comma } } #endif /* DEVICE_POLLING */ - if (mask & IFCAP_HWCSUM) { - ifp->if_capenable ^= IFCAP_HWCSUM; - if (ifp->if_capenable & IFCAP_TXCSUM) + if ((mask & IFCAP_TXCSUM) != 0 && + (ifp->if_capabilities & IFCAP_TXCSUM) != 0) { + ifp->if_capenable ^= IFCAP_TXCSUM; + if ((ifp->if_capenable & IFCAP_TXCSUM) != 0) ifp->if_hwassist |= RE_CSUM_FEATURES; else ifp->if_hwassist &= ~RE_CSUM_FEATURES; reinit = 1; } + if ((mask & IFCAP_RXCSUM) != 0 && + (ifp->if_capabilities & IFCAP_RXCSUM) != 0) { + ifp->if_capenable ^= IFCAP_RXCSUM; + reinit = 1; + } if ((mask & IFCAP_TSO4) != 0 && (ifp->if_capabilities & IFCAP_TSO) != 0) { ifp->if_capenable ^= IFCAP_TSO4;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101132249.p0DMnAHD066063>