Commit graph

3767 commits

Author SHA1 Message Date
Maria Matejka
32793ab685 Filter: Fixed bugs in FI_CALL and FI_SWITCH 2019-02-20 22:30:55 +01:00
Maria Matejka
d348a916f5 Test: Added -d flag to die directly after first error. 2019-02-20 22:30:55 +01:00
Maria Matejka
d4bf74816f GDB: Added more pretty printers for filters 2019-02-20 22:30:55 +01:00
Maria Matejka
ea4f55e3dc Filter: More cleanup -- customized structures also in struct f_line_item 2019-02-20 22:30:55 +01:00
Maria Matejka
0b39b1cbb7 Conf: Symbol implementation converted from void pointers to union
... and consted some declarations.
2019-02-20 22:30:55 +01:00
Maria Matejka
132529ce89 Filter: merged filter compare functions into common M4 file 2019-02-20 22:30:55 +01:00
Maria Matejka
dd4d409551 Filter: Merged postfixify routine 2019-02-20 22:30:54 +01:00
Maria Matejka
de12cd18fb Filter: Merged filter line item dumpers into common generated source 2019-02-20 22:30:54 +01:00
Maria Matejka
b256f24145 Filter: auto-generating enum-to-string 2019-02-20 22:30:54 +01:00
Maria Matejka
041608129a Filter generator: workaround for M4 claiming all the put-around code be on one line 2019-02-20 22:30:54 +01:00
Maria Matejka
5289304519 Filter data manipulation functions separated to their file 2019-02-20 22:30:54 +01:00
Maria Matejka
87bd7cd7b0 Filter: split the constructors to a separate file 2019-02-20 22:30:54 +01:00
Maria Matejka
75206f266f Conf: Fixed makefiles 2019-02-20 22:30:54 +01:00
Maria Matejka
4f082dfa89 Filter: merged filter instruction constructors, counting line size on instruction construct 2019-02-20 22:30:54 +01:00
Maria Matejka
0a793ebc60 Test: Fixed annoying warnings (and possible obscure bugs). 2019-02-20 22:30:54 +01:00
Maria Matejka
8bdb05edb2 Filters: split the large filter.h file to smaller files.
This should be revised, there are still ugly things in the filter API.
2019-02-20 22:30:54 +01:00
Maria Matejka
c1e97169cd Filter: M4 convertors polished a bit. 2019-02-20 22:30:54 +01:00
Maria Matejka
c0e958e022 Filter + Config: Fix bugs, tests and split symbols by type 2019-02-20 22:30:54 +01:00
Maria Matejka
713658798d GDB pretty printers: f_inst and f_val. 2019-02-20 22:30:54 +01:00
Maria Matejka
9b46748d5b Filter: refactoring of instruction constructors 2019-02-20 22:30:54 +01:00
Maria Matejka
4c553c5a5b Filter refactoring: dropped the recursion from the interpreter
This is a major change of how the filters are interpreted. If everything
works how it should, it should not affect you unless you are hacking the
filters themselves.

Anyway, this change should make a huge improvement in the filter performance
as previous benchmarks showed that our major problem lies in the
recursion itself.

There are also some changes in nest and protocols, related mostly to
spreading const declarations throughout the whole BIRD and also to
refactored dynamic attribute definitions. The need of these came up
during the whole work and it is too difficult to split out these
not-so-related changes.
2019-02-20 22:30:54 +01:00
Maria Matejka
967b88d938 Filter refactoring: The instructions are converted to the switch body by M4 2019-02-20 22:30:54 +01:00
Maria Matejka
8436040735 Filter refactoring: Drop the roa check specific f_inst 2019-02-20 22:30:54 +01:00
Maria Matejka
ca2ee91a80 Filter refactoring: The constant f_val is simply included inside the instruction
With 32 bits, size of the args is 12 bytes, the f_val is 20 bytes.
With 64 bits, size of the args is 24 bytes, the f_val the same.

This is not so nice on 32 bits, anyway the f_inst itself is
24 vs. 32 bytes and the overall size of filters must be 32k of
instructions to get to one megabyte of RAM eaten by f_inst.

