1. 23 Oct, 2023 24 commits
  2. 19 Oct, 2023 13 commits
  3. 18 Oct, 2023 3 commits
    • Jakub Kicinski's avatar
      Merge tag 'mlx5-updates-2023-10-10' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux · ee2a35fe
      Jakub Kicinski authored
      Saeed Mahameed says:
      
      ====================
      mlx5-updates-2023-10-10
      
      1) Adham Faris, Increase max supported channels number to 256
      
      2) Leon Romanovsky, Allow IPsec soft/hard limits in bytes
      
      3) Shay Drory, Replace global mlx5_intf_lock with
         HCA devcom component lock
      
      4) Wei Zhang, Optimize SF creation flow
      
      During SF creation, HCA state gets changed from INVALID to
      IN_USE step by step. Accordingly, FW sends vhca event to
      driver to inform about this state change asynchronously.
      Each vhca event is critical because all related SW/FW
      operations are triggered by it.
      
      Currently there is only a single mlx5 general event handler
      which not only handles vhca event but many other events.
      This incurs huge bottleneck because all events are forced
      to be handled in serial manner.
      
      Moreover, all SFs share same table_lock which inevitably
      impacts each other when they are created in parallel.
      
      This series will solve this issue by:
      
      1. A dedicated vhca event handler is introduced to eliminate
         the mutual impact with other mlx5 events.
      2. Max FW threads work queues are employed in the vhca event
         handler to fully utilize FW capability.
      3. Redesign SF active work logic to completely remove
         table_lock.
      
      With above optimization, SF creation time is reduced by 25%,
      i.e. from 80s to 60s when creating 100 SFs.
      
      Patches summary:
      
      Patch 1 - implement dedicated vhca event handler with max FW
                cmd threads of work queues.
      Patch 2 - remove table_lock by redesigning SF active work
                logic.
      
      * tag 'mlx5-updates-2023-10-10' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux:
        net/mlx5e: Allow IPsec soft/hard limits in bytes
        net/mlx5e: Increase max supported channels number to 256
        net/mlx5e: Preparations for supporting larger number of channels
        net/mlx5e: Refactor mlx5e_rss_init() and mlx5e_rss_free() API's
        net/mlx5e: Refactor mlx5e_rss_set_rxfh() and mlx5e_rss_get_rxfh()
        net/mlx5e: Refactor rx_res_init() and rx_res_free() APIs
        net/mlx5e: Use PTR_ERR_OR_ZERO() to simplify code
        net/mlx5: Use PTR_ERR_OR_ZERO() to simplify code
        net/mlx5: fix config name in Kconfig parameter documentation
        net/mlx5: Remove unused declaration
        net/mlx5: Replace global mlx5_intf_lock with HCA devcom component lock
        net/mlx5: Refactor LAG peer device lookout bus logic to mlx5 devcom
        net/mlx5: Avoid false positive lockdep warning by adding lock_class_key
        net/mlx5: Redesign SF active work to remove table_lock
        net/mlx5: Parallelize vhca event handling
      ====================
      
      Link: https://lore.kernel.org/r/20231014171908.290428-1-saeed@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      ee2a35fe
    • Justin Stitt's avatar
      hamradio: replace deprecated strncpy with strscpy_pad · d4b14c1d
      Justin Stitt authored
      strncpy() is deprecated for use on NUL-terminated destination strings
      [1] and as such we should prefer more robust and less ambiguous string
      interfaces.
      
      We expect both hi.data.modename and hi.data.drivername to be
      NUL-terminated based on its usage with sprintf:
      |       sprintf(hi.data.modename, "%sclk,%smodem,fclk=%d,bps=%d%s",
      |               bc->cfg.intclk ? "int" : "ext",
      |               bc->cfg.extmodem ? "ext" : "int", bc->cfg.fclk, bc->cfg.bps,
      |               bc->cfg.loopback ? ",loopback" : "");
      
      Note that this data is copied out to userspace with:
      |       if (copy_to_user(data, &hi, sizeof(hi)))
      ... however, the data was also copied FROM the user here:
      |       if (copy_from_user(&hi, data, sizeof(hi)))
      
      Considering the above, a suitable replacement is strscpy_pad() as it
      guarantees NUL-termination on the destination buffer while also
      NUL-padding (which is good+wanted behavior when copying data to
      userspace).
      
      Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
      Link: https://github.com/KSPP/linux/issues/90Signed-off-by: default avatarJustin Stitt <justinstitt@google.com>
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Link: https://lore.kernel.org/r/20231016-strncpy-drivers-net-hamradio-baycom_epp-c-v2-1-39f72a72de30@google.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      d4b14c1d
    • Jakub Kicinski's avatar
      docs: netlink: clean up after deprecating version · 5294df64
      Jakub Kicinski authored
      Jiri moved version to legacy specs in commit 0f07415e ("netlink:
      specs: don't allow version to be specified for genetlink").
      Update the documentation.
      Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
      Link: https://lore.kernel.org/r/20231016214540.1822392-1-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      5294df64