From: Aya Levin <ayal@nvidia.com>
To: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Jiri Pirko <jiri@nvidia.com>,
Ido Schimmel <idosch@nvidia.com>, netdev <netdev@vger.kernel.org>
Cc: Moshe Shemesh <moshe@nvidia.com>,
Eran Ben Elisha <eranbe@nvidia.com>,
<linux-kernel@vger.kernel.org>, Aya Levin <ayal@nvidia.com>
Subject: [PATCH net-next RFC v2 repost 0/3] Add devlink traps in
Date: Tue, 22 Sep 2020 14:35:22 +0300 [thread overview]
Message-ID: <1600774525-9461-1-git-send-email-ayal@nvidia.com> (raw)
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 may cause drops. Devlink traps is regard as a
debug mode. Using traps per port enable debug which doesn't effect
other ports on a 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
ports context. In a nutshell it allows enable/disable of a trap on
all related ports which registered this trap.
Patch 3: Display a use in devlink traps in port context in mlx5
ethernet driver.
Changelog:
Minor changes in cover letter
v1->v2:
Patch 1:
-Gather only the traps lists for future code reuse. Don't
try to reuse the traps ops.
Ptach 2:
-Add traps lock in devlink_port
-Add devlink_port ops and in it, add the trap ops
-Add support onlty for traps and exclude groups and policy
-Add separate netlink commands for port trap get and set
-Allow trap registration without a corresponding group
Patch 3: removed
Ptach 4:
-Is now patch 3
-Minor changes in trap's definition
-Adjustments to trap API and ops
Aya Levin (3):
devlink: Wrap trap related lists a trap_lists struct
devlink: Add devlink traps under devlink_ports context
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 | 38 ++
drivers/net/ethernet/mellanox/mlx5/core/en/traps.h | 14 +
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 48 +++
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 11 +-
include/net/devlink.h | 54 ++-
include/uapi/linux/devlink.h | 5 +
net/core/devlink.c | 453 ++++++++++++++++++---
9 files changed, 556 insertions(+), 71 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
next reply other threads:[~2020-09-22 11:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-22 11:35 Aya Levin [this message]
2020-09-22 11:35 ` [PATCH net-next RFC v2 repost 1/3] devlink: Wrap trap related Aya Levin
2020-09-22 11:35 ` [PATCH net-next RFC v2 repost 2/3] devlink: Add devlink traps Aya Levin
2020-09-22 11:35 ` [PATCH net-next RFC v2 repost 3/3] net/mlx5e: Add devlink Aya Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1600774525-9461-1-git-send-email-ayal@nvidia.com \
--to=ayal@nvidia.com \
--cc=davem@davemloft.net \
--cc=eranbe@nvidia.com \
--cc=idosch@nvidia.com \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=moshe@nvidia.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).