From owner-freebsd-bugs@FreeBSD.ORG Thu Nov 2 17:00:40 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF5E416A403 for ; Thu, 2 Nov 2006 17:00:40 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E64543D58 for ; Thu, 2 Nov 2006 17:00:40 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id kA2H0exQ061528 for ; Thu, 2 Nov 2006 17:00:40 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id kA2H0eAg061526; Thu, 2 Nov 2006 17:00:40 GMT (envelope-from gnats) Date: Thu, 2 Nov 2006 17:00:40 GMT Message-Id: <200611021700.kA2H0eAg061526@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Yo Its Me Remember Cc: Subject: Re: kern/105054: vge driver sends VLAN IDs in wrong endian. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Yo Its Me Remember List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Nov 2006 17:00:40 -0000 The following reply was made to PR kern/105054; it has been noted by GNATS. From: Yo Its Me Remember To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/105054: vge driver sends VLAN IDs in wrong endian. Date: Thu, 2 Nov 2006 08:59:48 -0800 (PST) --0-1761971943-1162486788=:81955 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit No, the input VLAN tags are fine, as I mentioned in the description. Your patch changes them so that they're now in big endian instead of little endian, causing another bug. As far as casting to a uint16_t instead of using htole16, I would think big endian systems would still need to hand the card output tags in little endian. Not really sure though since I don't have any big endian systems to test it. Either way, the second half of the patch will work just fine for little endian systems, just leave the input tag ntohs() there. Thanks, Ian --------------------------------- Get your email and see which of your friends are online - Right on the new Yahoo.com --0-1761971943-1162486788=:81955 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit No, the input VLAN tags are fine, as I mentioned in the description.  Your patch changes them so that they're now in big endian instead of little endian, causing another bug.  As far as casting to a uint16_t instead of using htole16, I would think big endian systems would still need to hand the card output tags in little endian.  Not really sure though since I don't have any big endian systems to test it.

Either way, the second half of the patch will work just fine for little endian s ystems, just leave the input tag ntohs() there.

Thanks,
    Ian


Get your email and see which of your friends are online - Right on the new Yahoo.com --0-1761971943-1162486788=:81955--