1. 14 Jun, 2024 14 commits
  2. 13 Jun, 2024 23 commits
  3. 12 Jun, 2024 3 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux · 2ccbdf43
      Linus Torvalds authored
      Pull ARM and clkdev fixes from Russell King:
      
       - Fix clkdev - erroring out on long strings causes boot failures, so
         don't do this. Still warn about the over-sized strings (which will
         never match and thus their registration with clkdev is useless)
      
       - Fix for ftrace with frame pointer unwinder with recent GCC changing
         the way frames are stacked.
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux:
        ARM: 9405/1: ftrace: Don't assume stack frames are contiguous in memory
        clkdev: don't fail clkdev_alloc() if over-sized
      2ccbdf43
    • Jakub Kicinski's avatar
      Merge branch 'allow-configuration-of-multipath-hash-seed' · 05f43db7
      Jakub Kicinski authored
      Petr Machata says:
      
      ====================
      Allow configuration of multipath hash seed
      
      Let me just quote the commit message of patch #2 here to inform the
      motivation and some of the implementation:
      
          When calculating hashes for the purpose of multipath forwarding,
          both IPv4 and IPv6 code currently fall back on
          flow_hash_from_keys(). That uses a randomly-generated seed. That's a
          fine choice by default, but unfortunately some deployments may need
          a tighter control over the seed used.
      
          In this patchset, make the seed configurable by adding a new sysctl
          key, net.ipv4.fib_multipath_hash_seed to control the seed. This seed
          is used specifically for multipath forwarding and not for the other
          concerns that flow_hash_from_keys() is used for, such as queue
          selection. Expose the knob as sysctl because other such settings,
          such as headers to hash, are also handled that way.
      
          Despite being placed in the net.ipv4 namespace, the multipath seed
          sysctl is used for both IPv4 and IPv6, similarly to e.g. a number of
          TCP variables. Like those, the multipath hash seed is a per-netns
          variable.
      
          The seed used by flow_hash_from_keys() is a 128-bit quantity.
          However it seems that usually the seed is a much more modest value.
          32 bits seem typical (Cisco, Cumulus), some systems go even lower.
          For that reason, and to decouple the user interface from
          implementation details, go with a 32-bit quantity, which is then
          quadruplicated to form the siphash key.
      
      One example of use of this interface is avoiding hash polarization,
      where two ECMP routers, one behind the other, happen to make consistent
      hashing decisions, and as a result, part of the ECMP space of the latter
      router is never used. Another is a load balancer where several machines
      forward traffic to one of a number of leaves, and the forwarding
      decisions need to be made consistently. (This is a case of a desired
      hash polarization, mentioned e.g. in chapter 6.3 of [0].)
      
      There has already been a proposal to include a hash seed control
      interface in the past[1].
      
      - Patches #1-#2 contain the substance of the work
      - Patch #3 is an mlxsw offload
      - Patches #4 and #5 are a selftest
      
      [0] https://www.usenix.org/system/files/conference/nsdi18/nsdi18-araujo.pdf
      [1] https://lore.kernel.org/netdev/YIlVpYMCn%2F8WfE1P@rnd/
      ====================
      
      Link: https://lore.kernel.org/r/20240607151357.421181-1-petrm@nvidia.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      05f43db7
    • Petr Machata's avatar
      selftests: forwarding: router_mpath_hash: Add a new selftest · 5f90d93b
      Petr Machata authored
      Add a selftest that exercises the sysctl added in the previous patches.
      
      Test that set/get works as expected; that across seeds we eventually hit
      all NHs (test_mpath_seed_*); and that a given seed keeps hitting the same
      NHs even across seed changes (test_mpath_seed_stability_*).
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarNikolay Aleksandrov <razor@blackwall.org>
      Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
      Link: https://lore.kernel.org/r/20240607151357.421181-6-petrm@nvidia.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      5f90d93b