Skip to content

[DPU] Add support for HA Set Counters#8

Closed
croos12 wants to merge 3 commits intomasterfrom
bulk-sync-counters
Closed

[DPU] Add support for HA Set Counters#8
croos12 wants to merge 3 commits intomasterfrom
bulk-sync-counters

Conversation

@croos12
Copy link
Owner

@croos12 croos12 commented Feb 6, 2026

What I did

  1. Add support for DASH HA Set Counters
  2. Updated the FlexCounter Yang model

Adds support for ha-set counters. Adds a dashhacounter class that inherits from dashcounter for displaying counters defined in _sai_ha_set_stat_t. Also refactored the existing code to keep the same level of access to dashcounter methods by moving it to its own files.

Why I did it

How I verified it

root@sonic:/home/admin# sonic-db-cli FLEX_COUNTER_DB HGETALL FLEX_COUNTER_GROUP_TABLE:HA_SET_STAT_COUNTER
{'POLL_INTERVAL': '10000', 'STATS_MODE': 'STATS_MODE_READ', 'FLEX_COUNTER_STATUS': 'enable'}
root@sonic:/home/admin# sonic-db-cli COUNTERS_DB HGETALL COUNTERS_HA_SET_NAME_MAP
{'haset0_0': 'oid:0x1100800000001e'}

In sairedis.rec
2026-02-18.16:39:42.679404|c|SAI_OBJECT_TYPE_HA_SET:oid:0x1100800000001e|SAI_HA_SET_ATTR_LOCAL_IP=20.0.200.3|SAI_HA_SET_ATTR_PEER_IP=20.0.201.3|SAI_HA_SET_ATTR_CP_DATA_CHANNEL_PORT=6000|SAI_HA_SET_ATTR_DP_CHANNEL_DST_PORT=7000|SAI_HA_SET_ATTR_DP_CHANNEL_MIN_SRC_PORT=7001|SAI_HA_SET_ATTR_DP_CHANNEL_MAX_SRC_PORT=7010|SAI_HA_SET_ATTR_DP_CHANNEL_PROBE_INTERVAL_MS=500|SAI_HA_SET_ATTR_DP_CHANNEL_PROBE_FAIL_THRESHOLD=5
2026-02-18.16:39:42.683256|p|HA_SET_STAT_COUNTER:oid:0x1100800000001e|HA_SET_COUNTER_ID_LIST=SAI_HA_SET_STAT_BULK_SYNC_FLOW_RECEIVED,SAI_HA_SET_STAT_BULK_SYNC_MESSAGE_SENT,SAI_HA_SET_STAT_BULK_SYNC_MESSAGE_RECEIVED,SAI_HA_SET_STAT_CP_DATA_CHANNEL_CONNECT_REJECTED,SAI_HA_SET_STAT_DP_PROBE_REQ_RX_BYTES,SAI_HA_SET_STAT_BULK_SYNC_FLOW_SENT,SAI_HA_SET_STAT_DP_PROBE_REQ_TX_BYTES,SAI_HA_SET_STAT_DP_PROBE_REQ_RX_PACKETS,SAI_HA_SET_STAT_DP_PROBE_ACK_RX_PACKETS,SAI_HA_SET_STAT_DP_PROBE_REQ_TX_PACKETS,SAI_HA_SET_STAT_BULK_SYNC_MESSAGE_SEND_FAILED,SAI_HA_SET_STAT_DP_PROBE_ACK_TX_PACKETS,SAI_HA_SET_STAT_DP_PROBE_ACK_TX_BYTES,SAI_HA_SET_STAT_DP_PROBE_ACK_RX_BYTES,SAI_HA_SET_STAT_CP_DATA_CHANNEL_CONNECT_RECEIVED,SAI_HA_SET_STAT_DP_PROBE_FAILED,SAI_HA_SET_STAT_CP_DATA_CHANNEL_CONNECT_ATTEMPTED,SAI_HA_SET_STAT_CP_DATA_CHANNEL_CONNECT_SUCCEEDED,SAI_HA_SET_STAT_CP_DATA_CHANNEL_TIMEOUT_COUNT,SAI_HA_SET_STAT_CP_DATA_CHANNEL_CONNECT_FAILED

Tested branch (Please provide the tested image version)

  • 202511

Description for the changelog

[DPU] Add support for HA Set Counters

@croos12 croos12 changed the title Bulk sync counters Ha set counters Feb 9, 2026
@vivekrnv
Copy link

Check the extra commit, other wise LGTM

@vivekrnv
Copy link

NIT.
Please have a descriptive title, something like "[DPU] Add support for HA Set Counters"

@croos12 croos12 changed the title Ha set counters [DPU] Add support for HA Set Counters Feb 18, 2026
@croos12 croos12 closed this Feb 18, 2026
croos12 pushed a commit that referenced this pull request Mar 19, 2026
…net#25643)

* [build] Add build timing report and dependency analysis tools

Add three scripts for build performance instrumentation:

- scripts/build-timing-report.sh: Parse per-package timing from build
  logs (HEADER/FOOTER timestamps), generate sorted duration table,
  phase breakdown, parallelism timeline, and CSV export.

- scripts/build-dep-graph.py: Parse rules/*.mk dependency graph,
  compute critical path, fan-out/fan-in bottleneck analysis, and
  generate DOT/JSON output for visualization.

- scripts/build-resource-monitor.sh: Sample CPU, memory, disk I/O,
  and Docker container count during builds for resource utilization
  analysis.

Add "make build-report" target to slave.mk that runs the timing
report and dependency analysis after a build completes.

Example output from a VS build on 24-core/30GB machine:
- 210 packages built in 53m wall time (173m CPU)
- Max concurrency: 5 (with SONIC_CONFIG_BUILD_JOBS=4)
- Critical path: 14 packages deep (libnl -> libswsscommon -> utilities)
- Top bottleneck: LIBSWSSCOMMON with 48 downstream dependents

Signed-off-by: Rustiqly <[email protected]>

* Address Copilot review: fix 17 bugs in build analysis scripts

- Use free -m with division instead of free -g to avoid rounding (#1)
- Add = and ?= to Makefile dependency regex patterns (#2, #7)
- CPU calculation now uses /proc/stat delta (two reads) (#3, sonic-net#14)
- Fix misleading 'critical path estimate' comment (#4)
- Fix parallelism timeline comment (60s not 10s) (#5)
- Include after-relationship packages in fan stats (#6)
- Guard disk I/O division by zero when INTERVAL<=1 (#8)
- Remove unused elapsed_line variable (#9)
- Remove redundant LIBSWSSCOMMON_DBG check (#10)
- Remove active_make_jobs from CSV header comment (#11)
- Wire up _RDEPENDS parsing to build reverse deps (#12)
- Remove unnecessary 'if v' filter on rdeps JSON (#13)
- Remove unused REPORT_FORMAT parameter (sonic-net#15)
- Add cycle detection to critical path algorithm (sonic-net#16)
- Add execute permission check for companion scripts (sonic-net#17)

Signed-off-by: Rustiqly <[email protected]>

---------

Signed-off-by: Rustiqly <[email protected]>
Co-authored-by: Rustiqly <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants