Re: bird and OSPF on p2p

2012-08-30 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2012/08/30 12:57:30: On Wed, Aug 22, 2012 at 04:32:26PM +0200, Joakim Tjernlund wrote: owner-bird-us...@atrey.karlin.mff.cuni.cz wrote on 2012/08/22 15:34:54: On Wed, Aug 22, 2012 at 04:32:24PM +0600, Eugene M. Zheganin wrote: Hi

Re: bird and OSPF on p2p

2012-08-30 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2012/08/30 15:42:50: On Thu, Aug 30, 2012 at 01:33:09PM +0200, Joakim Tjernlund wrote: Therefore, i think about putting local IP address for ptp links with ptp addresses (i.e. merging the patch i sent before). Although it could be argued

Re: bird and OSPF on p2p

2012-08-30 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2012/08/30 15:49:53: On Thu, Aug 30, 2012 at 01:33:09PM +0200, Joakim Tjernlund wrote: 3) I thought that for some reasons the ifindex in 'data' value of link in router LSA is somehow important in link-back check or next-hop calculation when

Re: ECMP/multipath support

2011-01-09 Thread Joakim Tjernlund
that the neighbour list doesn't change between originate_rt_lsa_body and calc_next_hop. From ee7096e741617292df5ea96f5f366b99a2bcd135 Mon Sep 17 00:00:00 2001 From: Joakim Tjernlund joakim.tjernl...@transmode.se Date: Sun, 9 Jan 2011 15:45:18 +0100 Subject: [PATCH] find correct IP address for PTMP

Re: ECMP/multipath support

2011-01-06 Thread Joakim Tjernlund
-Ondrej Zajicek santi...@crfreenet.org wrote: - On Mon, Jan 03, 2011 at 05:37:25PM +0100, Joakim Tjernlund wrote: Any plans to add support for Opaque LSAs/GMPLS in the near future? Nothing specific. Where (and how) is this feature used? We have an old zebra based GMPLS TE

Re: ECMP/multipath support

2011-01-03 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2011/01/01 10:51:03: On Thu, Dec 30, 2010 at 02:17:24AM +0100, Joakim Tjernlund wrote: Ah, good to hear. Any plans to add support for Opaque LSAs/GMPLS in the near future? Nothing specific. Where (and how) is this feature used? We have

Re: ECMP/multipath support

2010-12-29 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/12/28 10:00:03: On Tue, Dec 28, 2010 at 02:12:53AM +0100, Joakim Tjernlund wrote: Right, some comments: - px_pos* is redundant. Just use rt_pos* for both V4 and V6. rt_pos* is a position in Router-LSA, px_pos* is a position

Re: ECMP/multipath support

2010-12-29 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/12/30 01:55:34: On Wed, Dec 29, 2010 at 10:21:58PM +0100, Joakim Tjernlund wrote: Ah, now I see. You took the concept one step further. How does the lsa pos in add_network work for ac_stubnet_list? Stubnet lists does not have en

Re: ECMP/multipath support

2010-12-28 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/12/28 10:00:03: On Tue, Dec 28, 2010 at 02:12:53AM +0100, Joakim Tjernlund wrote: Right, some comments: - px_pos* is redundant. Just use rt_pos* for both V4 and V6. rt_pos* is a position in Router-LSA, px_pos* is a position in Rt

Re: ECMP/multipath support

2010-12-27 Thread Joakim Tjernlund
updated to new nexhp calc. patch to match your latest changes. I hope you like it. From b2d4b0fc32df60f0ae0e5db1d18de647ea62ae3e Mon Sep 17 00:00:00 2001 From: Joakim Tjernlund joakim.tjernl...@transmode.se Date: Fri, 17 Dec 2010 10:03:32 +0100 Subject: [PATCH 1/2] ospf: improve nexthop_calc

Re: ECMP/multipath support

2010-12-27 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/12/28 01:55:42: On Tue, Dec 28, 2010 at 01:15:28AM +0100, Joakim Tjernlund wrote: Other packets are sent to the neighbor IP address, which is a slight diversion from RFC 2328, but should not cause any problems

