lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 5 Nov 2020 12:12:30 -0800
From:   Saeed Mahameed <saeedm@...dia.com>
To:     Jakub Kicinski <kuba@...nel.org>
CC:     <netdev@...r.kernel.org>, "David S. Miller" <davem@...emloft.net>,
        "Saeed Mahameed" <saeedm@...dia.com>
Subject: [pull request][net-next v2 00/12] mlx5 updates 2020-11-03

Hi Jakub,

This series makes some updates to mlx5 software steering.
and some other misc trivial changes.

v1->v2:
   - use %zu for size_t printk in patch 9.

For more information please see tag log below.

For the DR memory buddy allocator series, Yevgeny has updated
the implementation according to Dave's request [1] and got rid of
the bit array optimization and moved back to standard buddy
allocator implementation.

[1] https://patchwork.ozlabs.org/project/netdev/patch/20200925193809.463047-2-saeed@kernel.org/

Please pull and let me know if there is any problem.

Thanks,
Saeed.

---
The following changes since commit 6d89076e6ef09337a29a7b1ea4fdf2d892be9650:

  Merge branch 'net-mac80211-kernel-enable-kcov-remote-coverage-collection-for-802-11-frame-handling' (2020-11-02 18:01:46 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git tags/mlx5-updates-2020-11-03

for you to fetch changes up to 514436857128cad07015dc6d1d9842113ac2e798:

  net: mlx5: Replace in_irq() usage (2020-11-05 12:09:31 -0800)

----------------------------------------------------------------
mlx5-updates-2020-11-03

This series includes updates to mlx5 software steering component.

1) Few improvements in the DR area, such as removing unneeded checks,
  renaming to better general names, refactor in some places, etc.

2) Software steering (DR) Memory management improvements

This patch series contains SW Steering memory management improvements:
using buddy allocator instead of an existing bucket allocator, and
several other optimizations.

The buddy system is a memory allocation and management algorithm
that manages memory in power of two increments.

The algorithm is well-known and well-described, such as here:
https://en.wikipedia.org/wiki/Buddy_memory_allocation

Linux uses this algorithm for managing and allocating physical pages,
as described here:
https://www.kernel.org/doc/gorman/html/understand/understand009.html

In our case, although the algorithm in principal is similar to the
Linux physical page allocator, the "building blocks" and the circumstances
are different: in SW steering, buddy allocator doesn't really allocates
a memory, but rather manages ICM (Interconnect Context Memory) that was
previously allocated and registered.

The ICM memory that is used in SW steering is always power
of 2 (order), so buddy system is a good fit for this.

Patches in this series:

[PATH 4] net/mlx5: DR, Add buddy allocator utilities
  This patch adds a modified implementation of a well-known buddy allocator,
  adjusted for SW steering needs: the algorithm in principal is similar to
  the Linux physical page allocator, but in our case buddy allocator doesn't
  really allocate a memory, but rather manages ICM memory that was previously
  allocated and registered.

[PATH 5] net/mlx5: DR, Handle ICM memory via buddy allocation instead of bucket management
  This patch changes ICM management of SW steering to use buddy-system mechanism
  Instead of the previous bucket management.

[PATH 6] net/mlx5: DR, Sync chunks only during free
  This patch makes syncing happen only when freeing memory chunks.

[PATH 7] net/mlx5: DR, ICM memory pools sync optimization
  This patch adds tracking of pool's "hot" memory and makes the
  check whether steering sync is required much shorter and faster.

[PATH 8] net/mlx5: DR, Free buddy ICM memory if it is unused
  This patch adds tracking buddy's used ICM memory,
  and frees the buddy if all its memory becomes unused.

3) Misc code cleanups

----------------------------------------------------------------
Saeed Mahameed (2):
      net/mlx4: Cleanup kernel-doc warnings
      net/mlx5: Cleanup kernel-doc warnings

Sebastian Andrzej Siewior (1):
      net: mlx5: Replace in_irq() usage

Vladyslav Tarasiuk (1):
      net/mlx5e: Validate stop_room size upon user input

Yevgeny Kliteynik (8):
      net/mlx5: DR, Remove unused member of action struct
      net/mlx5: DR, Rename builders HW specific names
      net/mlx5: DR, Rename matcher functions to be more HW agnostic
      net/mlx5: DR, Add buddy allocator utilities
      net/mlx5: DR, Handle ICM memory via buddy allocation instead of buckets
      net/mlx5: DR, Sync chunks only during free
      net/mlx5: DR, ICM memory pools sync optimization
      net/mlx5: DR, Free unused buddy ICM memory

 drivers/net/ethernet/mellanox/mlx4/fw_qos.h        |   2 +-
 drivers/net/ethernet/mellanox/mlx5/core/Makefile   |   2 +-
 .../net/ethernet/mellanox/mlx5/core/en/params.c    |  34 ++
 .../net/ethernet/mellanox/mlx5/core/en/params.h    |   4 +
 .../ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c |   8 +-
 .../mellanox/mlx5/core/en_accel/ktls_txrx.h        |   2 +-
 .../mellanox/mlx5/core/en_accel/tls_rxtx.c         |   6 +-
 .../mellanox/mlx5/core/en_accel/tls_rxtx.h         |   4 +-
 .../net/ethernet/mellanox/mlx5/core/en_ethtool.c   |   5 +
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c  |  30 +-
 drivers/net/ethernet/mellanox/mlx5/core/eq.c       |  18 +-
 drivers/net/ethernet/mellanox/mlx5/core/fpga/sdk.h |   8 +-
 .../mellanox/mlx5/core/steering/dr_buddy.c         | 170 +++++++
 .../ethernet/mellanox/mlx5/core/steering/dr_cmd.c  |   4 +-
 .../mellanox/mlx5/core/steering/dr_icm_pool.c      | 501 ++++++++-------------
 .../mellanox/mlx5/core/steering/dr_matcher.c       | 107 +++--
 .../ethernet/mellanox/mlx5/core/steering/dr_ste.c  |  42 +-
 .../mellanox/mlx5/core/steering/dr_types.h         |  79 ++--
 .../ethernet/mellanox/mlx5/core/steering/mlx5dr.h  |  32 ++
 19 files changed, 591 insertions(+), 467 deletions(-)
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_buddy.c

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