1. 16 Jun, 2022 1 commit
  2. 07 Jun, 2022 1 commit
  3. 05 Jun, 2022 1 commit
    • Ondřej Zajíček's avatar
      Babel: Do not try to remove multicast seqno request objects from neighbour list · ad686c55
      Ondřej Zajíček authored
      The Babel seqno request code keeps track of which seqno requests are
      outstanding for a neighbour by putting them onto a per-neighbour list. When
      reusing a seqno request, it will try to remove this node, but if the seqno
      request in question was a multicast request with no neighbour attached this
      will result in a crash because it tries to remove a list node that wasn't
      added to any list.
      
      Fix this by making the list remove conditional. Also fix neighbor removal
      which were changing seqno requests to multicast ones instead of removing
      them.
      
      Fixes: ebd5751c ("Babel: Seqno requests are properly decoupled from
      neighbors when the underlying interface disappears").
      
      Based on the patch from Toke Høiland-Jørgensen <toke@toke.dk>,
      bug reported by Stefan Haller <stefan.haller@stha.de>, thanks.
      ad686c55
  4. 04 Jun, 2022 2 commits
    • Ondřej Zajíček's avatar
      f39e9aa2
    • Ondřej Zajíček's avatar
      Nest: Improve GC strategy for rtables · a8a3d95b
      Ondřej Zajíček authored
      Use timer (configurable as 'gc period') to schedule routing table
      GC/pruning to ensure that prune is done on time but not too often.
      
      Randomize GC timers to avoid concentration of GC events from different
      tables in one loop cycle.
      
      Fix a bug that caused minimum inter-GC interval be 5 us instead of 5 s.
      
      Make default 'gc period' adaptive based on number of routing tables,
      from 10 s for small setups to 600 s for large ones.
      
      In marge multi-table RS setup, the patch improved time of flushing
      a downed peer from 20-30 min to <2 min and removed 40s latencies.
      a8a3d95b
  5. 27 May, 2022 1 commit
  6. 21 May, 2022 2 commits
  7. 19 May, 2022 1 commit
  8. 15 May, 2022 1 commit
    • Ondřej Zajíček's avatar
      BGP: Improve tx performance during feed/flush · ba2a0760
      Ondřej Zajíček authored
      The prefix hash table in BGP used the same hash function as the rtable.
      When a batch of routes are exported during feed/flush to the BGP, they
      all have similar hash values, so they are all crowded in a few slots in
      the BGP prefix table (which is much smaller - around the size of the
      batch - and uses higher bits from hash values), making it much slower due
      to excessive collisions. Use a different hash function to avoid this.
      
      Also, increase the batch size to fill 4k BGP packets and increase minimum
      BGP bucket and prefix hash sizes to avoid back and forth resizing during
      flushes.
      
      This leads to order of magnitude faster flushes (on my test data).
      ba2a0760
  9. 22 Apr, 2022 3 commits
  10. 13 Apr, 2022 1 commit
    • Maria Matejka's avatar
      Fixed a munmap abort bug · 9eec503b
      Maria Matejka authored
      When BIRD was munmapping too many pages, it sometimes aborted, saying
      that munmap failed with "Not enough memory" as the address space was
      getting more and more fragmented.
      
      There is a workaround in place, simply keeping that page for future use,
      yet it has never been compiled in because I somehow forgot to include
      errno.h. And because I also thought that somebody may have ENOMEM not
      defined (why?!), there was a check which quietly omitted that
      workaround.
      
      Anyway, ENOMEM is POSIX. It's an utter nonsense to check for its
      existence. If it doesn't exist, something is broken.
      9eec503b
  11. 07 Apr, 2022 1 commit
    • Ondřej Zajíček's avatar
      BFD: Add 'strict bind' option · 692055e3
      Ondřej Zajíček authored
      Add BFD protocol option 'strict bind' to use separate listening socket
      for each BFD interface bound to its address instead of using shared
      listening sockets.
      692055e3
  12. 16 Mar, 2022 2 commits
  13. 11 Mar, 2022 2 commits
  14. 02 Mar, 2022 1 commit
  15. 27 Feb, 2022 1 commit
  16. 20 Feb, 2022 2 commits
  17. 13 Feb, 2022 1 commit
  18. 09 Feb, 2022 1 commit
  19. 08 Feb, 2022 2 commits
  20. 07 Feb, 2022 1 commit
    • Ondřej Zajíček's avatar
      Lib: Update alignment of slabs · edc1a240
      Ondřej Zajíček authored
      Alignment of slabs should be at least sizeof(ptr) to avoid unaligned
      pointers in slab structures. Fixme: Use proper way to choose alignment
      for internal allocators.
      edc1a240
  21. 06 Feb, 2022 12 commits
    • Ondřej Zajíček's avatar
      Merge branch 'oz-trie-table' · 53a25406
      Ondřej Zajíček authored
      53a25406
    • Ondřej Zajíček's avatar
      Trie: Fix trie format · 24600c64
      Ondřej Zajíček authored
      After switching to 16-way tries, trie format ignored unaligned / internal
      prefixes and only reported the primary prefix of a trie node.
      
      Fix trie format by showing internal prefixes based on the 'local' bitmask
      of a node. Also do basic (intra-node) reconstruction of prefix patterns
      by finding common subtrees in 'local' bitmask.
      
      In future, we could improve that by doing inter-node reconstruction, so
      prefixes entered as one pattern for a subtree (e.g. 192.168.0.0/18+)
      would be reported as such, like with aligned prefixes.
      24600c64
    • Ondřej Zajíček's avatar
      Nest: Implement locking of prefix tries during walks · 5a89edc6
      Ondřej Zajíček authored
      The prune loop may may rebuild the prefix trie and therefore invalidate
      walk state for asynchronous walks (used in 'show route in' cmd). Fix it
      by adding locking that keeps the old trie in memory until current walks
      are done.
      
      In future this could be improved by rebuilding trie walk states (by
      lookup for last found prefix) after the prefix trie rebuild.
      5a89edc6
    • Ondřej Zajíček's avatar
      Nest: Implement prefix trie pruning · de6318f7
      Ondřej Zajíček authored
      When rtable is pruned and network fib nodes are removed, we also need to
      prune prefix trie. Unfortunately, rebuilding prefix trie takes long time
      (got about 400 ms for 1M networks), so must not be atomic, we have to
      rebuild a new trie while current one is still active. That may require
      some considerable amount of temporary memory, so we do that only if
      we expect significant trie size reduction.
      de6318f7
    • Ondřej Zajíček's avatar
      Trie: Add prefix counter · ba5aec94
      Ondřej Zajíček authored
      Add counter of prefixes stored in trie. Works only for 'restricted' tries
      composed of explicit prefixes (pxlen == l == h), like ones used in rtables.
      ba5aec94
    • Ondřej Zajíček's avatar
      Doc: Describe routing table options · d0f9a77f
      Ondřej Zajíček authored
      d0f9a77f
    • Ondřej Zajíček's avatar
      BGP: Implement flowspec validation procedure · 1f2eb2ac
      Ondřej Zajíček authored
      Implement flowspec validation procedure as described in RFC 8955 sec. 6
      and RFC 9117. The Validation procedure enforces that only routers in the
      forwarding path for a network can originate flowspec rules for that
      network.
      
      The patch adds new mechanism for tracking inter-table dependencies, which
      is necessary as the flowspec validation depends on IP routes, and flowspec
      rules must be revalidated when best IP routes change.
      
      The validation procedure is disabled by default and requires that
      relevant IP table uses trie, as it uses interval queries for subnets.
      1f2eb2ac
    • Ondřej Zajíček's avatar
      Nest: Add routing table configuration blocks · 1ae42e52
      Ondřej Zajíček authored
      Allow to specify sorted flag, trie fla, and min/max settle time.
      
      Also do not enable trie by default, it must be explicitly enabled.
      1ae42e52
    • Ondřej Zajíček's avatar
    • Ondřej Zajíček's avatar
      Nest: Avoid unnecessary net_format() in 'show route' command · 61375bd0
      Ondřej Zajíček authored
      When output of 'show route' command was generated, the net_format() was
      called for each network prematurely, even if the result was not needed.
      
      Fix the code to call net_format() only when needed. This makes queries
      that process many networks but show only few (e.g. 'show route where ..',
      or 'show route count') much faster (like 5x - 10x faster).
      61375bd0
    • Ondřej Zajíček's avatar
      Nest: Add trie iteration code to 'show route' · 9ac16df3
      Ondřej Zajíček authored
      Add trie iteration code to rt_show_cont() CLI hook and use it to
      accelerate 'show route in <addr>' commands using interval queries.
      9ac16df3
    • Ondřej Zajíček's avatar
      Nest: Implement 'show route in <addr>' command · ea97b890
      Ondřej Zajíček authored
      Implement 'show route in <addr>' command, which shows all routes in
      networks that are subnets of given network. Currently limited to IP
      network types.
      ea97b890