Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sai-gen] Add support of generating hit count counters (#531)
## Problem In today's DASH SAI generator, we support 3 type of counters: SAI counter ID, SAI Attributes and SAI stats. Due to the nature of P4 counters, the counters are used as packet counters or byte counters, hence all counters will either have _PACKET or _BYTES suffix. However, we have many counters that doesn't work as packet counters, for example - how many flows is created or deleted. ## What we are doing in this change This change updates the SAI generator to support the counters without suffix. This allows us to support generating hit-count type counters. For example, if we have these counters defined in P4: ![image](https://github.com/sonic-net/DASH/assets/1533278/bd5cd15a-5156-48ea-8199-274642c796eb) The following stats will be generated on the ENI: ![image](https://github.com/sonic-net/DASH/assets/1533278/512a5f0b-ce47-438b-b41b-e340e7adc9b8)
- Loading branch information