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:   Sun, 22 Mar 2020 20:48:25 +0200
From:   Ido Schimmel <idosch@...sch.org>
To:     netdev@...r.kernel.org
Cc:     davem@...emloft.net, jiri@...lanox.com, kuba@...nel.org,
        mlxsw@...lanox.com, Ido Schimmel <idosch@...lanox.com>
Subject: [PATCH net-next 0/5] devlink: Preparations for trap policers support

From: Ido Schimmel <idosch@...lanox.com>

This patch set prepares the code for devlink-trap policer support in a
follow-up patch set [1][2]. No functional changes intended.

Policers are going to be added as attributes of packet trap groups,
which are entities used to aggregate logically related packet traps.
This will allow users, for example, to limit all the packets that
encountered an exception during routing to 10Kpps.

However, currently, device drivers register their packet trap groups
implicitly when they register their packet traps via
devlink_traps_register(). This makes it difficult to pass additional
attributes for the groups. For example, the policer bound to the group.

Therefore, this patch set converts device drivers to explicitly register
their packet trap groups. This will later allow these drivers to
register the group with additional attributes, if any.

API today:
devlink_traps_register(traps)

API after this patch set:
devlink_trap_groups_register(groups)
devlink_traps_register(traps)

API after follow-up patch set:
devlink_trap_policers_register(policers)
devlink_trap_groups_register(groups)
devlink_traps_register(traps)

Patch set overview:
Patch #1 adds the new API to register packet trap groups
Patches #2-#3 convert mlxsw and netdevsim to use the new API
Patches #4-#5 remove the old API

Tested successfully with current devlink-trap selftests.

[1] https://github.com/idosch/linux/tree/trap-policers
[2] https://github.com/idosch/iproute2/tree/trap-policers

Ido Schimmel (5):
  devlink: Add API to register packet trap groups
  mlxsw: spectrum_trap: Explicitly register packet trap groups
  netdevsim: Explicitly register packet trap groups
  devlink: Stop reference counting packet trap groups
  devlink: Only pass packet trap group identifier in trap structure

 .../ethernet/mellanox/mlxsw/spectrum_trap.c   |  38 ++-
 drivers/net/netdevsim/dev.c                   |  27 +-
 include/net/devlink.h                         |  19 +-
 net/core/devlink.c                            | 233 ++++++++++--------
 4 files changed, 202 insertions(+), 115 deletions(-)

-- 
2.24.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