Closed r12f closed 5 months ago
thanks Kamil and Chris!
LGTM, do you intend to utilize this in some p4 code soon?
yea, this is made to support the port level counter id in the fast path design doc as well as counters in HA. and to avoid the final PR being too large, I split the change into these prerequisite PRs.
I have another one with stats generation, and after that i will send the fast path SAI API one out. Hopefully this can help connects the dots with the recent PRs without any model updates.
Problem
Currently, whenever a counter is used in a control block and not associated to any tables, we won't be able to handle the SAI header generation for it, although we know this counter will be mostly used for tracking the DPU level counts.
What we are doing in this change
This change adds counter id generation support on port level. Whenever the above case happens, a new counter id attribute will be generated on port level.
Take an example - if we add a counter to track total bytes in DASH as below:
![image](https://github.com/sonic-net/DASH/assets/1533278/4bbebb50-feb5-4947-9d0b-e179d3aeaaaf)
The following counter id attribute will be generated:![image](https://github.com/sonic-net/DASH/assets/1533278/441a1723-5040-44c4-becb-e23250a91a41)