OSDN Git Service

net/mlx5e: TC, map tc action cookie to a hw counter
authorOz Shlomo <ozsh@nvidia.com>
Sun, 12 Feb 2023 13:25:19 +0000 (15:25 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 14 Feb 2023 10:00:01 +0000 (11:00 +0100)
commitd13674b1d14c68339173db5dd39c4ab0949234e7
treefa148aa2a40ddad746fa514691fe921ab917412c
parentcca7eac13856e75306bbdefb1673bcd0310d9abc
net/mlx5e: TC, map tc action cookie to a hw counter

Currently a hardware counter is associated with a flow cookie.
This does not apply to flows using branching action which are required to
return per action stats.

A single counter may apply to multiple actions.
Scan the flow actions in reverse (from the last to the first action) while
caching the last counter.
Associate all the flow attribute tc action cookies with the current
cached counter.

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/Makefile
drivers/net/ethernet/mellanox/mlx5/core/en/tc/act_stats.c [new file with mode: 0644]
drivers/net/ethernet/mellanox/mlx5/core/en/tc/act_stats.h [new file with mode: 0644]
drivers/net/ethernet/mellanox/mlx5/core/en_rep.h
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c