Re: review of change to bridge.h

2001-10-11 Thread Matthew Jacob
Yes- I think I agree with you on this. On Thu, 11 Oct 2001, Luigi Rizzo wrote: > > > > Maybe bcmp is right. I believe having IS_ETHER_BROADCAST is too > > useful a macro > > yes, i mean leave it as a macro which calls bcmp, and > let the compiler handle the issue. > > #define IS_ETHER_BROA

Re: review of change to bridge.h

2001-10-11 Thread Luigi Rizzo
> > Maybe bcmp is right. I believe having IS_ETHER_BROADCAST is too > useful a macro yes, i mean leave it as a macro which calls bcmp, and let the compiler handle the issue. #define IS_ETHER_BROADCAST(a) (!bcmp(a, "\377\377\377\377\377\377", 6)) luigi To Unsubscribe: send mail t

Re: review of change to bridge.h

2001-10-11 Thread Matthew Jacob
Maybe bcmp is right. I believe having IS_ETHER_BROADCAST is too useful a macro On Thu, 11 Oct 2001, Luigi Rizzo wrote: > > > > > > 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

Re: review of change to bridge.h

2001-10-11 Thread Luigi Rizzo
> > > 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] == 0x

Re: review of change to bridge.h

2001-10-11 Thread Matthew Jacob
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] == 0x && \ > > + ((un

Re: review of change to bridge.h

2001-10-11 Thread Luigi Rizzo
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] == 0x && \ > + ((unsigned short *)(a))[1] == 0x && \ > + ((unsign

review of change to bridge.h

2001-10-11 Thread Matthew Jacob
Fix the silly warning: Index: bridge.h === RCS file: /home/ncvs/src/sys/net/bridge.h,v retrieving revision 1.8 diff -u -r1.8 bridge.h --- bridge.h2001/10/05 05:45:26 1.8 +++ bridge.h2001/10/11 18:11:51 @@ -92,8 +92,17 @@