Re: bridge: faster compare for link local addresses

2007-03-13 Thread Stephen Hemminger
On Tue, 13 Mar 2007 12:39:54 -0700 (PDT) David Miller <[EMAIL PROTECTED]> wrote: > From: Eric Dumazet <[EMAIL PROTECTED]> > Date: Tue, 13 Mar 2007 14:38:32 +0100 > > > But memcmp() has a strong semantic (in libc). memcmp(a, b, 6) should > > do 6 byte compares and conditional branches, regardless

Re: bridge: faster compare for link local addresses

2007-03-13 Thread David Miller
From: Eric Dumazet <[EMAIL PROTECTED]> Date: Tue, 13 Mar 2007 14:38:32 +0100 > But memcmp() has a strong semantic (in libc). memcmp(a, b, 6) should > do 6 byte compares and conditional branches, regardless of a/b > alignment. Or use the x86 "rep cmpsb" instruction that basically > has the same co

Re: bridge: faster compare for link local addresses

2007-03-13 Thread Eric Dumazet
On Tuesday 13 March 2007 15:01, Andi Kleen wrote: > David Miller <[EMAIL PROTECTED]> writes: > > From: Rick Jones <[EMAIL PROTECTED]> > > Date: Mon, 12 Mar 2007 17:05:39 -0700 > > > > > Being paranoid - are there no worries about the alignment of dest? > > > > If it's an issue, it's an issue elsewh

Re: bridge: faster compare for link local addresses

2007-03-13 Thread Andi Kleen
David Miller <[EMAIL PROTECTED]> writes: > From: Rick Jones <[EMAIL PROTECTED]> > Date: Mon, 12 Mar 2007 17:05:39 -0700 > > > Being paranoid - are there no worries about the alignment of dest? > > If it's an issue, it's an issue elsewhere too, as the places > where Stephen took this idiomatic co

Re: bridge: faster compare for link local addresses

2007-03-12 Thread David Miller
From: Rick Jones <[EMAIL PROTECTED]> Date: Mon, 12 Mar 2007 17:05:39 -0700 > Being paranoid - are there no worries about the alignment of dest? If it's an issue, it's an issue elsewhere too, as the places where Stephen took this idiomatic code from is the code ethernet handling and that runs on e

Re: bridge: faster compare for link local addresses

2007-03-12 Thread Rick Jones
Stephen Hemminger wrote: Use logic operations rather than memcmp() to compare destination address with link local multicast addresses. Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]> --- net/bridge/br_input.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) --- netem-dev.ori

Re: bridge: faster compare for link local addresses

2007-03-12 Thread David Miller
From: Stephen Hemminger <[EMAIL PROTECTED]> Date: Mon, 12 Mar 2007 16:20:15 -0700 > Use logic operations rather than memcmp() to compare destination > address with link local multicast addresses. > > Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]> With all of these Eric Dumazet'esque style

bridge: faster compare for link local addresses

2007-03-12 Thread Stephen Hemminger
Use logic operations rather than memcmp() to compare destination address with link local multicast addresses. Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]> --- net/bridge/br_input.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) --- netem-dev.orig/net/bridge/br_input.c +++