Therefore it seems to be improbable for common user to get into
problems with this change.
2019-02-20 22:30:54 +01:00
Maria Matejka
7f0ac73724 Filter refactoring: Changed arguments from separate unions to an array 2019-02-20 22:30:54 +01:00
Maria Matejka
224b77d4f7 Filter refactoring: Converted condition to three-args instruction 2019-02-20 22:30:54 +01:00
Maria Matejka
8e8b1fe48c Filter refactoring: Some instructions eat up excessively much space. 2019-02-20 22:30:54 +01:00
Maria Matejka
c577493908 Filter refactoring: Expanded the short instructions with common code.
This will make the further changes more straightforward.
2019-02-20 22:30:54 +01:00
Maria Matejka
a8740d6c09 Filter refactoring: indentation fix 2019-02-20 22:30:54 +01:00
Jan Maria Matejka
fc8df41ec6 Filter refactoring: The values are now saved on a custom stack.
This shall help with performance.
2019-02-20 22:30:54 +01:00
Jan Maria Matejka
7afa143886 Filter refactoring: Passing the resulting struct f_val as a pointer.
This also drops the multiplexing of errors with the f_val itself
together with the T_RETURN f_val type flag.
2019-02-20 22:30:54 +01:00
Jan Maria Matejka
f62a369fb4 Filter refactoring: Moved filter instruction definition to a separate file 2019-02-20 22:30:54 +01:00
Jan Maria Matejka
25566c6810 Filter refactoring: Moved the bitfield bit position formula to route.h 2019-02-20 22:30:54 +01:00
Jan Maria Matejka
aca8263926 Filter refactoring: Moved the interpret macros inside the block 2019-02-20 22:30:54 +01:00
Jan Maria Matejka
02dcbf343d Configure: Don't check for implicit fallthrough unless when debugging. 2019-02-20 22:30:53 +01:00
Jan Maria Matejka
a946317fab Filter: Converted static global variables to a filter_state struct.
The static filter state was messy and blocked the planned parallel
execution of filters. Anyway, this will be also slower as the state
structure must be passed almost everywhere with us.
2019-02-20 22:30:53 +01:00
Ondrej Zajicek (work)
ae294cc2d0 HTML are no longer generated in srcdir 2019-02-19 18:30:28 +01:00
Ondrej Zajicek (work)
900fda4411 Doc: Detect SP/OpenSP automatically 2019-02-19 18:20:07 +01:00
Ondrej Zajicek (work)
3a8ca7abbc Nest: Prevent withdraws from propagation back to source protocol (for accepted mode)
Update for one of previous patches, handles the the issue for
first-accepted mode of route propagation.
2019-02-19 16:26:09 +01:00
Ondrej Zajicek (work)
bf8d7bba9e OSPF: Reset LSAs during area type change
When area is reconfigured to a different type, we need to flush LSAs as
they may not be valid (e.g. NSSA-LSA for non-NSSA area). Also, when we
have have just one OSPF area and that changes type, we could restart OSPF
as there is no state to keep anyway. That solves issue with different
handling of external routes exported to OSPF based of main area type.
2019-02-17 01:54:01 +01:00
Ondrej Zajicek (work)
4a3f5b3617 OSPF: Basic support for DN-bit handling (RFC 4576)
External LSAs originated by OSPF routers with VPN-PE behavior enabled are
marked by DN flag and they are ignored by other OSPF routers with VPN-PE
enabled.
2019-02-13 15:53:36 +01:00
Ondrej Zajicek (work)
1e958e52d3 OSPF: Do not originate Router-Information LSA
As we do not have much usage for it yet.
2019-02-09 16:15:01 +01:00
Ondrej Zajicek (work)
cd16538fc9 Merge remote-tracking branch 'origin/mq-opt' 2019-02-09 15:53:16 +01:00
Ondrej Zajicek (work)
6e8fb66859 Nest: Improve export counter handling
One of previous workarounds for phantom route avoidance breaks export
counters by expanding sending of spurious withdraws, which are send when
we are not sure whether we have advertised that routes in the past.
If not, then export counter is decreased, but it was not increased
before, so it overflows under zero.

The patch fixes that by sendung spurious withdraws, but not counting them
on export counter. That may lead to error in the other direction, but that
happens only as a race condition (i.e., in normal operation filters
return proper values about old route export state).
2019-02-05 19:00:43 +01:00
Ondrej Zajicek (work)
52fdd1cb76 Nest: Report preferred counters also when 'import keep filtered' is enabled
Thanks to Michal Nowak for reporting the issue.
2019-02-05 15:59:26 +01:00
Ondrej Zajicek (work)
a9b97cbcb7 OSPF: Send direct acknowledgements as unicast
Direct acknowledgements should be send as unicast to a corresponding
neighbor. Only delayed acks should be send as multicast to all/designated
routers.
2019-02-03 20:22:40 +01:00
Ondrej Zajicek (work)
16605f2fda OSPF: Reject duplicate DBDES packets after dead interval
Master may free last DBDES packet immediately. Slave must wait dead
interval before freeing last DBDES packet and then reject duplicate
DBDES packets with SeqNumberMismatch.
2019-02-03 17:31:27 +01:00
Ondrej Zajicek (work)
9c94583a3d OSPF: DD seqnum should be initialized only for first attempts
After SeqNumberMismatch/BadLSReq, we should continue with the old
seqnum++. The old code tries to do that by n->adj, but it was set
nowhere.
2019-02-03 16:20:37 +01:00
Ondrej Zajicek (work)
267da8138d OSPF: Reject DBDES packets with non-matching MTU
As it is specified in RFC 2328. The old code just provided warning.
2019-02-03 15:45:43 +01:00
Ondrej Zajicek (work)
e1c275d87b Nest: Reestablish preferred counters 2019-02-02 13:28:16 +01:00