Skip to content
Snippets Groups Projects
  1. Jul 02, 2024
  2. Jun 20, 2024
  3. Jun 18, 2024
  4. Jun 17, 2024
  5. Jun 13, 2024
  6. Jun 12, 2024
  7. Jun 11, 2024
  8. Jun 07, 2024
  9. Jun 06, 2024
  10. Jun 05, 2024
  11. Jun 04, 2024
    • Oto Šťáva's avatar
      Merge branch 'nits' into 'master' · bd5d4801
      Oto Šťáva authored
      Protocol layers and other parts refactoring (+ nits)
      
      See merge request !1546
      bd5d4801
    • Oto Šťáva's avatar
      daemon/session2.h: clarify `struct session2` docs · 4d57c638
      Oto Šťáva authored
      As pointed out by @lukas.ondracek, the wording could be confusing when
      mentioning *bottommost* and *topmost* layers. The original wording was
      meant to reference the way the arrays in `daemon/session2.c` are laid
      out, but never explicitly mentioned that, so one could be implicitly
      think it was in reference to the widely known ISO/OSI or TCP/IP models,
      which could be interpreted incorrectly (the layers are traditionally
      laid out the other way around there).
      Verified
      4d57c638
    • Oto Šťáva's avatar
      .gitlab-ci: use Arch for linting · 68688fac
      Oto Šťáva authored
      This allows us to use the newest versions of linter tools.
      Verified
      68688fac
    • Oto Šťáva's avatar
      daemon/session2: fix asynchronous layer iterations · 0a1f0024
      Oto Šťáva authored
      There were a few bugs in the protolayer system that prevented us from
      pausing iteration and resuming it properly. This commit should hopefully
      resolve them.
      Verified
      0a1f0024
    • Oto Šťáva's avatar
      Some more Clang-Tidy silencing · a805ad63
      Oto Šťáva authored
      Verified
      a805ad63
    • Oto Šťáva's avatar
      daemon/session2: optimize allocations · 9f6042c3
      Oto Šťáva authored
      A) Context-specific allocations
      -------------------------------
      
      There were two problems:
      
      1) Some payloads are short-lived (e.g. allocated on stack) and we need
         to make a copy of them if the iteration over protocol layers becomes
         asynchronous.
      2) The `pl_dns_stream_wrap` function used a mempool belonging to its
         session-wide context. Some sessions may live for a long time, which
         could potentially lead to needlessly long-lived memory allocations.
      
      Both of these problems are solved in this commit by using a new
      `knot_mm_t pool` field in `struct protolayer_iter_ctx`, which lives only
      for a single submit (and survives asynchronicity). The whole pool is
      then freed all at once when the `struct protolayer_iter_ctx` is
      finalized.
      
      B) Merging `struct protolayer_manager` into `struct session2`
      -------------------------------------------------------------
      
      It actually made no real sense to have the two separated. It only
      introduced an extra layer of indirection and many layers actually needed
      to access both anyway. This should simplify things considerably.
      Verified
      9f6042c3
    • Oto Šťáva's avatar
      daemon/proxyv2: move PROXY protocol into its own layer · b475d004
      Oto Šťáva authored
      Previously, PROXYv2 handling was partially implemented in the `io.c`
      unit in the `_TCP` and `_UDP` protocol layers, which technically made
      very little sense. This commit moves this handling into separate
      `_PROXYV2_DGRAM` and `_PROXYV2_STREAM` protocol layers, basically
      encapsulating the handling of proxies in the `proxyv2.c` unit.
      
      This commit also makes the PROXYv2 stream layer only support
      `PROTOLAYER_PAYLOAD_WIRE_BUF` on its input, as other payload types were
      unused and untested in this context.
      Verified
      b475d004
    • Oto Šťáva's avatar
      daemon/session2: protocol layer refactors + docs · dfe44a99
      Oto Šťáva authored
      This makes some readability enhancements to the `protolayer_` API as
      well as clarifies some of the documentation.
      
      There is also a change where the definitions of protocol layer sequences
      does not require a `_NULL` layer to be present at the end anymore, as
      the number of layers in a sequence is determined at compile time. This
      makes defining new sequences less error-prone.
      Verified
      dfe44a99
Loading