linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next RFC v1 0/4] Add devlink traps in devlink port context
@ 2020-09-02 15:32 Aya Levin
  2020-09-02 15:32 ` [PATCH net-next RFC v1 1/4] devlink: Wrap trap related lists and ops in trap_mngr Aya Levin
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Aya Levin @ 2020-09-02 15:32 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski, Jiri Pirko, netdev
  Cc: Moshe Shemesh, Eran Ben Elisha, Ido Schimmel, linux-kernel, Aya Levin

Implement support for devlink traps on per-port basis.
Dropped packets in the RX flow are related to the Ethernet port and
thus should be in port context. Traps per device should trap global
configuration which can cause drops. On top of that, enabling a trap
on a device level should trigger this trap on its siblings ports.
In addition, when devlink traps is enabled, it may cause a degradation
in performance. Hence devlink traps should be regard as a debug mode.
Considering that, it is preferred to encapsulate the debug mode as
much as possible and not to effect all the device.

Patchset:
Patch 1: Refactors devlink trap for easier code re-use in the coming
patches
Patch 2: Adds devlink traps under devlink port context
Patch 3: Adds a relation between traps in device context and traps in
ports context. In a nutshell it allows enable/disable of a trap on
all related ports which registered this trap.
Patch 4: Display a use in devlink traps in port context in mlx5
ethernet driver.

Aya Levin (4):
  devlink: Wrap trap related lists and ops in trap_mngr
  devlink: Add devlink traps under devlink_ports context
  devlink: Add hiererchy between traps in device level and port level
  net/mlx5e: Add devlink trap to catch oversize packets

 drivers/net/ethernet/mellanox/mlx5/core/Makefile   |   2 +-
 drivers/net/ethernet/mellanox/mlx5/core/en.h       |   2 +
 drivers/net/ethernet/mellanox/mlx5/core/en/traps.c |  32 ++
 drivers/net/ethernet/mellanox/mlx5/core/en/traps.h |  13 +
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c  |  41 ++
 drivers/net/ethernet/mellanox/mlx5/core/en_rx.c    |  11 +-
 drivers/net/ethernet/mellanox/mlxsw/core.c         |   5 +
 include/net/devlink.h                              |  84 ++-
 net/core/devlink.c                                 | 616 +++++++++++++++++----
 9 files changed, 665 insertions(+), 141 deletions(-)
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/traps.c
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/traps.h

-- 
2.14.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-09-10  6:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-02 15:32 [PATCH net-next RFC v1 0/4] Add devlink traps in devlink port context Aya Levin
2020-09-02 15:32 ` [PATCH net-next RFC v1 1/4] devlink: Wrap trap related lists and ops in trap_mngr Aya Levin
2020-09-08 14:12   ` Jiri Pirko
2020-09-02 15:32 ` [PATCH net-next RFC v1 2/4] devlink: Add devlink traps under devlink_ports context Aya Levin
2020-09-06 15:44   ` Ido Schimmel
2020-09-07 16:52     ` Aya Levin
2020-09-08 14:04     ` Jiri Pirko
2020-09-10  6:16       ` Aya Levin
2020-09-02 15:32 ` [PATCH net-next RFC v1 3/4] devlink: Add hierarchy between traps in device level and port level Aya Levin
2020-09-06 15:58   ` Ido Schimmel
2020-09-07 16:26     ` Aya Levin
2020-09-02 15:32 ` [PATCH net-next RFC v1 4/4] net/mlx5e: Add devlink trap to catch oversize packets Aya Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).