]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net/mlx5e: Add PSP stats support for Rx/Tx flows
authorJakub Kicinski <kuba@kernel.org>
Thu, 6 Nov 2025 00:26:05 +0000 (16:26 -0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 8 Nov 2025 02:53:57 +0000 (18:53 -0800)
commitb1346219e5350990ab36cdf8d1b302c1b53fc21a
treecdcc41ce1b14f2588070d430c6f9b4666f92a580
parentf05d26198cf2c71f25f6bbe62ca4481c15543922
net/mlx5e: Add PSP stats support for Rx/Tx flows

Add all statistics described under the "Implementation Requirements"
section of the PSP Architecture Specification:

Rx successfully decrypted PSP packets:
psp_rx_pkts  : Number of packets decrypted successfully
psp_rx_bytes : Number of bytes decrypted successfully

Rx PSP authentication failure statistics:
psp_rx_pkts_auth_fail  : Number of PSP packets that failed authentication
psp_rx_bytes_auth_fail : Number of PSP bytes that failed authentication

Rx PSP bad frame error statistics:
psp_rx_pkts_frame_err;
psp_rx_bytes_frame_err;

Rx PSP drop statistics:
psp_rx_pkts_drop  : Number of PSP packets dropped
psp_rx_bytes_drop : Number of PSP bytes dropped

Tx successfully encrypted PSP packets:
psp_tx_pkts  : Number of packets encrypted successfully
psp_tx_bytes : Number of bytes encrypted successfully

Tx drops:
tx_drop : Number of misc psp related drops

The above can be seen using the ynl cli:
./pyynl/cli.py  --spec netlink/specs/psp.yaml --dump get-stats

Signed-off-by: Raed Salem <raeds@nvidia.com>
Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Signed-off-by: Daniel Zahka <daniel.zahka@gmail.com>
Link: https://patch.msgid.link/20251106002608.1578518-5-daniel.zahka@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/psp.c
drivers/net/ethernet/mellanox/mlx5/core/en_accel/psp.h
drivers/net/ethernet/mellanox/mlx5/core/en_accel/psp_rxtx.c
drivers/net/ethernet/mellanox/mlx5/core/en_main.c