From owner-freebsd-current@freebsd.org Fri Dec 11 19:42:23 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E45FA04B60 for ; Fri, 11 Dec 2015 19:42:23 +0000 (UTC) (envelope-from mmcco@mykolab.com) Received: from mx-out03.mykolab.com (mx01.mykolab.com [95.128.36.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0CE001CAB for ; Fri, 11 Dec 2015 19:42:22 +0000 (UTC) (envelope-from mmcco@mykolab.com) X-Virus-Scanned: amavisd-new at kolabnow.com X-Spam-Flag: NO X-Spam-Score: -2.909 X-Spam-Level: X-Spam-Status: No, score=-2.909 tagged_above=-10 required=6.31 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, FREEMAIL_FROM=0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham Received: from mx04.mykolab.com (mx04.mykolab.com [10.20.7.102]) by mx-out03.mykolab.com (Postfix) with ESMTPS id 3735922630 for ; Fri, 11 Dec 2015 20:42:08 +0100 (CET) Date: Fri, 11 Dec 2015 14:42:05 -0500 From: Michael McConville To: freebsd-current@freebsd.org Subject: XOR pt. 2 Message-ID: <20151211194204.GA26628@thinkpad.swarthmore.edu> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Mailman-Approved-At: Fri, 11 Dec 2015 19:58:48 +0000 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2015 19:42:23 -0000 Note that IFCAP_HWCSUM has two bits set. Because of this, it doesn't XOR cleanly in the current if-else condition, but I'm not sure whether that was intended. I just wanted to pass this by people in case it was a logical bug. --- dev/ixgb/if_ixgb.c.orig +++ dev/ixgb/if_ixgb.c @@ -599,10 +599,7 @@ ixgb_ioctl(struct ifnet * ifp, IOCTL_CMD } #endif /* DEVICE_POLLING */ if (mask & IFCAP_HWCSUM) { - if (IFCAP_HWCSUM & ifp->if_capenable) - ifp->if_capenable &= ~IFCAP_HWCSUM; - else - ifp->if_capenable |= IFCAP_HWCSUM; + ifp->if_capenable ^= IFCAP_HWCSUM; if (ifp->if_drv_flags & IFF_DRV_RUNNING) ixgb_init(adapter); }