1. 29 Nov, 2021 4 commits
  2. 24 Nov, 2021 7 commits
  3. 23 Nov, 2021 8 commits
  4. 22 Nov, 2021 1 commit
    • Poul-Henning Kamp's avatar
      Hopefully fix u00006 on various platforms. · bec768df
      Poul-Henning Kamp authored
      Dont limit ourselves to a set number of VSL records to include
      the "0 CLI" we want, various platforms emit a number of Debug
      messages relating to sockopt
      
      Use the `process p%d -expect-text` mechanism to wait only as
      long as necessary for the "0 CLI"
      bec768df
  5. 19 Nov, 2021 7 commits
  6. 17 Nov, 2021 13 commits
    • Dridi Boukelmoune's avatar
      build: Simply require that SO_???TIMEO are present · 254faf07
      Dridi Boukelmoune authored
      Closes #3692
      
      Conflicts:
      	bin/varnishd/cache/cache_acceptor.c
      254faf07
    • Dridi Boukelmoune's avatar
      6093812b
    • Dridi Boukelmoune's avatar
      vca: Have one inheritance check per listen socket · 9c6f6043
      Dridi Boukelmoune authored
      Instead of having a single global check that all acceptors may race
      towards, this check now happens on a per listen socket basis. For
      sockets with a different inheritance behavior on a single system, we
      avoid having the first connection dictate what may be inherited by
      a connection socket from its listen socket for all the other listen
      addresses.
      
      At least on Linux, Unix-domain sockets DO NOT inherit options like
      SO_{RCV,SND}TIMEO even though TCP sockets do. On the off chance that
      even sockets of the same family could behave differently, like for
      example a regular vs a loopback TCP session, this is done on a per
      listen address basis. To avoid cache-acceptor coordination with the
      acceptor worker threads of a given listen address, workers will
      individually perform this check once and for all when the first
      connection is accepted.
      
      We also stay defensive in the event of a parameter change, just in
      case a previous test would assume inheritance because the Varnish
      parameter value would match the kernel default value. Once a mismatch
      is observed for a given connection with a given socket, the inheritance
      test is no longer performed needlessly for this combination.
      
      A race still exists between acceptors from different thread pools for
      a given listen address, but this race is identical to the previous one
      based on the former global need_test variable.
      
      Although the inheritance check leaks into struct listen_sock, it is
      opaque so everything can remain contained inside cache_acceptor.c.
      
      Some aspects of this change (including the clarification comments) are
      from @mbgrydeland.
      
      Refs #2722
      9c6f6043
    • Dridi Boukelmoune's avatar
      vca: Give sock_opt constant arguments better names · 58ac9f83
      Dridi Boukelmoune authored
      And while at it, update the SO_LINGER explanation to match reality.
      
      Refs 7eba9460
      
      Conflicts:
      	bin/varnishd/cache/cache_acceptor.c
      58ac9f83
    • Dridi Boukelmoune's avatar
      vca: Give all const socket options placeholers · 439f2619
      Dridi Boukelmoune authored
      The SO_KEEPALIVE justification used to precede such a constant and was
      left confusingly lingering over the unrelated need_test variable.
      
      Conflicts:
      	bin/varnishd/cache/cache_acceptor.c
      439f2619
    • Dridi Boukelmoune's avatar
      vca: Generalize the sock options test · 32ae0413
      Dridi Boukelmoune authored
      Using the tmp sock_arg for storage, we can test all values with the same
      logic and only differentiate hard-coded options from parameterized ones.
      
      Stylistic polish by @mbgrydeland.
      
      Conflicts:
      	bin/varnishd/cache/cache_acceptor.c
      32ae0413
    • Dridi Boukelmoune's avatar
      vca: Eliminate heap allocations of sock_opt arguments · 763cc6ef
      Dridi Boukelmoune authored
      They can be stored directly in the sock_opts array or on the stack.
      
      Conflicts:
      	bin/varnishd/cache/cache_acceptor.c
      763cc6ef
    • Dridi Boukelmoune's avatar
      vca: Pass higher-level types to sock_opt functions · 741c872c
      Dridi Boukelmoune authored
      The sess and listen_sock structs contain everything we need to find or
      infer the former `sock`, `uds` and `force` arguments. In particular, it
      helps distinguish between working on a connection vs listen socket.
      741c872c
    • Dridi Boukelmoune's avatar
      vca: Rename tcp_opt to a more general sock_opt · 1780645d
      Dridi Boukelmoune authored
      And conversely rename `to` variables to `so` for consistency.
      
      Better diff with the --word-diff --word-diff-regex='\w+' options.
      
      Conflicts:
      	bin/varnishd/cache/cache_acceptor.c
      1780645d
    • Dridi Boukelmoune's avatar
      vca: Remove the tcp_opt::iponly field · 258471a3
      Dridi Boukelmoune authored
      It is a 1:1 mapping with IPPROTO_TCP, so TCP_NODELAY was moved down to
      be with the other IPPROTO_TCP options.
      
      Conflicts:
      	bin/varnishd/cache/cache_acceptor.c
      258471a3
    • Dridi Boukelmoune's avatar
      fc63f129
    • Dridi Boukelmoune's avatar
      vca: Have one inheritance check per listen socket · 4eeb1e25
      Dridi Boukelmoune authored
      Instead of having a single global check that all acceptors may race
      towards, this check now happens on a per listen socket basis. For
      sockets with a different inheritance behavior on a single system, we
      avoid having the first connection dictate what may be inherited by
      a connection socket from its listen socket for all the other listen
      addresses.
      
      At least on Linux, Unix-domain sockets DO NOT inherit options like
      SO_{RCV,SND}TIMEO even though TCP sockets do. On the off chance that
      even sockets of the same family could behave differently, like for
      example a regular vs a loopback TCP session, this is done on a per
      listen address basis. To avoid cache-acceptor coordination with the
      acceptor worker threads of a given listen address, workers will
      individually perform this check once and for all when the first
      connection is accepted.
      
      We also stay defensive in the event of a parameter change, just in
      case a previous test would assume inheritance because the Varnish
      parameter value would match the kernel default value. Once a mismatch
      is observed for a given connection with a given socket, the inheritance
      test is no longer performed needlessly for this combination.
      
      A race still exists between acceptors from different thread pools for
      a given listen address, but this race is identical to the previous one
      based on the former global need_test variable.
      
      Although the inheritance check leaks into struct listen_sock, it is
      opaque so everything can remain contained inside cache_acceptor.c.
      
      Some aspects of this change (including the clarification comments) are
      from @mbgrydeland.
      
      Refs #2722
      4eeb1e25
    • Dridi Boukelmoune's avatar
      vca: Give sock_opt constant arguments better names · d05d08da
      Dridi Boukelmoune authored
      And while at it, update the SO_LINGER explanation to match reality.
      
      Refs 7eba9460
      d05d08da