Re: ECMP/multipath support

2010-12-21 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/12/21 03:24:23: On Tue, Dec 21, 2010 at 01:22:48AM +0100, Joakim Tjernlund wrote: For PTP iface, the list contains at most one entry (so the scan is fast :-) ) and you have to examine it anyways to know neighbor's IP address. Yes

Re: ECMP/multipath support

2010-12-21 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/12/21 00:27:44: On Fri, Dec 17, 2010 at 02:02:07PM +0100, Joakim Tjernlund wrote: Something like this. It is not tested at all and and very simple. Here is version 2, even simpler :) That is nice, makes several things simpler. I

Re: ECMP/multipath support

2010-12-20 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/12/21 00:22:26: On Fri, Dec 17, 2010 at 09:03:01AM +0100, Joakim Tjernlund wrote: I don't remember all the details anymore but sharing IP address for numbered ptp I/Fs is not pathological. Having two independent networks with the same IP

Re: ECMP/multipath support

2010-12-20 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/12/21 00:27:44: On Fri, Dec 17, 2010 at 02:02:07PM +0100, Joakim Tjernlund wrote: Something like this. It is not tested at all and and very simple. Here is version 2, even simpler :) That is nice, makes several things simpler. I

Re: ECMP/multipath support

2010-12-20 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/12/21 00:40:50: On Tue, Dec 21, 2010 at 12:25:49AM +0100, Joakim Tjernlund wrote: Perhaps you can add PTP IF type too? PTP is supported, do you mean PTMP? I meant a #define OSPF_IT_MPTP xx so one knows if it is a ptmp and ptp link. For ptp

Re: ECMP/multipath support

2010-12-20 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/12/21 00:59:18: On Fri, Dec 17, 2010 at 02:36:50PM +0100, Joakim Tjernlund wrote: Question: in calc_next_hop() does this* match 16.1.1 para 5. ...the parent vertex is a network that directly connects the calculating router

Re: ECMP/multipath support

