net/mlx5e: TC, support per action stats
authorOz Shlomo <ozsh@nvidia.com>
Sun, 12 Feb 2023 13:25:20 +0000 (15:25 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 14 Feb 2023 10:00:01 +0000 (11:00 +0100)
commit2b68d659a704abaa61fb3255776b5483bdc4eb35
tree96f4a2990f970246a9c1cc515fcfa8a0d09f2a72
parentd13674b1d14c68339173db5dd39c4ab0949234e7
net/mlx5e: TC, support per action stats

Extend the action stats callback implementation to update stats for actions
that are associated with hw counters.
Note that the callback may be called from tc action utility or from tc
flower. Both apis expect the driver to return the stats difference from
the last update. As such, query the raw counter value and maintain
the diff from the last api call in the tc layer, instead of the fs_core
layer.

Signed-off-by: Oz Shlomo <ozsh@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.c
drivers/net/ethernet/mellanox/mlx5/core/en/tc/act_stats.c
drivers/net/ethernet/mellanox/mlx5/core/en/tc/act_stats.h
drivers/net/ethernet/mellanox/mlx5/core/en/tc_priv.h
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
drivers/net/ethernet/mellanox/mlx5/core/en_tc.h
drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c
include/linux/mlx5/fs.h