Skip to content

Update yang model with new port tx error monitor#1

Open
Natgerbi wants to merge 1 commit into
masterfrom
ngerbi/tx_err_monitor
Open

Update yang model with new port tx error monitor#1
Natgerbi wants to merge 1 commit into
masterfrom
ngerbi/tx_err_monitor

Conversation

@Natgerbi
Copy link
Copy Markdown
Owner

@Natgerbi Natgerbi commented Feb 24, 2026

Why I did it
Add a YANG model for the new PORT_TX_ERR_MONITOR table in config_db to support configuration validation for the port TX error monitoring feature. This feature monitors per-port TX error counters and allows operators to configure a threshold, evaluation time window, and enable/disable the monitor.
Work item tracking
Microsoft ADO (number only):
How I did it
Created a new YANG module sonic-port-tx-err-monitor.yang defining the PORT_TX_ERR_MONITOR container with a single CONFIG entry containing:
threshold (uint64, min 1) — maximum acceptable TX error delta within the evaluation window
window_sec (uint32, 1–86400) — evaluation time window in seconds
enabled (enum: enabled/disabled) — toggle for the monitor
Registered the new YANG file in setup.py
Added PORT_TX_ERR_MONITOR sample data to sample_config_db.json for YANG validation tests
How to verify it
Run YANG model validation tests: cd src/sonic-yang-models && python -m pytest tests/
Verify that a config_db entry with valid PORT_TX_ERR_MONITOR values passes validation
Verify that invalid values (e.g., threshold=0, window_sec=0, window_sec>86400) are rejected
Which release branch to backport (provide reason below if selected)
[ ] 202305
[ ] 202311
[ ] 202405
[ ] 202411
[ ] 202505
[ ] 202511
Tested branch (Please provide the tested image version)
[ ]
[ ]
Description for the changelog
Add YANG model for PORT_TX_ERR_MONITOR table to validate port TX error monitoring configuration in config_db.
Link to config_db schema for YANG module changes

@Natgerbi Natgerbi force-pushed the ngerbi/tx_err_monitor branch from 28d9809 to 780475e Compare February 25, 2026 09:19
Natgerbi 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 <rustiqly@users.noreply.github.com>

* 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 (sonic-net#2, sonic-net#7)
- CPU calculation now uses /proc/stat delta (two reads) (sonic-net#3, sonic-net#14)
- Fix misleading 'critical path estimate' comment (sonic-net#4)
- Fix parallelism timeline comment (60s not 10s) (sonic-net#5)
- Include after-relationship packages in fan stats (sonic-net#6)
- Guard disk I/O division by zero when INTERVAL<=1 (sonic-net#8)
- Remove unused elapsed_line variable (sonic-net#9)
- Remove redundant LIBSWSSCOMMON_DBG check (sonic-net#10)
- Remove active_make_jobs from CSV header comment (sonic-net#11)
- Wire up _RDEPENDS parsing to build reverse deps (sonic-net#12)
- Remove unnecessary 'if v' filter on rdeps JSON (sonic-net#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 <rustiqly@users.noreply.github.com>

---------

Signed-off-by: Rustiqly <rustiqly@users.noreply.github.com>
Co-authored-by: Rustiqly <rustiqly@users.noreply.github.com>
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.

1 participant