]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Add trap entity to ETH driver
authorAya Levin <ayal@nvidia.com>
Tue, 26 Jan 2021 23:24:16 +0000 (15:24 -0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 28 Jan 2021 03:53:53 +0000 (19:53 -0800)
commitb8053a75e960d1912d3239644c5a5008aa45ae37
tree0fd9ed5f2eaf808689db4f2767187d70af5fac21
parent78ecd5703855bd59e9767c7cb6cb307f64bbb4ea
net/mlx5e: Add trap entity to ETH driver

Introduce mlx5e_trap which includes a dedicated RQ and NAPI for trapped
packets. Trap-RQ processes packets that were destined to be dropped,
but for debug and visibility sake these packets are trapped and reported
to devlink.
Trap-RQ connects between the HW and the driver and is not a part of a
channel. Open mlx5e_create_rq() and mlx5_core_destroy_rq() as API and
add dedicate RQ handlers which report to devlink of trapped packets.

Signed-off-by: Aya Levin <ayal@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/Makefile
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en/trap.c [new file with mode: 0644]
drivers/net/ethernet/mellanox/mlx5/core/en/trap.h [new file with mode: 0644]
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
include/linux/mlx5/device.h