net/mlx5: use aging by counter when counter exists
The driver support 2 mechanisms in order to support AGE action:
1. Aging by counter - HW counter will be configured to the flow traffic,
the driver polls the counter values efficiently to detect flow timeout.
2. Aging by ASO flow hit bit - HW ASO flow-hit bit is allocated for the
flow, the driver polls the bit efficiently to detect flow timeout.
ASO bit is only single bit resource while counter is 16 bytes, hence, it
is better to use ASO instead of counter for aging.
When a non-shared COUNT action is also configured to the flow, the
driver can use the same counter also for AGE action and no need to
create more ASO action for it.
The current code always uses ASO when it is supported in the device,
change it to reuse the non-shared counter if it exists in the flow.
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>