2010-12-17 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/12/17 00:50:41: On Thu, Dec 16, 2010 at 08:41:24PM +0100, Joakim Tjernlund wrote: This will find any ptp link that matches and several of them will match. Not really. For unnumbered ptp links (where sharing of IP addresses between several

Re: ECMP/multipath support

2010-12-17 Thread Joakim Tjernlund
owner-bird-us...@atrey.karlin.mff.cuni.cz wrote on 2010/12/17 12:10:55: From: Joakim Tjernlund joakim.tjernl...@transmode.se To: Cc: Andrew Lemin andrew.le...@monitorsoft.com, Vincent Bernat ber...@luffy.cx, bird-us...@trubka.network.cz, Ondrej Zajicek santi...@crfreenet.org Date: 2010

Re: ECMP/multipath support

2010-12-15 Thread Joakim Tjernlund
On Wed, Dec 15, 2010 at 10:03:08AM +, Andrew Lemin wrote: Hello. How is development coming along for adding multi-path route support into BIRD? We already have BIRD multipath support for OSPF, static and Linux kernel protocols in our Git repository [*]. RIP will probably come

Re: Detecting link state, FreeBSD

2010-11-03 Thread Joakim Tjernlund
On Tue, Nov 02, 2010 at 11:00:39AM -0700, Mahlon E. Smith wrote: I'm running bird 1.2.4 on a series of FreeBSD OSPF routers. Had a backhoe go through some fiber this morning (really), and was surprised to find that bird didn't update routes automatically. ... I don't see anything

Re: Can't compile bird on sparc arch

2010-08-04 Thread Joakim Tjernlund
On 4.8.2010 09:47, Olivier Cochard-Labbé wrote: Hi, Hi Olivier! I'm trying to compile bird 1.2.3 under FreeBSD-sparc64. But the compilation failed with this message: cc -nostdlib -Wl,-r -o all.o cf-parse.tab.o cf-lex.o conf.o /usr/bin/ld: --relax and -r may not be used

Re: Can't compile bird on sparc arch

2010-08-04 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/08/04 13:55:43: On Wed, Aug 04, 2010 at 12:04:21PM +0200, Joakim Tjernlund wrote: fe...@majklik:~/src/git/bird$ patch -p1 ld.patch patching file tools/Rules.in That patch breaks cross compile. Please look at http

Re: Xtonlsab bug

2010-04-30 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/04/30 10:19:15: On Thu, Apr 29, 2010 at 11:57:32PM +0200, Joakim Tjernlund wrote: Ondrej Zajicek santi...@crfreenet.org wrote on 2010/04/29 23:15:22: On Thu, Apr 29, 2010 at 11:03:32PM +0200, Joakim Tjernlund wrote: Ondrej

Re: Xtonlsab bug

2010-04-30 Thread Joakim Tjernlund
Martin Mares m...@ucw.cz wrote on 2010/04/30 15:25:20: From: Martin Mares m...@ucw.cz To: Joakim Tjernlund joakim.tjernl...@transmode.se Cc: bird-us...@trubka.network.cz, Ondrej Zajicek santi...@crfreenet.org Date: 2010/04/30 15:25 Subject: Re: Xtonlsab bug Hello! hmm, why bomb out

Re: Xtonlsab bug

2010-04-30 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/04/30 10:19:15: On Thu, Apr 29, 2010 at 11:57:32PM +0200, Joakim Tjernlund wrote: Ondrej Zajicek santi...@crfreenet.org wrote on 2010/04/29 23:15:22: On Thu, Apr 29, 2010 at 11:03:32PM +0200, Joakim Tjernlund wrote: Ondrej

Re: Xtonlsab bug

2010-04-30 Thread Joakim Tjernlund
Martin Mares m...@ucw.cz wrote on 2010/04/30 16:39:00: Hello! Pehaps this it is always safe to use memcpy in this case, but the man page doesn't. Neither it is allowed by the C standard. It is also a waste of cycles as the whole op is a NOP. Sure -- that's why we have split the

Re: [PATCH 1/2] flex: Avoid REJECT name conflict.

2010-04-29 Thread Joakim Tjernlund
Martin Mares m...@ucw.cz wrote on 2010/04/29 17:57:44: Hello! Right, neither is an ideal fix but at least mine is correct and doesn't cause REJECT to be defined inside flex, causing warnings. I don't understand your reasoning, you rather keep the buggy REJECT instead of renaming the

Re: [PATCH 1/2] flex: Avoid REJECT name conflict.

2010-04-29 Thread Joakim Tjernlund
Martin Mares m...@ucw.cz wrote on 2010/04/29 19:23:22: Hello! No, but it is the equivalent of renaming a variable from an ideal name to a less ideal name, not a big deal. It's called breaking invariants. So far, all tokens were named in a uniform, systematic way. Your patch breaks it.

Re: [PATCH 1/2] flex: Avoid REJECT name conflict.

2010-04-29 Thread Joakim Tjernlund
Martin Mares m...@ucw.cz wrote on 2010/04/29 20:44:26: Hello! I have moved the the workaround to where it belongs, in the grammar files. The current kludge masks potential bugs and causes compiler warnings and is a much worse workaround than the one I offer while we wait for you to fix

Re: [PATCH 1/2] flex: Avoid REJECT name conflict.

2010-04-29 Thread Joakim Tjernlund
Martin Mares m...@ucw.cz wrote on 2010/04/29 22:14:16: Hello! `flex' scans your rule actions to determine whether you use the `REJECT' or `yymore()' features. The `REJECT' and `yymore' options are available to override its decision as to whether you use the options, either by setting

Re: Xtonlsab bug

2010-04-29 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/04/29 23:15:22: On Thu, Apr 29, 2010 at 11:03:32PM +0200, Joakim Tjernlund wrote: Ondrej, this looks buggy: +static inline void htonlsab(void *h, void *n, u16 len) { memcpy(n, h, len); }; +static inline void ntohlsab(void *n, void

Re: [PATCH 1/2] flex: Avoid REJECT name conflict.

2010-04-29 Thread Joakim Tjernlund
Martin Mares m...@ucw.cz wrote on 2010/04/29 23:21:48: Hello! Haven't you heard a word ? ECHO, REJECT and BEGIN are pre defined actions in flex that you can use in your C code. Go read flex again. I know that. But what does that really means from the point of view of C syntax (as used in

Re: [PATCH 1/2] flex: Avoid REJECT name conflict.

2010-04-28 Thread Joakim Tjernlund
Martin Mares m...@ucw.cz wrote on 2010/04/27 23:47:01: Hello! Again, the fix is uglier than the symptoms of the problem. Picky, you rather stare at that warning and the ugly #undef REJECT plus some potential bug yet to be found? No, I would rather like to commit a proper

[PATCH 1/2] flex: Avoid REJECT name conflict.

2010-04-27 Thread Joakim Tjernlund
the apropiate %option statements. Signed-off-by: Joakim Tjernlund joakim.tjernl...@transmode.se --- conf/cf-lex.l |5 +++-- filter/config.Y |4 ++-- proto/static/config.Y |4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/conf/cf-lex.l b/conf/cf-lex.l index

[PATCH 2/2] proto: kill warnings ../../nest/proto.c: In function `proto_do_show_pipe_stats': ../../nest/proto.c:814: warning: implicit declaration of function `pipe_get_peer_stats' ../../nest/proto.c:

2010-04-27 Thread Joakim Tjernlund
Signed-off-by: Joakim Tjernlund joakim.tjernl...@transmode.se --- nest/proto.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/nest/proto.c b/nest/proto.c index f55def5..46147a4 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -807,6 +807,7 @@ proto_do_show_stats(struct

Re: [PATCH 0/5] IP checksum improvements

2010-04-27 Thread Joakim Tjernlund
Martin Mares m...@ucw.cz wrote on 2010/04/27 09:47:36: Hello! Huh, what should do endianity have in common with the choice of pre-/postincrement? Because most archs that can deal with preinc. are big endian, the for loop is important too. Decrement and test for zero is basically

Re: [PATCH 1/2] flex: Avoid REJECT name conflict.

2010-04-27 Thread Joakim Tjernlund
Ondrej Filip fe...@network.cz wrote on 2010/04/27 11:34:18: On 27.4.2010 11:21, Joakim Tjernlund wrote: REJECT is a reserved word in flex and REJECT is also used as %token in bison grammar. Rename REJECT to Reject in bison grammar to avoid name conflict. Same thing for ECHO

Re: fletcher checksum

2010-04-27 Thread Joakim Tjernlund
On Mon, Apr 26, 2010 at 11:27:46AM +0200, Joakim Tjernlund wrote: I think I mentioned this in passing but the fletcher checksum impl. is fragile. Try changing u16 length to u32 length and watch it break for no apparent reason. Yes, i noticed that and will fix that. Thanks. You know

[PATCH] flex: Kill warning

2010-04-27 Thread Joakim Tjernlund
This kills: cf-lex.c:1874: warning: 'yy_fatal_error' defined but not used Signed-off-by: Joakim Tjernlund joakim.tjernl...@transmode.se --- conf/cf-lex.l |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/conf/cf-lex.l b/conf/cf-lex.l index 6612d3c..82f4c52 100644

Re: [PATCH 1/2] flex: Avoid REJECT name conflict.

2010-04-27 Thread Joakim Tjernlund
Martin Mares m...@ucw.cz wrote on 2010/04/27 23:34:18: Hello! I noticed the compile warning caused by it and looked for the reason. I didn't notice any problem but such conflicts are a bug waiting to happen so I tried to fix it. Again, the fix is uglier than the symptoms of the problem.

Re: [PATCH 1/2] flex: Avoid REJECT name conflict.

2010-04-27 Thread Joakim Tjernlund
Martin Mares m...@ucw.cz wrote on 2010/04/27 23:47:01: Hello! Again, the fix is uglier than the symptoms of the problem. Picky, you rather stare at that warning and the ugly #undef REJECT plus some potential bug yet to be found? No, I would rather like to commit a proper fix, not an

Re: [PATCH 0/5] IP checksum improvements

2010-04-26 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/04/26 10:09:36: On Mon, Apr 26, 2010 at 01:57:29AM +0200, Joakim Tjernlund wrote: Ah, now I think I know. The while(buf end) is optimized for post inc so that is why. tested little and was surprised, only 3-5% slower with the while

Re: Patch ping

2010-04-26 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/04/26 10:33:20: On Mon, Apr 26, 2010 at 12:49:32AM +0200, Joakim Tjernlund wrote: Haven't seen any action on this patch, forgotten? http://marc.info/?l=bird-usersm=127200916013140w=2 I missed this patch. Shouldn't autoconf also set

Re: [PATCH 0/5] IP checksum improvements

2010-04-26 Thread Joakim Tjernlund
Martin Mares m...@ucw.cz wrote on 2010/04/26 10:31:31: Hello! while(buf != end) got worse in ppc. gcc 4.3.4 got even more worse than gcc 3.4.6. I think it is safe to say that gcc 4.3.4 is busted when it comes to optimization, even on x86. Seen -O1 do better than -O2 for x86 with gcc

RE: OSPF performance/SPF calculations

2010-04-26 Thread Joakim Tjernlund
Andrew Lemin andrew.le...@monitorsoft.com wrote on 2010/04/26 10:46:36: Hello. There are users out there who do desperately want multipath routing support in Bird. Please don't just ignore the need for multipath. The SPF work to support that should not be very hard I think, but I have no

fletcher checksum

2010-04-26 Thread Joakim Tjernlund
I think I mentioned this in passing but the fletcher checksum impl. is fragile. Try changing u16 length to u32 length and watch it break for no apparent reason. Jocke

CLI ?

2010-04-26 Thread Joakim Tjernlund
Tried the CLI(birdc) and I am a bit confused as to whait it can do. I only see this when I press ?: bird ? configure [soft] [file]Reload configuration debug ... Control protocol debugging via BIRD logs disable protocol | pattern | all

RE: OSPF performance/SPF calculations

2010-04-26 Thread Joakim Tjernlund
Andrew Lemin andrew.le...@monitorsoft.com wrote on 2010/04/26 12:14:52: Hello. Yes, I believe the changes should not be that difficult. For example, by simply creating two separate 'RIP protocol' instances which listen on different external interfaces, I can get bird's internal core routing

Re: CLI ?

2010-04-26 Thread Joakim Tjernlund
Ondrej Filip fe...@network.cz wrote on 2010/04/26 14:59:06: On 26.4.2010 14:26, Joakim Tjernlund wrote: Tried the CLI(birdc) and I am a bit confused as to whait it can do. I only see this when I press ?: bird ? configure [soft] [file]Reload configuration debug

Re: CLI ?

2010-04-26 Thread Joakim Tjernlund
Arnold Nipper arn...@nipper.de wrote on 2010/04/26 17:40:51: On 26.04.2010 17:06 Joakim Tjernlund wrote OK, but it would be handy if I could config log files from there. BIRD is like a racing car whereas you are talking about a Mercedes-Benz S-type ... you see the difference

Re: CLI ?

2010-04-26 Thread Joakim Tjernlund
On 26.4.2010 17:50, Joakim Tjernlund wrote: Arnold Nipper arn...@nipper.de wrote on 2010/04/26 17:40:51: On 26.04.2010 17:06 Joakim Tjernlund wrote OK, but it would be handy if I could config log files from there. BIRD is like a racing car whereas you are talking about a Mercedes

Re: CLI ?

2010-04-26 Thread Joakim Tjernlund
Ondrej Filip fe...@network.cz wrote on 2010/04/26 20:25:19: On 26.4.2010 18:34, Joakim Tjernlund wrote: On 26.4.2010 17:50, Joakim Tjernlund wrote: Arnold Nipper arn...@nipper.de wrote on 2010/04/26 17:40:51: On 26.04.2010 17:06 Joakim Tjernlund wrote OK, but it would be handy if I

Re: [PATCH 3/5] checksum: use pre increment.

2010-04-26 Thread Joakim Tjernlund
Ondrej Filip fe...@network.cz wrote on 2010/04/26 17:40:57: On 25.4.2010 23:40, Joakim Tjernlund wrote: Martin Mares m...@ucw.cz wrote on 2010/04/25 23:33:49: Some archs(RISC like archs) can do pre increment and load in one insn but gcc optimization often fails to take advantage

[PATCH 0/5] IP checksum improvements

2010-04-25 Thread Joakim Tjernlund
gcc handle them. Feel free to ignore these patches, I just wanted to at least document my findings in patch form. Joakim Tjernlund (5): checksum: improve add32 checksum: Optimize add32() for PowerPC checksum: use pre increment. checksum: optimize loop and get rid of add16() checksum

[PATCH 4/5] checksum: optimize loop and get rid of add16()

2010-04-25 Thread Joakim Tjernlund
Use some better vaiable names and get rid of add16 as add32 will do just as well. Fold the 32 bit checkum into 16 bits in the end. Signed-off-by: Joakim Tjernlund joakim.tjernl...@transmode.se --- lib/checksum.c | 47 +++ 1 files changed, 23

[PATCH 2/5] checksum: Optimize add32() for PowerPC

2010-04-25 Thread Joakim Tjernlund
PowerPC does not recognize add32() as an add with carry operation so use inline assembler instead. Signed-off-by: Joakim Tjernlund joakim.tjernl...@transmode.se --- lib/checksum.c | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/lib/checksum.c b/lib/checksum.c

[PATCH 3/5] checksum: use pre increment.

2010-04-25 Thread Joakim Tjernlund
Some archs(RISC like archs) can do pre increment and load in one insn but gcc optimization often fails to take advantage of that. Help gcc to do the right thing by using pre increment instead of post increment. Signed-off-by: Joakim Tjernlund joakim.tjernl...@transmode.se --- lib/checksum.c

[PATCH 5/5] checksum: Optimize first addition.

2010-04-25 Thread Joakim Tjernlund
The first add op. adds two 16 bit nums which cannot overflow one 32 bits receiver so use plain addition instead. Signed-off-by: Joakim Tjernlund joakim.tjernl...@transmode.se --- lib/checksum.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/checksum.c b/lib

[PATCH 4/5 v2] checksum: optimize loop and get rid of add16()

2010-04-25 Thread Joakim Tjernlund
Use some better vaiable names and get rid of add16 as add32 will do just as well. Fold the 32 bit checkum into 16 bits in the end. --- v2 - bug fix lib/checksum.c | 47 +++ 1 files changed, 23 insertions(+), 24 deletions(-) diff --git

[PATCH 5/5 v2] checksum: Optimize first addition.

2010-04-25 Thread Joakim Tjernlund
The first add op. adds two 16 bit nums which cannot overflow one 32 bits receiver so use plain addition instead. --- v2 - adapt after bug fix. lib/checksum.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/checksum.c b/lib/checksum.c index 9e30bdc..d4ffdfd 100644

Re: OSPF performance/SPF calculations

2010-04-25 Thread Joakim Tjernlund
Slowly getting back to SPF again .. Ondrej Zajicek santi...@crfreenet.org wrote on 2010/04/23 16:01:16: On Fri, Apr 23, 2010 at 03:27:10PM +0200, Joakim Tjernlund wrote: Anyhow I looked at the new code and it is an improvement but I think there is a flaw: It looks like the ptp code just

Re: [PATCH 3/5] checksum: use pre increment.

2010-04-25 Thread Joakim Tjernlund
Martin Mares m...@ucw.cz wrote on 2010/04/25 23:33:49: Some archs(RISC like archs) can do pre increment and load in one insn but gcc optimization often fails to take advantage of that. Help gcc to do the right thing by using pre increment instead of post increment. This one is a little

Re: [PATCH 0/5] IP checksum improvements

2010-04-25 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/04/25 23:20:52: On Sun, Apr 25, 2010 at 11:41:17AM +0200, Joakim Tjernlund wrote: Here are a series of performance improvements on the Internet checksum. With these changes applied I get about 20-30% better performance on x86 and PowerPC

Re: [PATCH 0/5] IP checksum improvements

2010-04-25 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/04/25 23:20:52: On Sun, Apr 25, 2010 at 11:41:17AM +0200, Joakim Tjernlund wrote: Here are a series of performance improvements on the Internet checksum. With these changes applied I get about 20-30% better performance on x86

Patch ping

2010-04-25 Thread Joakim Tjernlund
Haven't seen any action on this patch, forgotten? http://marc.info/?l=bird-usersm=127200916013140w=2

Re: OSPF performance/SPF calculations

2010-04-25 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/04/25 23:20:33: On Sun, Apr 25, 2010 at 06:08:04PM +0200, Joakim Tjernlund wrote: This is not a problem because both SPF and calc_next_hop() chooses the cheapest (full) ptp link. They both uses the same (local) metrics. Our ptp links

Re: [PATCH 0/5] IP checksum improvements

2010-04-25 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/04/25 23:20:52: On Sun, Apr 25, 2010 at 11:41:17AM +0200, Joakim Tjernlund wrote: Here are a series of performance improvements on the Internet checksum. With these changes applied I get about 20-30% better performance on x86

Re: OSPF performance/SPF calculations

2010-04-23 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/04/21 20:15:07: On Wed, Apr 21, 2010 at 09:41:47AM +0200, Joakim Tjernlund wrote: I am using Quagga ATM but I had a quick look at BIRD and I got a few observations. Hello. Thank you for your tips and notes. The LSA/checksum

Re: OSPF performance/SPF calculations

2010-04-23 Thread Joakim Tjernlund
Joakim Tjernlund/Transmode wrote on 2010/04/21 22:04:06: Ondrej Zajicek santi...@crfreenet.org wrote on 2010/04/21 20:15:07: On Wed, Apr 21, 2010 at 09:41:47AM +0200, Joakim Tjernlund wrote: I am using Quagga ATM but I had a quick look at BIRD and I got a few observations. Hello

[PATCH] ipsum_calc_block: Optimize size and speed

2010-04-23 Thread Joakim Tjernlund
This is a much simpler and efficent impl. of the IP checksum. It is a dry port from Quagga and I have not tested it. --- lib/checksum.c | 44 +++- 1 files changed, 11 insertions(+), 33 deletions(-) diff --git a/lib/checksum.c b/lib/checksum.c index

Re: OSPF performance/SPF calculations

2010-04-23 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/04/23 11:52:26: From: Ondrej Zajicek santi...@crfreenet.org To: Joakim Tjernlund joakim.tjernl...@transmode.se Cc: bird-us...@trubka.network.cz Date: 2010/04/23 11:46 Subject: Re: OSPF performance/SPF calculations On Fri, Apr 23, 2010

Re: possible bug: bgp md5 authentication and multiple source ip addresses

2010-04-23 Thread Joakim Tjernlund
On Fri, Apr 23, 2010 at 10:13:32AM +0200, Wolfgang Hennerbichler wrote: now I've setup BIRD to peer on the different source interfaces and from different ASes to simulate productive routers: protocol bgp R1 { debug all; local as 1120; neighbor 193.203.0.3 as 1267; import

Re: OSPF performance/SPF calculations

2010-04-23 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/04/23 14:22:18: On Fri, Apr 23, 2010 at 01:06:20PM +0200, Joakim Tjernlund wrote: I must be missing something then(not surprising as I just started looking at BIRD). Why do you need the separate allocation for the body of the LSA

Re: [PATCH] ipsum_calc_block: Optimize size and speed

2010-04-23 Thread Joakim Tjernlund
Martin Mares m...@ucw.cz wrote on 2010/04/23 15:03:34: Hello! This is a much simpler and efficent impl. of the IP checksum. It is a dry port from Quagga and I have not tested it. Are you convinced that your version is more efficient? The original version processes 32 bits at a time,

Re: [PATCH] ipsum_calc_block: Optimize size and speed

2010-04-23 Thread Joakim Tjernlund
Hello! But you can't get rid of: z + (z sum) which is the real bottleneck. Perhaps this doesn't cost much on high end CPUs but it sure does on embedded CPUs Why should it be? It can be compiled as a sequence of add with carry instructions, can't it? Yes, but have you seen gcc do

Re: OSPF performance/SPF calculations

2010-04-23 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/04/23 16:09:00: On Fri, Apr 23, 2010 at 10:54:33AM +0200, Joakim Tjernlund wrote: Removing of endianity swap is correct only if the Fletcher checksum would return the same value regardless of endianity swap. Is this a property

Re: [PATCH] ipsum_calc_block: Optimize size and speed

2010-04-23 Thread Joakim Tjernlund
Joakim Tjernlund/Transmode wrote on 2010/04/23 16:14:58: Hello! But you can't get rid of: z + (z sum) which is the real bottleneck. Perhaps this doesn't cost much on high end CPUs but it sure does on embedded CPUs Why should it be? It can be compiled as a sequence of add

Re: OSPF performance/SPF calculations

2010-04-23 Thread Joakim Tjernlund
On Fri, Apr 23, 2010 at 04:12:27PM +0200, Joakim Tjernlund wrote: As i looked on the Fletcher checksum, it seems that you cannot just swap the result instead of swapping the checked data. Then there is a bug else where. Fletcher as such does not depend on host endian. It operates

Re: [PATCH] ipsum_calc_block: Optimize size and speed

2010-04-23 Thread Joakim Tjernlund
Ondrej Filip fe...@network.cz wrote on 2010/04/23 18:41:57: On 23.4.2010 18:32, Ondrej Zajicek wrote: On Fri, Apr 23, 2010 at 03:20:55PM +0200, Martin Mares wrote: Hello! Fairly, I once had the same idea for Quagga but found all those extra tests and additions were much slower(I

Re: OSPF performance/SPF calculations

2010-04-23 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/04/23 18:46:19: On Fri, Apr 23, 2010 at 05:29:09PM +0200, Joakim Tjernlund wrote: But you also need LSAs in host endianity when doing SPF calculation. Although it would be probably possible to change SPF calculation to use directly

Re: [PATCH] ipsum_calc_block: Optimize size and speed

2010-04-23 Thread Joakim Tjernlund
Martin Mares m...@ucw.cz wrote on 2010/04/23 19:23:18: Hello! So there isn't really difference in performance of both implementations. Even on slow embedded AMD Geode CPU, it gives ~ 180 MB/s. No difference? what does 1.2 mean? to me this means 20% which is a lot Yes, but

Re: [PATCH] ipsum_calc_block: Optimize size and speed

2010-04-23 Thread Joakim Tjernlund
Ondrej Filip fe...@network.cz wrote on 2010/04/23 19:28:27: On 23.4.2010 19:01, Joakim Tjernlund wrote: Ondrej Filip fe...@network.cz wrote on 2010/04/23 18:41:57: On 23.4.2010 18:32, Ondrej Zajicek wrote: On Fri, Apr 23, 2010 at 03:20:55PM +0200, Martin Mares wrote: Hello! My

Re: [PATCH] ipsum_calc_block: Optimize size and speed

2010-04-23 Thread Joakim Tjernlund
Ondrej Zajicek santi...@crfreenet.org wrote on 2010/04/23 21:39:06: On Fri, Apr 23, 2010 at 07:40:28PM +0200, Joakim Tjernlund wrote: Martin Mares m...@ucw.cz wrote on 2010/04/23 19:23:18: Hello! So there isn't really difference in performance of both implementations. Even

Re: [PATCH] ipsum_calc_block: Optimize size and speed

2010-04-23 Thread Joakim Tjernlund
Martin Mares m...@ucw.cz wrote on 2010/04/23 23:02:29: Hello! How did you come to the conclusion the the current code was better than the previous version? Seems like hand waving to me. Did I claim anywhere that the old code is better? I only pointed out You did when you commited it

OSPF performance/SPF calculations

2010-04-21 Thread Joakim Tjernlund
I am using Quagga ATM but I had a quick look at BIRD and I got a few observations. The LSA/checksum code seem very inefficient. LSAs are built allocating/reallocing bits of memory. This is slow and will case memory fragmentation. The fletcher checksum is very slow as it has extra tests in the