net/mlx5: Bridge, expose FDB state via debugfs
authorVlad Buslov <vladbu@nvidia.com>
Thu, 25 May 2023 13:19:00 +0000 (15:19 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 16 Jun 2023 19:02:07 +0000 (12:02 -0700)
commit791eb78285e8b81bc09bfc6bd928b981eaefb082
treee279cbb7aa12fb4cbcee4fbd4c02f217b5af87e2
parentade19f0d6a3a395e7936227811acbf897ee186fc
net/mlx5: Bridge, expose FDB state via debugfs

For debugging purposes expose offloaded FDB state (flags, counters, etc.)
via debugfs inside 'esw' root directory. Example debugfs file output:

$ cat mlx5/0000\:08\:00.0/esw/bridge/bridge1/fdb
DEV              MAC               VLAN              PACKETS                BYTES              LASTUSE FLAGS
enp8s0f0_1       e4:0a:05:08:00:06    2                    2                  204           4295567112   0x0
enp8s0f0_0       e4:0a:05:08:00:03    2                    3                  278           4295567112   0x0

Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Gal Pressman <gal@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/Makefile
drivers/net/ethernet/mellanox/mlx5/core/esw/bridge.c
drivers/net/ethernet/mellanox/mlx5/core/esw/bridge.h
drivers/net/ethernet/mellanox/mlx5/core/esw/bridge_debugfs.c [new file with mode: 0644]
drivers/net/ethernet/mellanox/mlx5/core/esw/bridge_priv.h