From owner-freebsd-net Thu Oct 11 11:28:58 2001 Delivered-To: freebsd-net@freebsd.org Received: from beppo.feral.com (beppo.feral.com [192.67.166.79]) by hub.freebsd.org (Postfix) with ESMTP id BAE3337B409 for ; Thu, 11 Oct 2001 11:28:55 -0700 (PDT) Received: from wonky.feral.com (wonky.feral.com [192.67.166.7]) by beppo.feral.com (8.11.3/8.11.3) with ESMTP id f9BISpH83980; Thu, 11 Oct 2001 11:28:51 -0700 (PDT) (envelope-from mjacob@feral.com) Date: Thu, 11 Oct 2001 11:27:46 -0700 (PDT) From: Matthew Jacob Reply-To: To: Luigi Rizzo Cc: Subject: Re: review of change to bridge.h In-Reply-To: <200110111815.f9BIFaT12658@iguana.aciri.org> Message-ID: <20011011112700.T84793-100000@wonky.feral.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Thu, 11 Oct 2001, Luigi Rizzo wrote: > I guess it might be marginally more efficient to > call bcmp() (and rely on it being optimized), or do 3 > comparisons with unsigned short * > > > +#define IS_ETHER_BROADCAST(a) ( \ > > + ((unsigned short *)(a))[0] == 0xffff && \ > > + ((unsigned short *)(a))[1] == 0xffff && \ > > + ((unsigned short *)(a))[2] == 0xffff) You can't assume a short * is aligned either. BTW- this also applies to sparc. > > Apart from this, have you actually tested bridging on > the alpha ? The purpose of the warning was also to > say "look, this code might not work on architectures > not supporting unaligned accesses, so you might need to > hack on the code yourself" Nope. But a better place to say "Bridging is not tested" is to look in a kernel config file. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message