-
Notifications
You must be signed in to change notification settings - Fork 115
feat: Add Advanced Network Media operators and applications for SMPTE 2110 compliant streaming #970
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@grlee77 if/when you have any BW, this link would help reviewing just the proper commits, as this is based on #813 : ronyrad/holohub@ano_rivermax_update_mar_25/adv_network_rivermax_manager_update_pr_candidate_01...ronyrad:holohub:ano_rivermax_update_mar_25/adv_network_media_operators_dev_01 |
|
Hi @ronyrad, could you please resolve the conflicts for this PR and update it with the latest changes on |
69f2586 to
ee4c2f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Greptile Summary
This PR adds comprehensive media streaming capabilities to Holoscan Holohub with two new operators (AdvNetworkMediaRxOp and AdvNetworkMediaTxOp) and sample applications demonstrating SMPTE 2110-compliant streaming over Rivermax.
Key Changes (Last 3 Commits):
-
Adaptive Burst Pool Management (commit 9b8c5e9): Implements intelligent burst dropping system with configurable thresholds (25% warning, 10% critical, 50% recovery) to prevent memory pool exhaustion during high-throughput operations. The system enters critical dropping mode when pool capacity falls below 10%, drops new bursts to preserve system stability, and exits dropping mode when capacity recovers to 50%.
-
Lint Fixes (commit 7b68d26): Code style and formatting improvements
-
Dockerfile Update (commit ee4c2f0): Build configuration updates
New Operators:
AdvNetworkMediaRxOp: Receives SMPTE 2110 streams, converts packets to frames, outputs as VideoBuffer or Tensor entitiesAdvNetworkMediaTxOp: Transmits VideoBuffer/Tensor frames over Rivermax with congestion detection
Sample Applications:
adv_networking_media_player: Demonstrates reception with visualization (HolovizOp) or file output (FramesWriter)adv_networking_media_sender: Demonstrates transmission from VideoStreamReplayer
Architecture Quality:
The implementation follows solid software engineering practices with clear separation of concerns (frame assembly, burst processing, memory management), comprehensive error handling, and extensive logging for diagnostics.
Confidence Score: 5/5
- This PR is safe to merge with well-designed architecture and comprehensive implementation
- The implementation demonstrates excellent software engineering practices with proper memory management, thread safety via mutexes and atomics, configurable adaptive burst dropping to prevent exhaustion, comprehensive error handling throughout the pipeline, clear separation of concerns with dedicated classes for frame assembly and burst processing, and extensive diagnostic logging. The adaptive burst pool management addresses a critical production concern (memory exhaustion under high load) with a well-thought-out state machine approach.
- No files require special attention - all implementations follow best practices
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp | 5/5 | Implements adaptive burst pool management with configurable thresholds (25%/10%/50%) for warning/critical/recovery levels to prevent memory exhaustion |
| operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.h | 5/5 | Adds pool capacity monitoring methods, adaptive dropping configuration, and statistics tracking for burst management |
| operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.cpp | 5/5 | New media RX operator handling SMPTE 2110 packet-to-frame assembly with support for VideoBuffer/Tensor outputs and configurable memory locations |
| operators/advanced_network_media/advanced_network_media_tx/adv_network_media_tx.cpp | 5/5 | New media TX operator for transmitting VideoBuffer/Tensor frames over Rivermax with congestion detection and frame dropping |
| applications/adv_networking_media_player/cpp/adv_networking_media_player.cpp | 5/5 | Sample application demonstrating media reception pipeline with AdvNetworkMediaRxOp → HolovizOp/FramesWriter for visualization or file output |
| operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_config_manager.cpp | 5/5 | Adds YAML parsing for burst_pool_adaptive_dropping configuration with validation and default values |
| operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_mgr_service.cpp | 5/5 | Applies burst pool configuration from YAML to RX services (IPO and RTP receivers) during service initialization |
Sequence Diagram
sequenceDiagram
participant App as Application
participant TxOp as AdvNetworkMediaTxOp
participant TxMgr as Rivermax TX Manager
participant Network as Network Interface
participant RxMgr as Rivermax RX Manager
participant BurstMgr as RxBurstsManager
participant RxOp as AdvNetworkMediaRxOp
participant Assembler as MediaFrameAssembler
participant Viz as HolovizOp/FramesWriter
Note over App,TxOp: Sender Pipeline
App->>TxOp: VideoBuffer/Tensor frame
TxOp->>TxOp: validate_frame_parameters()
TxOp->>TxMgr: create_tx_burst_params()
TxMgr-->>TxOp: burst params
TxOp->>TxOp: is_tx_burst_available()
alt Burst Available
TxOp->>TxMgr: get_tx_packet_burst()
TxOp->>TxMgr: send_tx_burst()
TxMgr->>Network: transmit packets
else Burst Not Available
TxOp->>TxOp: sleep & retry (congestion)
end
Note over Network,RxMgr: Network Layer
Network->>RxMgr: receive packets burst
RxMgr->>BurstMgr: submit_next_packet()
alt Adaptive Dropping Check
BurstMgr->>BurstMgr: should_drop_burst_due_to_capacity()
BurstMgr->>BurstMgr: get_pool_utilization_percent()
alt Pool < 10% Critical
BurstMgr->>BurstMgr: enter critical dropping mode
BurstMgr->>BurstMgr: drop burst (return to pool)
else Pool >= 50% Recovery
BurstMgr->>BurstMgr: exit critical dropping mode
BurstMgr->>RxOp: enqueue burst to output queue
end
end
Note over RxOp,Viz: Receiver Pipeline
RxOp->>BurstMgr: get_rx_burst()
BurstMgr-->>RxOp: burst params
RxOp->>Assembler: process_burst()
Assembler->>Assembler: extract RTP packets
Assembler->>Assembler: assemble frame from packets
alt Frame Complete
Assembler->>RxOp: on_frame_completed()
RxOp->>RxOp: add to ready_frames queue
RxOp->>BurstMgr: free_all_packets_and_burst_rx()
alt Multiple Frames Ready
RxOp->>RxOp: drop older frames (keep latest)
end
RxOp->>Viz: emit VideoBuffer/Tensor entity
Viz->>Viz: visualize or write to file
end
62 files reviewed, no comments
ee4c2f0 to
b9582c5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Greptile Summary
This PR focuses on the last 3 commits which implement adaptive burst pool management for the Rivermax advanced networking infrastructure:
Key Changes
Commit 4b974e3 - Adaptive burst pool management implementation:
- Added configurable threshold-based burst dropping to prevent memory pool exhaustion
- Three-tier threshold system: low capacity warning (25%), critical capacity dropping (10%), and recovery (50%)
- Statistics tracking for dropped bursts, capacity warnings, and critical events
- Hysteresis-based state machine to prevent oscillation between dropping/accepting modes
Commit f2c3564 - Lint fixes:
- Reformatted single-line conditionals to multi-line blocks for consistency
- Fixed line wrapping and indentation issues
Commit b9582c5 - Dockerfile updates:
- Added Python Holoscan package installation for test/development workflows
- Added visualization dependencies (libvulkan1, xvfb, x11vnc) for headless rendering
Issues Found
- Logic error in burst_manager.cpp:490-510 and 514-532: Drop statistics counters are incremented before
should_drop_burst_adaptive()determines whether to actually drop the burst, leading to inflated statistics when bursts are not dropped
Confidence Score: 4/5
- Safe to merge with the statistics counter bug fixed
- The adaptive burst pool management feature is well-designed with proper configuration plumbing through all layers. However, there's a logic error in statistics tracking where counters are incremented before the drop decision, causing inaccurate metrics. This won't affect functionality but will mislead monitoring. The lint fixes and Dockerfile updates are safe.
- operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp requires fixing the statistics counter logic
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.h | 5/5 | Added adaptive burst pool management infrastructure with configurable thresholds - well-designed API |
| operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp | 3/5 | Implements adaptive burst dropping logic; statistics counters are incremented before drop decision is made, leading to inaccurate statistics |
| operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_config_manager.cpp | 5/5 | Added parsing for burst pool adaptive dropping configuration from YAML with sensible defaults - implementation looks correct |
| operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_mgr_service.cpp | 5/5 | Implements burst pool configuration application to burst managers in both IPO and RTP receiver services - correct implementation |
Sequence Diagram
sequenceDiagram
participant Config as YAML Config
participant Parser as RivermaxConfigParser
participant Builder as RXQueueBuilder
participant Service as RivermaxManagerRxService
participant Manager as RxBurstsManager
participant Pool as AnoBurstsMemoryPool
Note over Config,Manager: Configuration Phase
Config->>Parser: Parse burst_pool_adaptive_dropping settings
Parser->>Builder: Store thresholds in builder
Builder->>Service: Create service with config
Service->>Service: apply_burst_pool_configuration()
Service->>Manager: configure_pool_thresholds()
Service->>Manager: set_adaptive_burst_dropping(enabled)
Note over Manager,Pool: Runtime Burst Processing
Manager->>Manager: submit_next_packet()
Manager->>Manager: enqueue_and_reset_current_burst()
Manager->>Manager: should_drop_burst_due_to_capacity()
Manager->>Pool: get_pool_utilization_percent()
Pool-->>Manager: utilization %
alt utilization < critical_threshold
Manager->>Manager: should_drop_burst_adaptive()
Manager->>Manager: Enter critical dropping mode
Manager->>Manager: Drop burst (return to pool)
Manager->>Manager: Increment drop counters
else utilization < low_threshold
Manager->>Manager: should_drop_burst_adaptive()
Manager->>Manager: Check dropping policy
alt Should drop based on policy
Manager->>Manager: Drop burst
else Continue normal operation
Manager->>Manager: Enqueue burst to output queue
end
else utilization >= recovery_threshold
Manager->>Manager: Exit critical dropping mode
Manager->>Manager: Enqueue burst to output queue
end
62 files reviewed, 2 comments
...tors/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp
Outdated
Show resolved
Hide resolved
...tors/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp
Outdated
Show resolved
Hide resolved
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdds two Holohub applications (media player and sender), a new advanced_network_media operator suite (common, RX, TX) with C++ and Python implementations, extensive frame-assembly and memory-copy subsystems, Rivermax burst-pool adaptive-dropping integration, configs, docs, metadata, and CMake build updates. (49 words) Changes
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes
Possibly related PRs
Suggested reviewers
Pre-merge checks✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
b9582c5 to
d9adc8f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Greptile Summary
This PR implements adaptive burst pool management with configurable capacity thresholds for the Rivermax advanced network manager. The changes add monitoring and adaptive dropping capabilities to prevent memory pool exhaustion during high network load.
Key Changes
- Adaptive Burst Dropping: Implements a
CRITICAL_THRESHOLDpolicy that drops incoming bursts when memory pool capacity falls below critical levels and stops dropping when capacity recovers - Configurable Thresholds: Adds YAML configuration for
low_threshold_percent(25%),critical_threshold_percent(10%), andrecovery_threshold_percent(50%) - Statistics Tracking: Comprehensive monitoring with atomic counters for dropped bursts, capacity warnings, and critical events
- Configuration Propagation: Wires configuration from YAML → Parser → Builder → Service → BurstManager
- Dockerfile Updates: Adds Holoscan pip package and visualization libraries (Vulkan, Xvfb, x11vnc) for headless rendering
Issues Found
The implementation has a critical logic error in burst_manager.cpp:490-510 where drop statistics counters are incremented BEFORE the actual drop decision is made. This inflates the drop counters even when bursts are not actually dropped, making statistics unreliable for monitoring and debugging.
Confidence Score: 2/5
- This PR should NOT be merged until the counter logic bug is fixed - incorrect statistics will make production debugging extremely difficult
- Score reflects critical logic error in burst dropping statistics that inflates drop counters incorrectly. While the overall architecture and configuration plumbing are sound, the bug in the core adaptive dropping logic will make the feature unreliable in production. The statistics are meant to inform operators about system behavior under load, but they will be misleading.
- operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp requires immediate attention - the counter increment logic must be fixed before merge
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp | 2/5 | Implements adaptive burst pool management with configurable thresholds. Contains logic error where drop counters are incremented before actual drop decision, inflating statistics incorrectly. |
| operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.h | 4/5 | Adds burst pool monitoring infrastructure with thresholds, statistics tracking, and adaptive dropping policies. Clean interface design with proper documentation. |
| operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_config_manager.cpp | 5/5 | Adds YAML parsing for burst pool adaptive dropping configuration with proper defaults and logging. Mostly formatting/lint fixes otherwise. |
| operators/advanced_network/Dockerfile | 5/5 | Adds Holoscan pip package, fixes permissions for dist-info, and adds visualization libraries (Vulkan, Xvfb, x11vnc) for headless rendering support. |
Sequence Diagram
sequenceDiagram
participant Config as YAML Config
participant Parser as RivermaxConfigParser
participant Builder as QueueConfigBuilder
participant Service as RxService
participant Manager as RxBurstsManager
participant Pool as AnoBurstsMemoryPool
Config->>Parser: Parse burst_pool_adaptive_dropping config
Parser->>Builder: Set thresholds (low/critical/recovery %)
Builder->>Service: Copy configuration to service
Service->>Manager: apply_burst_pool_configuration()
Manager->>Manager: configure_pool_thresholds()
Manager->>Manager: set_adaptive_burst_dropping(enabled)
Note over Manager,Pool: Runtime Burst Processing
Manager->>Manager: should_drop_burst_due_to_capacity()
Manager->>Pool: get_pool_utilization_percent()
Pool-->>Manager: utilization %
alt Utilization < critical_threshold
Manager->>Manager: Increment counters (bursts_dropped_critical_capacity)
Manager->>Manager: should_drop_burst_adaptive(utilization)
alt in_critical_dropping_mode OR utilization < critical
Manager->>Manager: Enter/stay in critical mode
Manager-->>Service: return true (drop burst)
else utilization >= recovery_threshold
Manager->>Manager: Exit critical mode
Manager-->>Service: return false (keep burst)
end
else Utilization < low_threshold
Manager->>Manager: Increment counters (bursts_dropped_low_capacity)
Manager->>Manager: should_drop_burst_adaptive(utilization)
Manager-->>Service: return drop decision
else Utilization >= low_threshold
Manager-->>Service: return false (keep burst)
end
62 files reviewed, 2 comments
...tors/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp
Outdated
Show resolved
Hide resolved
...tors/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp
Outdated
Show resolved
Hide resolved
d6a01c2 to
9e9a0fd
Compare
|
Caution Review failedFailed to post review comments WalkthroughThis PR introduces two new advanced networking media applications (player and sender) with corresponding RX/TX operators. It adds comprehensive frame assembly, memory copy strategy detection, RTP packet processing, and adaptive burst pool management for high-performance network media streaming. The PR enhances the existing Rivermax manager with burst pool capacity monitoring and adaptive dropping policies. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Areas requiring extra attention:
Possibly related PRs
Suggested reviewers
Pre-merge checks✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Greptile Summary
This PR introduces advanced network media operators and sample applications for SMPTE 2110 compliant streaming using Rivermax. The implementation provides a clean abstraction for media streaming over high-performance network infrastructure.
Key Components Added:
AdvNetworkMediaRxOp: Receives media frames from network, handles burst-to-frame conversion with adaptive memory copy strategiesAdvNetworkMediaTxOp: Transmits VideoBuffer/Tensor frames over network with validation and error handling- Sample applications demonstrating both sender and receiver pipelines with visualization and file output options
- Python bindings for both operators enabling dual-language support
Architecture Strengths:
- Well-structured frame assembly logic with state machine pattern for RX path
- Comprehensive error handling and validation throughout
- Flexible output formats (VideoBuffer/Tensor) and memory locations (host/device)
- Clean separation of concerns between operators, frame buffers, and network management
Note on Last 3 Commits:
The last 3 commits focus on burst pool management enhancements in the advanced_network module. Previous comments have identified counter increment issues in burst_manager.cpp:490 and burst_manager.cpp:514 where statistics are incremented before the actual drop decision is made.
Confidence Score: 4/5
- This PR is safe to merge with addressing the burst manager counter logic issues already identified in previous comments
- Score of 4 reflects well-structured operators and applications with comprehensive error handling. The deduction is due to the pre-existing counter increment logic issues in burst_manager.cpp (lines 490, 514) where statistics are incremented before drop decisions are finalized, which was already flagged in previous comments. The new media operators themselves are well-implemented.
- operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp - Address counter increment timing issues at lines 490 and 514
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.cpp | 4/5 | RX operator implementation with frame assembly logic, burst processing, and statistics tracking. Generally well-structured with comprehensive error handling. |
| operators/advanced_network_media/advanced_network_media_tx/adv_network_media_tx.cpp | 5/5 | TX operator implementation handling VideoBuffer and Tensor inputs with frame validation. Clean implementation with proper error handling. |
| applications/adv_networking_media_player/cpp/adv_networking_media_player.cpp | 5/5 | Media player application demonstrating RX operator usage with visualization and file output options. Well-structured with proper initialization and cleanup. |
| applications/adv_networking_media_sender/cpp/adv_networking_media_sender.cpp | 5/5 | Media sender application demonstrating TX operator usage with video stream replay. Clean and straightforward implementation. |
| operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp | 3/5 | Burst pool management with adaptive burst dropping. Contains logic issues with counter increments happening before drop decisions (see existing comments). |
Sequence Diagram
sequenceDiagram
participant App as Media Sender App
participant Replayer as VideoStreamReplayer
participant TxOp as AdvNetworkMediaTxOp
participant ANM as Advanced Network Manager
participant RDK as Rivermax SDK
participant NIC as Network Interface
App->>Replayer: Start playback
Replayer->>TxOp: VideoBuffer/Tensor Entity
TxOp->>TxOp: Validate frame parameters
TxOp->>TxOp: Create MediaFrame wrapper
TxOp->>ANM: create_tx_burst_params()
TxOp->>ANM: is_tx_burst_available()
alt Burst Available
TxOp->>ANM: get_tx_packet_burst()
TxOp->>ANM: Attach MediaFrame via custom_pkt_data
TxOp->>ANM: send_tx_burst()
ANM->>RDK: MediaSender service processing
RDK->>RDK: RTP packetization (SMPTE 2110)
RDK->>NIC: DMA transfer to hardware queues
NIC->>NIC: Network transmission
else Burst Not Available
TxOp->>TxOp: Sleep and retry
end
participant Net as Network
participant RxNIC as RX Network Interface
participant RxRDK as RX Rivermax SDK
participant RxANM as RX Advanced Network Manager
participant RxOp as AdvNetworkMediaRxOp
participant Assembler as MediaFrameAssembler
participant PlayerApp as Media Player App
participant Holoviz as HolovizOp
Net->>RxNIC: Incoming packets
RxNIC->>RxRDK: DMA to memory regions
RxRDK->>RxANM: Burst assembly (packet pointers)
RxANM->>RxOp: get_rx_burst()
RxOp->>Assembler: process_burst()
Assembler->>Assembler: State machine processing
Assembler->>Assembler: Memory copy strategy selection
alt Frame Complete
Assembler->>RxOp: on_frame_completed()
RxOp->>RxOp: Add to ready_frames queue
RxOp->>RxANM: free_all_packets_and_burst_rx()
RxOp->>PlayerApp: Emit VideoBuffer/Tensor Entity
alt Visualization Mode
PlayerApp->>Holoviz: Display frame
else File Output Mode
PlayerApp->>PlayerApp: Write to file
end
end
62 files reviewed, no comments
9e9a0fd to
41d332b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Greptile Summary
This PR's last 3 commits focus on implementing adaptive burst pool management for the Rivermax network manager, along with Dockerfile updates and code formatting improvements.
Key Changes:
- Adaptive Burst Dropping: Introduces configurable threshold-based burst dropping to handle memory pool pressure with three levels (critical, low, recovery)
- Pool Capacity Monitoring: Adds comprehensive statistics tracking and periodic logging for burst pool utilization
- Dockerfile Enhancements: Installs Holoscan Python package and visualization dependencies (libvulkan1, xvfb, x11vnc) to support the new media player applications
- Code Quality: Applies consistent formatting and linting fixes across Rivermax implementation files
Critical Issue Found:
The should_drop_burst_due_to_capacity() function in burst_manager.cpp:490-533 has a logic error where drop counters are incremented before the actual drop decision is made by should_drop_burst_adaptive(). When the system is in the recovery range (utilization between critical and recovery thresholds), should_drop_burst_adaptive() returns false but the counters have already been incremented, leading to inflated drop statistics.
Confidence Score: 2/5
- This PR contains a critical logic bug in burst dropping statistics that will cause incorrect monitoring and metrics
- The adaptive burst pool management implementation has a fundamental flaw where counters are incremented before the actual drop decision. This affects both critical and low capacity paths. While the feature itself is well-structured with good logging and configuration, the incorrect statistics will mislead operators about system behavior and make debugging difficult. The bug needs to be fixed before merge.
- Pay close attention to
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpplines 490-533 where the counter increment logic needs to be moved after the drop decision
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| operators/advanced_network/Dockerfile | 5/5 | Added Holoscan Python package installation and visualization dependencies (libvulkan1, xvfb, x11vnc) for media player application support |
| operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp | 2/5 | Implements adaptive burst pool management with configurable thresholds. Contains critical logic error where drop counters are incremented before determining if burst should actually be dropped. |
| operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.h | 4/5 | Adds new member variables and methods for adaptive burst dropping with pool capacity monitoring |
| operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_mgr_service.cpp | 4/5 | Integrates adaptive burst dropping into the receive flow with capacity checks |
Sequence Diagram
sequenceDiagram
participant App as Application
participant RxMgr as RxBurstsManager
participant Pool as AnoBurstsMemoryPool
participant Assembler as MediaFrameAssembler
participant Op as AdvNetworkMediaRxOp
participant Holoviz as HolovizOp/FramesWriter
Note over RxMgr,Pool: Initialization Phase
App->>RxMgr: Initialize with pool size
RxMgr->>Pool: Create burst pool (DEFAULT_NUM_RX_BURSTS)
RxMgr->>RxMgr: Initialize adaptive dropping thresholds
Note over RxMgr,Assembler: Reception & Processing Loop
RxMgr->>RxMgr: Check pool utilization
alt Utilization < Critical Threshold
RxMgr->>RxMgr: Increment drop counters
RxMgr->>RxMgr: should_drop_burst_adaptive()
alt Should Drop
RxMgr-->>RxMgr: Drop burst
else Should Not Drop (Recovery Range)
Note right of RxMgr: BUG: Counters already incremented!
RxMgr->>Pool: Dequeue burst from pool
end
else Utilization < Low Threshold
RxMgr->>RxMgr: Increment drop counters
RxMgr->>RxMgr: should_drop_burst_adaptive()
alt Should Drop
RxMgr-->>RxMgr: Drop burst
else Should Not Drop
Note right of RxMgr: BUG: Counters already incremented!
RxMgr->>Pool: Dequeue burst from pool
end
else Healthy Capacity
RxMgr->>Pool: Dequeue burst from pool
end
Pool-->>RxMgr: Return burst
RxMgr->>Assembler: Process network burst
Assembler->>Assembler: Convert packets to frame data
Assembler->>Op: on_frame_completed callback
Op->>Op: Emit VideoBuffer or Tensor
Op->>Holoviz: Send frame for visualization/writing
Holoviz->>Holoviz: Display or write to file
Note over RxMgr,Pool: Cleanup Phase
Op->>RxMgr: Return processed burst
RxMgr->>Pool: Enqueue burst back to pool
62 files reviewed, no comments
41d332b to
599f8ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Greptile Summary
Implements adaptive burst pool management for Rivermax network operations with configurable capacity thresholds. The feature monitors memory pool utilization and drops bursts when capacity falls below critical levels to prevent resource exhaustion.
Key changes:
- Increased default burst pool size from 64 to 256 bursts for better throughput
- Added three-tier threshold system: low (25%), critical (10%), and recovery (50%)
- Implemented
CRITICAL_THRESHOLDdrop policy that enters dropping mode at critical capacity and exits at recovery threshold - Added comprehensive statistics tracking for dropped bursts and capacity events
- Configured through YAML with
burst_pool_adaptive_dropping_enabledand threshold parameters
Issue found:
burst_manager.cpp:490-510and514-532: Drop statistics counters are incremented beforeshould_drop_burst_adaptive()determines if burst should actually be dropped, leading to inflated drop statistics when the system is in the low-capacity-but-recovering range
Confidence Score: 3/5
- Safe to merge with one logic error in statistics tracking that inflates drop counters
- The adaptive burst dropping feature is well-designed with proper configuration, monitoring, and logging. However, the statistics tracking bug (incrementing counters before actual drop decision) will report inaccurate metrics. This doesn't affect functional correctness but undermines observability and debugging capabilities for production deployments.
- Pay close attention to
burst_manager.cpp:490-510and514-532where drop statistics are incremented prematurely
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp | 2/5 | Implements adaptive burst pool management with configurable thresholds. Contains logic error where drop statistics are incremented before actual drop decision is made. |
| operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.h | 4/5 | Adds pool monitoring infrastructure, configurable thresholds (low=25%, critical=10%, recovery=50%), and statistics tracking. Increases default pool size from 64 to 256 bursts. |
| operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_queue_configs.h | 5/5 | Adds burst pool adaptive dropping configuration fields to RX queue configs with default thresholds matching burst_manager. |
Sequence Diagram
sequenceDiagram
participant App as Application
participant RMgr as RxBurstsManager
participant Pool as AnoBurstsMemoryPool
participant Queue as AnoBurstsQueue
participant Adaptive as Adaptive Drop Logic
Note over RMgr: Initialize with pool_size=256<br/>critical=10%, low=25%, recovery=50%
App->>RMgr: submit_next_packet(packet_data)
RMgr->>RMgr: get_or_allocate_current_burst()
RMgr->>Pool: dequeue_burst()
alt Pool has available bursts
Pool-->>RMgr: return burst
RMgr->>RMgr: append_packet()
alt Burst full
RMgr->>RMgr: enqueue_and_reset_current_burst()
RMgr->>Adaptive: should_drop_burst_due_to_capacity()
Adaptive->>Adaptive: get_pool_utilization_percent()
alt utilization < critical (10%)
Note over Adaptive: INCREMENT COUNTERS<br/>(BEFORE decision!)
Adaptive->>Adaptive: should_drop_burst_adaptive()
Adaptive-->>RMgr: true (drop burst)
RMgr->>Pool: enqueue_burst() [return to pool]
else utilization < low (25%)
Note over Adaptive: INCREMENT COUNTERS<br/>(BEFORE decision!)
Adaptive->>Adaptive: should_drop_burst_adaptive()
alt in_critical_dropping_mode == true
Adaptive-->>RMgr: true (drop burst)
RMgr->>Pool: enqueue_burst() [return to pool]
else in_critical_dropping_mode == false
Adaptive-->>RMgr: false (keep burst)
Note over Adaptive: BUG: Counters already<br/>incremented but no drop!
RMgr->>Queue: enqueue_burst() [to output]
end
else utilization >= low (25%)
Adaptive-->>RMgr: false (keep burst)
RMgr->>Queue: enqueue_burst() [to output]
end
end
else Pool exhausted
Pool-->>RMgr: nullptr
Note over RMgr: NO_FREE_BURST_BUFFERS
end
App->>RMgr: get_rx_burst()
RMgr->>Queue: dequeue_burst()
Queue-->>App: return burst
App->>RMgr: rx_burst_done(burst)
RMgr->>Pool: enqueue_burst() [return to pool]
62 files reviewed, 2 comments
...tors/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp
Outdated
Show resolved
Hide resolved
...tors/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp
Outdated
Show resolved
Hide resolved
599f8ec to
0de6c57
Compare
Greptile Summary
Important Files Changed
Confidence score: 3/5
Sequence DiagramsequenceDiagram
participant User
participant App as "Media Sender App"
participant TxOp as "AdvNetworkMediaTxOp"
participant NetMgr as "Advanced Network Manager"
participant RDK as "Rivermax SDK Services"
participant Hardware as "ConnectX NIC"
participant Network as "Network Interface"
participant RxHW as "Receiver Hardware"
participant RxNetMgr as "Receiver Network Manager"
participant RxOp as "AdvNetworkMediaRxOp"
participant Display as "HolovizOp"
User->>App: "Start media streaming"
App->>TxOp: "Create VideoBuffer/Tensor frame"
TxOp->>TxOp: "Validate frame parameters"
TxOp->>NetMgr: "Create MediaFrame wrapper"
NetMgr->>RDK: "Submit frame to MediaSender service"
RDK->>RDK: "Convert frame to RTP packets"
RDK->>Hardware: "Submit packets via DMA"
Hardware->>Network: "Transmit RTP packets"
Network->>RxHW: "Receive RTP packets"
RxHW->>RxNetMgr: "DMA packets to memory regions"
RxNetMgr->>RxNetMgr: "Assemble packets into bursts"
RxNetMgr->>RxOp: "Provide burst with packet pointers"
RxOp->>RxOp: "Extract RTP headers and payloads"
RxOp->>RxOp: "Assemble packets into video frame"
RxOp->>RxOp: "Create VideoBuffer/Tensor entity"
RxOp->>Display: "Emit completed frame"
Display->>User: "Display video frame"
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
62 files reviewed, no comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 25
♻️ Duplicate comments (2)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp (2)
490-510: Critical: Counters incremented before drop decision.The counters
bursts_dropped_critical_capacity_,total_bursts_dropped_, andpool_capacity_critical_events_are incremented on lines 491-493 before callingshould_drop_burst_adaptive()on line 510. Whenshould_drop_burst_adaptive()returnsfalse(e.g., during recovery whenutilization >= pool_recovery_threshold_percent_but still belowpool_critical_threshold_percent_), the burst is not actually dropped but the counters were already incremented. This inflates drop statistics.This is a duplicate of an issue flagged in previous reviews.
Move counter increments after confirming the drop:
// Critical capacity - definitely drop with video-aware logic if (utilization < pool_critical_threshold_percent_) { - bursts_dropped_critical_capacity_++; - total_bursts_dropped_++; - pool_capacity_critical_events_++; - auto now = std::chrono::steady_clock::now(); auto time_since_last = std::chrono::duration_cast<std::chrono::milliseconds>(now - last_capacity_critical_time_) .count(); if (time_since_last > 1000) { // Log every second HOLOSCAN_LOG_ERROR( "CRITICAL: Pool capacity at {}% - dropping new bursts only (port={}, queue={})", utilization, port_id_, queue_id_); last_capacity_critical_time_ = now; } // In critical mode, use adaptive dropping but be more aggressive - return should_drop_burst_adaptive(utilization); + bool should_drop = should_drop_burst_adaptive(utilization); + if (should_drop) { + bursts_dropped_critical_capacity_++; + total_bursts_dropped_++; + pool_capacity_critical_events_++; + } + return should_drop; }
514-533: Critical: Counters incremented before drop decision.Same issue as the critical capacity path - counters
bursts_dropped_low_capacity_,total_bursts_dropped_, andpool_capacity_warnings_are incremented on lines 515-517 beforeshould_drop_burst_adaptive()determines whether to actually drop. This inflates statistics when bursts are not dropped.This is a duplicate of an issue flagged in previous reviews.
Move counter increments after confirming the drop:
// Low capacity - use adaptive dropping policies if (utilization < pool_low_threshold_percent_) { - bursts_dropped_low_capacity_++; - total_bursts_dropped_++; - pool_capacity_warnings_++; - auto now = std::chrono::steady_clock::now(); auto time_since_last = std::chrono::duration_cast<std::chrono::milliseconds>(now - last_capacity_warning_time_) .count(); if (time_since_last > 5000) { // Log every 5 seconds HOLOSCAN_LOG_WARN("LOW: Pool capacity at {}% - adaptive burst dropping (port={}, queue={})", utilization, port_id_, queue_id_); last_capacity_warning_time_ = now; } - return should_drop_burst_adaptive(utilization); + bool should_drop = should_drop_burst_adaptive(utilization); + if (should_drop) { + bursts_dropped_low_capacity_++; + total_bursts_dropped_++; + pool_capacity_warnings_++; + } + return should_drop; }
🧹 Nitpick comments (6)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_config_manager.cpp (1)
564-588: Consider validating threshold relationships.The parsing logic correctly handles optional configuration with sensible defaults. However, there's no validation that the thresholds maintain logical relationships (e.g.,
recovery_threshold > critical_threshold,low_threshold > critical_threshold). Invalid threshold configurations could lead to unexpected adaptive dropping behavior at runtime.Consider adding validation after parsing:
rivermax_rx_config.burst_pool_recovery_threshold_percent = burst_pool_config["recovery_threshold_percent"].as<uint32_t>(50); + // Validate threshold relationships + if (rivermax_rx_config.burst_pool_critical_threshold_percent >= + rivermax_rx_config.burst_pool_low_threshold_percent) { + HOLOSCAN_LOG_WARN("Critical threshold ({}%) should be less than low threshold ({}%)", + rivermax_rx_config.burst_pool_critical_threshold_percent, + rivermax_rx_config.burst_pool_low_threshold_percent); + } + if (rivermax_rx_config.burst_pool_recovery_threshold_percent <= + rivermax_rx_config.burst_pool_critical_threshold_percent) { + HOLOSCAN_LOG_WARN("Recovery threshold ({}%) should be greater than critical threshold ({}%)", + rivermax_rx_config.burst_pool_recovery_threshold_percent, + rivermax_rx_config.burst_pool_critical_threshold_percent); + } HOLOSCAN_LOG_INFO(operators/advanced_network_media/common/adv_network_media_common.h (1)
27-39: Wrap macro in do-while(0) for safety.The macro should use the do-while(0) pattern to prevent issues with if-else chains and ensure it behaves like a single statement.
Apply this diff:
-#define CUDA_TRY(stmt) \ - { \ - cudaError_t cuda_status = stmt; \ - if (cudaSuccess != cuda_status) { \ - ANM_LOG_ERROR("Runtime call {} in line {} of file {} failed with '{}' ({})", \ - #stmt, \ - __LINE__, \ - __FILE__, \ - cudaGetErrorString(cuda_status), \ - static_cast<int>(cuda_status)); \ - throw std::runtime_error("CUDA operation failed"); \ - } \ - } +#define CUDA_TRY(stmt) \ + do { \ + cudaError_t cuda_status = stmt; \ + if (cudaSuccess != cuda_status) { \ + ANM_LOG_ERROR("Runtime call {} in line {} of file {} failed with '{}' ({})", \ + #stmt, \ + __LINE__, \ + __FILE__, \ + cudaGetErrorString(cuda_status), \ + static_cast<int>(cuda_status)); \ + throw std::runtime_error("CUDA operation failed"); \ + } \ + } while (0)applications/adv_networking_media_sender/cpp/adv_networking_media_sender.cpp (3)
17-17: Remove unused include.The
assert.hheader is included but never used in this file.Apply this diff:
-#include <assert.h> #include <sys/time.h>
43-46: Remove duplicate log statement.Lines 43 and 46 log essentially identical messages about the Advanced Network manager type.
Apply this diff to remove the duplicate:
HOLOSCAN_LOG_INFO("Using Advanced Network manager {}", advanced_network::manager_type_to_string(mgr_type)); - HOLOSCAN_LOG_INFO("Using ANO manager {}", advanced_network::manager_type_to_string(mgr_type)); if (!tx_en) {
33-50: Consider returning error codes instead of calling exit().Calling
exit(1)from withincompose()terminates the entire process abruptly. Consider propagating errors tomain()via exceptions or return codes for more graceful shutdown and better testability.operators/advanced_network_media/common/frame_buffer.h (1)
31-33: Removeusing namespacefrom the headerHeader-wide
using namespace …;pollutes every translation unit that includes this file and risks name clashes. Please switch to explicit aliases for the specific symbols you need.-using namespace rivermax::dev_kit::services; -using namespace holoscan::advanced_network; +using rivermax::dev_kit::services::IFrameBuffer; +using holoscan::advanced_network::MemoryLocation;
applications/adv_networking_media_player/cpp/adv_networking_media_player.cpp
Outdated
Show resolved
Hide resolved
applications/adv_networking_media_player/python/adv_networking_media_player.py
Show resolved
Hide resolved
operators/advanced_network_media/common/adv_network_media_logging.h
Outdated
Show resolved
Hide resolved
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.h
Show resolved
Hide resolved
0de6c57 to
2e6b99f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
♻️ Duplicate comments (1)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.h (1)
548-562: Remove the extratotal_bursts_dropped_++increment.
should_drop_burst_due_to_capacity()already updates all drop counters (includingtotal_bursts_dropped_). Incrementing again inenqueue_and_reset_current_burst()doubles every drop. Please drop the redundant increment so statistics stay accurate.if (should_drop_burst_due_to_capacity()) { rx_bursts_mempool_->enqueue_burst(cur_out_burst_); reset_current_burst(); - total_bursts_dropped_++; return Status::SUCCESS; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
operators/advanced_network/Dockerfile(2 hunks)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/adv_network_rivermax_mgr.cpp(10 hunks)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp(10 hunks)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.h(10 hunks)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_config_manager.cpp(10 hunks)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_mgr_service.cpp(13 hunks)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_mgr_service.h(3 hunks)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_queue_configs.cpp(15 hunks)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_queue_configs.h(3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- operators/advanced_network/Dockerfile
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: nvidia-holoscan/holohub PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-10-22T16:16:16.226Z
Learning: Applies to applications/CMakeLists.txt : Register applications in applications/CMakeLists.txt using add_holohub_application(...) and optional DEPENDS OPERATORS
Learnt from: CR
Repo: nvidia-holoscan/holohub PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-10-22T16:16:16.226Z
Learning: Applies to workflow/CMakeLists.txt : Register workflows in workflow/CMakeLists.txt using add_holohub_application(...) and optional DEPENDS OPERATORS
Learnt from: CR
Repo: nvidia-holoscan/holohub PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-10-22T16:16:16.226Z
Learning: Applies to operators/CMakeLists.txt : Register operators in operators/CMakeLists.txt using add_holohub_operator(...) and optional DEPENDS EXTENSIONS
Learnt from: CR
Repo: nvidia-holoscan/holohub PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-10-22T16:16:16.226Z
Learning: Applies to pkg/CMakeLists.txt : Register packages in pkg/CMakeLists.txt using add_holohub_package(...)
🧬 Code graph analysis (7)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_mgr_service.cpp (3)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/adv_network_rivermax_mgr.cpp (24)
burst(99-99)burst(100-100)burst(101-101)burst(102-102)burst(103-103)burst(104-104)burst(105-105)burst(106-107)burst(108-109)burst(110-110)burst(111-111)burst(113-113)burst(114-114)burst(115-115)burst(116-116)burst(117-117)shutdown(561-595)shutdown(561-561)shutdown(800-802)shutdown(800-800)free_tx_burst(504-516)free_tx_burst(504-504)free_tx_burst(772-774)free_tx_burst(772-772)operators/advanced_network/advanced_network/common.cpp (4)
shutdown(280-283)shutdown(280-280)free_tx_burst(250-253)free_tx_burst(250-250)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_mgr_service.h (1)
free_tx_burst(445-445)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_queue_configs.cpp (1)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_config_manager.cpp (2)
validate_cores(777-797)validate_cores(777-777)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_mgr_service.h (3)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.h (2)
shared_ptr(531-542)RxBurstsManager(317-522)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp (2)
RxBurstsManager(392-428)RxBurstsManager(430-443)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_mgr_service.cpp (2)
apply_burst_pool_configuration(74-90)apply_burst_pool_configuration(74-74)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp (1)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.h (1)
RxBurstsManager(317-522)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/adv_network_rivermax_mgr.cpp (1)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.h (2)
burst_port_id_from_burst_tag(69-71)burst_queue_id_from_burst_tag(79-81)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_config_manager.cpp (1)
operators/advanced_network/advanced_network/types.h (1)
GetMemoryKindFromString(106-118)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.h (1)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp (10)
get_pool_status_string(445-464)get_pool_status_string(445-445)get_burst_drop_statistics(466-474)get_burst_drop_statistics(466-466)should_drop_burst_due_to_capacity(476-540)should_drop_burst_due_to_capacity(476-476)log_pool_capacity_status(542-556)log_pool_capacity_status(542-542)should_drop_burst_adaptive(558-595)should_drop_burst_adaptive(558-558)
...ced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_config_manager.cpp
Show resolved
Hide resolved
...vanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_mgr_service.cpp
Outdated
Show resolved
Hide resolved
2e6b99f to
8385d3c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
62 files reviewed, no comments
Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format
8385d3c to
8e5d16c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
62 files reviewed, no comments
Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 14
🧹 Nitpick comments (8)
operators/advanced_network_media/advanced_network_media_tx/adv_network_media_tx.h (1)
21-21: Consider usingstd::unique_ptrfor the pimpl pattern.The header includes
<memory>but uses a raw pointer forpimpl_. Modern C++ best practice is to usestd::unique_ptrfor pimpl implementations to provide automatic lifetime management and prevent potential memory leaks.Apply this diff:
private: friend class AdvNetworkMediaTxOpImpl; // Parameters Parameter<std::string> interface_name_; Parameter<uint16_t> queue_id_; Parameter<std::string> video_format_; Parameter<uint32_t> bit_depth_; Parameter<uint32_t> frame_width_; Parameter<uint32_t> frame_height_; - AdvNetworkMediaTxOpImpl* pimpl_; + std::unique_ptr<AdvNetworkMediaTxOpImpl> pimpl_; };Then update the implementation in
adv_network_media_tx.cpp:AdvNetworkMediaTxOp::AdvNetworkMediaTxOp() = default; AdvNetworkMediaTxOp::~AdvNetworkMediaTxOp() = default; void AdvNetworkMediaTxOp::initialize() { ANM_LOG_INFO("AdvNetworkMediaTxOp::initialize()"); holoscan::Operator::initialize(); if (!pimpl_) { pimpl_ = std::make_unique<AdvNetworkMediaTxOpImpl>(*this); } pimpl_->initialize(); }Also applies to: 67-67
applications/adv_networking_media_sender/README.md (1)
144-146: Consider adding a language identifier to the fenced code block.The ASCII-art pipeline representation would benefit from a language identifier (e.g.,
textorascii) to improve rendering consistency across different markdown viewers.Apply this diff:
-``` +```text Video Files → VideoStreamReplayer → AdvNetworkMediaTxOp → RDK Services → Network</blockquote></details> <details> <summary>applications/adv_networking_media_player/README.md (1)</summary><blockquote> `107-112`: **Consider adding a language identifier to the fenced code block.** The ASCII-art pipeline representation would benefit from a language identifier (e.g., `text` or `ascii`) for consistent rendering across markdown viewers. Apply this diff: ```diff -``` +```text ┌─────────────────┐ ┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐ │ Network Hardware│ -> │ Advanced Network│ -> │ Media RX Operator│ -> │ Application │ │ Layer │ │ Manager + RDK │ │ Layer │ │ Layer │ └─────────────────┘ └─────────────────┘ └──────────────────┘ └─────────────────┘</blockquote></details> <details> <summary>operators/advanced_network_media/README.md (1)</summary><blockquote> `1-840`: **Consider adding language specifiers to code blocks.** Multiple fenced code blocks lack language specifiers (lines 152, 169, 188, 215, 231, 600, 619, 636, 667, 686, 694), which reduces syntax highlighting and accessibility. While not critical for a README, adding appropriate specifiers (e.g., `text`, `bash`, or specific languages) would improve readability. </blockquote></details> <details> <summary>applications/adv_networking_media_player/cpp/adv_networking_media_player.cpp (2)</summary><blockquote> `29-29`: **Consider removing wholesale namespace import.** While `using namespace` in implementation files is less problematic than in headers, it can still lead to symbol conflicts. Consider using explicit `holoscan::advanced_network::` qualifications or targeted declarations for only the symbols you need. --- `279-282`: **Remove duplicate log message.** Lines 279-280 and 282 log nearly identical information about the Advanced Network manager type. Apply this diff: ```diff HOLOSCAN_LOG_INFO("Using Advanced Network manager {}", advanced_network::manager_type_to_string(mgr_type)); - HOLOSCAN_LOG_INFO("Using ANO manager {}", advanced_network::manager_type_to_string(mgr_type)); if (!rx_en) {applications/adv_networking_media_sender/python/adv_networking_media_sender.py (2)
101-109: Consider using logging.exception for richer error context.When catching exceptions that lead to sys.exit, using
logging.exceptioninstead oflogging.errorautomatically includes the traceback, which aids debugging without requiring separate traceback printing.Example for line 108:
except Exception as e: - logger.error(f"Failed to get advanced network config or initialize: {e}") + logger.exception("Failed to get advanced network config or initialize") sys.exit(1)Similar changes could be applied to lines 144, 155, 162, and 172 for consistency.
206-211: Simplify exception logging.Using
logging.exceptionwould eliminate the need for manual traceback printing.Apply this diff:
except Exception as e: - logger.error(f"Application failed: {e}") - import traceback - - traceback.print_exc() + logger.exception("Application failed") sys.exit(1)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (62)
applications/CMakeLists.txt(1 hunks)applications/adv_networking_media_player/CMakeLists.txt(1 hunks)applications/adv_networking_media_player/README.md(1 hunks)applications/adv_networking_media_player/adv_networking_media_player.yaml(1 hunks)applications/adv_networking_media_player/cpp/CMakeLists.txt(1 hunks)applications/adv_networking_media_player/cpp/adv_networking_media_player.cpp(1 hunks)applications/adv_networking_media_player/cpp/metadata.json(1 hunks)applications/adv_networking_media_player/python/CMakeLists.txt(1 hunks)applications/adv_networking_media_player/python/adv_networking_media_player.py(1 hunks)applications/adv_networking_media_player/python/metadata.json(1 hunks)applications/adv_networking_media_sender/CMakeLists.txt(1 hunks)applications/adv_networking_media_sender/README.md(1 hunks)applications/adv_networking_media_sender/adv_networking_media_sender.yaml(1 hunks)applications/adv_networking_media_sender/cpp/CMakeLists.txt(1 hunks)applications/adv_networking_media_sender/cpp/adv_networking_media_sender.cpp(1 hunks)applications/adv_networking_media_sender/cpp/metadata.json(1 hunks)applications/adv_networking_media_sender/python/CMakeLists.txt(1 hunks)applications/adv_networking_media_sender/python/adv_networking_media_sender.py(1 hunks)applications/adv_networking_media_sender/python/metadata.json(1 hunks)operators/CMakeLists.txt(1 hunks)operators/advanced_network/Dockerfile(2 hunks)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/adv_network_rivermax_mgr.cpp(10 hunks)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp(10 hunks)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.h(10 hunks)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_config_manager.cpp(10 hunks)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_mgr_service.cpp(13 hunks)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_mgr_service.h(3 hunks)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_queue_configs.cpp(15 hunks)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_queue_configs.h(3 hunks)operators/advanced_network_media/CMakeLists.txt(1 hunks)operators/advanced_network_media/README.md(1 hunks)operators/advanced_network_media/advanced_network_media_rx/CMakeLists.txt(1 hunks)operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.cpp(1 hunks)operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.h(1 hunks)operators/advanced_network_media/advanced_network_media_rx/frame_assembly_controller.cpp(1 hunks)operators/advanced_network_media/advanced_network_media_rx/frame_assembly_controller.h(1 hunks)operators/advanced_network_media/advanced_network_media_rx/frame_provider.h(1 hunks)operators/advanced_network_media/advanced_network_media_rx/media_frame_assembler.cpp(1 hunks)operators/advanced_network_media/advanced_network_media_rx/media_frame_assembler.h(1 hunks)operators/advanced_network_media/advanced_network_media_rx/memory_copy_strategies.cpp(1 hunks)operators/advanced_network_media/advanced_network_media_rx/memory_copy_strategies.h(1 hunks)operators/advanced_network_media/advanced_network_media_rx/metadata.json(1 hunks)operators/advanced_network_media/advanced_network_media_rx/network_burst_processor.cpp(1 hunks)operators/advanced_network_media/advanced_network_media_rx/network_burst_processor.h(1 hunks)operators/advanced_network_media/advanced_network_media_rx/python/CMakeLists.txt(1 hunks)operators/advanced_network_media/advanced_network_media_rx/python/adv_network_media_rx_pybind.cpp(1 hunks)operators/advanced_network_media/advanced_network_media_rx/python/adv_network_media_rx_pydoc.hpp(1 hunks)operators/advanced_network_media/advanced_network_media_tx/CMakeLists.txt(1 hunks)operators/advanced_network_media/advanced_network_media_tx/adv_network_media_tx.cpp(1 hunks)operators/advanced_network_media/advanced_network_media_tx/adv_network_media_tx.h(1 hunks)operators/advanced_network_media/advanced_network_media_tx/metadata.json(1 hunks)operators/advanced_network_media/advanced_network_media_tx/python/CMakeLists.txt(1 hunks)operators/advanced_network_media/advanced_network_media_tx/python/adv_network_media_tx_pybind.cpp(1 hunks)operators/advanced_network_media/advanced_network_media_tx/python/adv_network_media_tx_pydoc.hpp(1 hunks)operators/advanced_network_media/common/CMakeLists.txt(1 hunks)operators/advanced_network_media/common/adv_network_media_common.h(1 hunks)operators/advanced_network_media/common/adv_network_media_logging.h(1 hunks)operators/advanced_network_media/common/frame_buffer.cpp(1 hunks)operators/advanced_network_media/common/frame_buffer.h(1 hunks)operators/advanced_network_media/common/rtp_params.h(1 hunks)operators/advanced_network_media/common/video_parameters.cpp(1 hunks)operators/advanced_network_media/common/video_parameters.h(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (19)
- applications/adv_networking_media_sender/CMakeLists.txt
- operators/advanced_network_media/advanced_network_media_tx/python/CMakeLists.txt
- operators/advanced_network/Dockerfile
- operators/CMakeLists.txt
- applications/adv_networking_media_sender/cpp/CMakeLists.txt
- applications/adv_networking_media_player/python/CMakeLists.txt
- operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_mgr_service.cpp
- operators/advanced_network_media/advanced_network_media_rx/network_burst_processor.cpp
- operators/advanced_network_media/advanced_network_media_tx/CMakeLists.txt
- operators/advanced_network_media/advanced_network_media_rx/metadata.json
- operators/advanced_network_media/CMakeLists.txt
- applications/adv_networking_media_player/cpp/CMakeLists.txt
- operators/advanced_network_media/advanced_network_media_tx/metadata.json
- applications/adv_networking_media_player/CMakeLists.txt
- applications/adv_networking_media_sender/cpp/metadata.json
- operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_queue_configs.h
- applications/adv_networking_media_player/python/metadata.json
- applications/adv_networking_media_player/cpp/metadata.json
- operators/advanced_network_media/advanced_network_media_rx/CMakeLists.txt
🧰 Additional context used
🧠 Learnings (6)
📚 Learning: 2025-11-12T10:24:18.497Z
Learnt from: ronyrad
Repo: nvidia-holoscan/holohub PR: 970
File: applications/adv_networking_media_player/python/adv_networking_media_player.py:163-164
Timestamp: 2025-11-12T10:24:18.497Z
Learning: In Holoscan Python applications, the `add_flow` method expects a set of tuples for port mappings, not a dictionary. The correct syntax is `self.add_flow(source_op, dest_op, {("output_port", "input_port")})` using curly braces with tuples. This matches the C++ API which uses `std::set<std::pair<std::string, std::string>>`. Multiple connections can be specified as `{("out1", "in1"), ("out2", "in2")}`.
Applied to files:
applications/adv_networking_media_player/python/adv_networking_media_player.py
📚 Learning: 2025-10-22T23:47:42.896Z
Learnt from: cdinea
Repo: nvidia-holoscan/holohub PR: 1170
File: applications/video_streaming/video_streaming_server/cpp/CMakeLists.txt:109-111
Timestamp: 2025-10-22T23:47:42.896Z
Learning: In the video streaming server application (applications/video_streaming/video_streaming_server/cpp/CMakeLists.txt), bundling libcudart.so.12 from the NGC operator binaries is intentional to ensure consistency with NGC binaries, even though the target links to CUDA::cudart.
Applied to files:
operators/advanced_network_media/common/CMakeLists.txt
📚 Learning: 2025-10-22T16:21:10.281Z
Learnt from: cdinea
Repo: nvidia-holoscan/holohub PR: 1170
File: applications/video_streaming/video_streaming_client/cpp/streaming_client_demo.yaml:42-49
Timestamp: 2025-10-22T16:21:10.281Z
Learning: V4L2VideoCaptureOp in Holoscan SDK performs internal conversion from the camera's native pixel format (specified by the pixel_format parameter) to RGBA8888 output, regardless of the input format (e.g., YUYV, MJPEG). When using V4L2 as a source, downstream operators should expect RGBA8888 (4-channel) output format.
Applied to files:
operators/advanced_network_media/common/video_parameters.hoperators/advanced_network_media/common/video_parameters.cpp
📚 Learning: 2025-10-22T16:53:45.393Z
Learnt from: cdinea
Repo: nvidia-holoscan/holohub PR: 1170
File: operators/video_streaming/streaming_client_enhanced/python/CMakeLists.txt:16-24
Timestamp: 2025-10-22T16:53:45.393Z
Learning: The pybind11_add_holohub_module CMake macro in cmake/pybind11_add_holohub_module.cmake encapsulates all pybind11 setup internally, including finding pybind11, linking against holoscan::pybind11 conditionally, and linking the C++ operator target. Operator Python bindings in holohub should only call this macro without additional pybind11 setup.
Applied to files:
operators/advanced_network_media/advanced_network_media_tx/python/adv_network_media_tx_pybind.cppoperators/advanced_network_media/advanced_network_media_rx/python/CMakeLists.txtoperators/advanced_network_media/advanced_network_media_rx/python/adv_network_media_rx_pybind.cpp
📚 Learning: 2025-10-30T19:04:41.239Z
Learnt from: bhashemian
Repo: nvidia-holoscan/holohub PR: 1203
File: applications/video_streaming/video_streaming_server/cpp/metadata.json:42-51
Timestamp: 2025-10-30T19:04:41.239Z
Learning: In the video_streaming application structure, umbrella metadata (applications/video_streaming/metadata.json) uses language-qualified mode names like "server_cpp" and "server_python" to distinguish between implementations, while component-specific metadata files (e.g., applications/video_streaming/video_streaming_server/cpp/metadata.json) use simple mode names like "server" since they are already scoped to a specific language implementation by their directory structure.
Applied to files:
applications/adv_networking_media_sender/python/metadata.json
📚 Learning: 2025-10-22T16:33:55.411Z
Learnt from: cdinea
Repo: nvidia-holoscan/holohub PR: 1170
File: applications/video_streaming/video_streaming_client/python/streaming_client_demo_replayer.yaml:27-36
Timestamp: 2025-10-22T16:33:55.411Z
Learning: In the video_streaming bidirectional client applications (applications/video_streaming/video_streaming_client), the pipeline has two separate data paths: (1) Outgoing: source → format_converter → streaming_client INPUT (sends to server), and (2) Incoming: streaming_client OUTPUT → holoviz (receives from server). The format_converter prepares data for transmission and does NOT feed directly into holoviz visualization.
Applied to files:
applications/adv_networking_media_player/README.md
🧬 Code graph analysis (30)
applications/adv_networking_media_player/python/adv_networking_media_player.py (1)
applications/adv_networking_media_player/cpp/adv_networking_media_player.cpp (4)
holoscan(266-312)main(315-338)main(315-315)config_path(325-325)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/adv_network_rivermax_mgr.cpp (2)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp (2)
burst(170-170)burst(171-171)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.h (2)
burst_port_id_from_burst_tag(69-71)burst_queue_id_from_burst_tag(79-81)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_config_manager.cpp (1)
operators/advanced_network/advanced_network/types.h (1)
GetMemoryKindFromString(106-118)
applications/adv_networking_media_player/cpp/adv_networking_media_player.cpp (1)
operators/tensor_to_file/tensor_to_file.cpp (1)
file_path(225-225)
operators/advanced_network_media/common/video_parameters.h (2)
operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.h (1)
holoscan(23-74)operators/advanced_network_media/common/video_parameters.cpp (10)
get_video_sampling_format(23-52)get_video_sampling_format(23-23)get_color_bit_depth(54-65)get_color_bit_depth(54-54)get_expected_gxf_video_format(67-79)get_expected_gxf_video_format(67-68)calculate_frame_size(81-119)calculate_frame_size(81-82)get_channel_count_for_format(121-144)get_channel_count_for_format(121-121)
applications/adv_networking_media_sender/cpp/adv_networking_media_sender.cpp (1)
applications/distributed/ucx/ucx_endoscopy_tool_tracking/cpp/main.cpp (1)
args(36-51)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_mgr_service.h (3)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.h (2)
shared_ptr(531-542)RxBurstsManager(317-522)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp (2)
RxBurstsManager(392-428)RxBurstsManager(430-443)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_mgr_service.cpp (2)
apply_burst_pool_configuration(74-90)apply_burst_pool_configuration(74-74)
operators/advanced_network_media/advanced_network_media_rx/python/adv_network_media_rx_pydoc.hpp (2)
operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.cpp (6)
AdvNetworkMediaRxOp(696-696)AdvNetworkMediaRxOp(698-704)initialize(738-762)initialize(738-738)setup(706-736)setup(706-706)operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.h (1)
AdvNetworkMediaRxOp(35-72)
applications/adv_networking_media_sender/python/adv_networking_media_sender.py (1)
applications/adv_networking_media_sender/cpp/adv_networking_media_sender.cpp (4)
holoscan(30-62)main(65-86)main(65-65)config_path(75-75)
operators/advanced_network_media/advanced_network_media_tx/adv_network_media_tx.cpp (2)
operators/advanced_network_media/common/video_parameters.cpp (8)
get_video_sampling_format(23-52)get_video_sampling_format(23-23)get_color_bit_depth(54-65)get_color_bit_depth(54-54)calculate_frame_size(81-119)calculate_frame_size(81-82)get_expected_gxf_video_format(67-79)get_expected_gxf_video_format(67-68)operators/advanced_network_media/advanced_network_media_tx/adv_network_media_tx.h (1)
AdvNetworkMediaTxOp(36-68)
operators/advanced_network_media/advanced_network_media_tx/python/adv_network_media_tx_pybind.cpp (2)
operators/advanced_network_media/advanced_network_media_tx/adv_network_media_tx.cpp (6)
AdvNetworkMediaTxOp(271-272)AdvNetworkMediaTxOp(274-279)setup(292-305)setup(292-292)initialize(281-290)initialize(281-281)operators/advanced_network_media/advanced_network_media_tx/adv_network_media_tx.h (1)
AdvNetworkMediaTxOp(36-68)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.h (1)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp (10)
get_pool_status_string(445-464)get_pool_status_string(445-445)get_burst_drop_statistics(466-474)get_burst_drop_statistics(466-466)should_drop_burst_due_to_capacity(476-540)should_drop_burst_due_to_capacity(476-476)log_pool_capacity_status(542-556)log_pool_capacity_status(542-542)should_drop_burst_adaptive(558-595)should_drop_burst_adaptive(558-558)
operators/advanced_network_media/advanced_network_media_rx/frame_assembly_controller.cpp (4)
operators/advanced_network_media/advanced_network_media_rx/frame_provider.h (1)
IFrameProvider(22-49)operators/advanced_network_media/advanced_network_media_rx/frame_assembly_controller.h (1)
FrameAssemblyController(100-247)operators/advanced_network_media/advanced_network_media_rx/media_frame_assembler.cpp (2)
reset(194-217)reset(194-194)operators/advanced_network_media/advanced_network_media_rx/memory_copy_strategies.cpp (6)
reset(144-152)reset(144-144)reset(339-343)reset(339-339)reset(493-501)reset(493-493)
operators/advanced_network_media/advanced_network_media_rx/frame_assembly_controller.h (5)
operators/advanced_network_media/advanced_network_media_rx/frame_provider.h (2)
holoscan(12-51)IFrameProvider(22-49)operators/advanced_network_media/advanced_network_media_rx/media_frame_assembler.h (2)
holoscan(19-346)detail(22-28)operators/advanced_network_media/common/frame_buffer.h (2)
holoscan(34-65)FrameBufferBase(40-64)operators/advanced_network_media/advanced_network_media_rx/memory_copy_strategies.h (4)
detail(19-367)IMemoryCopyStrategy(37-325)CopyStrategy(24-366)CopyStrategy(68-107)operators/advanced_network_media/advanced_network_media_rx/frame_assembly_controller.cpp (35)
FrameAssemblyController(25-38)process_event(40-111)process_event(40-42)reset(113-127)reset(113-113)advance_frame_position(129-144)advance_frame_position(129-129)set_strategy(146-155)set_strategy(146-146)allocate_new_frame(157-168)allocate_new_frame(157-157)release_current_frame(170-179)release_current_frame(170-170)validate_frame_bounds(181-187)validate_frame_bounds(181-181)transition_to_state(189-199)transition_to_state(189-189)handle_idle_state(201-256)handle_idle_state(201-203)handle_receiving_state(258-302)handle_receiving_state(258-260)handle_error_recovery_state(304-374)handle_error_recovery_state(304-305)create_success_result(376-381)create_success_result(376-376)create_error_result(383-390)create_error_result(383-384)state_to_string(396-407)state_to_string(396-396)event_to_string(409-428)event_to_string(409-409)is_valid_transition(430-446)is_valid_transition(430-430)get_valid_events(448-467)get_valid_events(448-448)
operators/advanced_network_media/advanced_network_media_rx/frame_provider.h (3)
operators/advanced_network_media/advanced_network_media_rx/media_frame_assembler.h (1)
holoscan(19-346)operators/advanced_network_media/common/frame_buffer.h (2)
holoscan(34-65)FrameBufferBase(40-64)operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.cpp (8)
frame(72-72)frame(233-261)frame(414-433)frame(414-415)frame(445-448)frame(445-445)frame(462-469)frame(462-462)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp (1)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.h (1)
RxBurstsManager(317-522)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_queue_configs.cpp (1)
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_config_manager.cpp (2)
validate_cores(817-837)validate_cores(817-817)
operators/advanced_network_media/advanced_network_media_rx/python/adv_network_media_rx_pybind.cpp (2)
operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.cpp (6)
AdvNetworkMediaRxOp(696-696)AdvNetworkMediaRxOp(698-704)setup(706-736)setup(706-706)initialize(738-762)initialize(738-738)operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.h (1)
AdvNetworkMediaRxOp(35-72)
operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.h (5)
operators/advanced_network_media/advanced_network_media_rx/frame_provider.h (1)
holoscan(12-51)operators/advanced_network_media/advanced_network_media_rx/media_frame_assembler.h (1)
holoscan(19-346)operators/advanced_network_media/advanced_network_media_rx/network_burst_processor.h (1)
holoscan(16-71)operators/advanced_network_media/common/frame_buffer.h (1)
holoscan(34-65)operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.cpp (12)
AdvNetworkMediaRxOpImpl(93-93)AdvNetworkMediaRxOpImpl(93-93)AdvNetworkMediaRxOp(696-696)AdvNetworkMediaRxOp(698-704)initialize(738-762)initialize(738-738)setup(706-736)setup(706-706)compute(764-788)compute(764-765)op_input(270-338)op_input(270-270)
operators/advanced_network_media/advanced_network_media_rx/memory_copy_strategies.h (5)
operators/advanced_network_media/advanced_network_media_rx/media_frame_assembler.h (1)
detail(22-28)operators/advanced_network_media/advanced_network_media_rx/frame_assembly_controller.h (2)
StateEvent(39-284)FrameAssemblyController(100-247)operators/advanced_network_media/advanced_network_media_rx/memory_copy_strategies.cpp (52)
process_packet(285-333)process_packet(285-286)process_packet(417-465)process_packet(417-418)execute_accumulated_copy(345-348)execute_accumulated_copy(345-346)execute_accumulated_copy(471-491)execute_accumulated_copy(471-472)has_accumulated_data(335-337)has_accumulated_data(335-335)has_accumulated_data(467-469)has_accumulated_data(467-467)reset(144-152)reset(144-144)reset(339-343)reset(339-339)reset(493-501)reset(493-493)create_detector(18-20)create_detector(18-18)create_contiguous_strategy(22-26)create_contiguous_strategy(22-24)create_strided_strategy(28-33)create_strided_strategy(28-30)configure_burst_parameters(39-67)configure_burst_parameters(39-41)collect_packet(69-94)collect_packet(69-70)detect_strategy(96-142)detect_strategy(96-98)analyze_pattern(154-227)analyze_pattern(154-154)validate_sequence_continuity(229-249)validate_sequence_continuity(229-229)detect_buffer_wraparound(251-272)detect_buffer_wraparound(251-251)ContiguousMemoryCopyStrategy(278-283)execute_copy(350-390)execute_copy(350-351)validate_copy_bounds(392-403)validate_copy_bounds(392-393)StridedMemoryCopyStrategy(409-415)is_stride_maintained(503-533)is_stride_maintained(503-503)execute_strided_copy(535-583)execute_strided_copy(535-536)execute_individual_copy(585-612)execute_individual_copy(585-586)validate_strided_copy_bounds(614-626)validate_strided_copy_bounds(614-615)reset_accumulation(628-635)reset_accumulation(628-628)operators/advanced_network_media/advanced_network_media_rx/frame_assembly_controller.cpp (3)
FrameAssemblyController(25-38)reset(113-127)reset(113-113)operators/advanced_network_media/advanced_network_media_rx/media_frame_assembler.cpp (6)
has_accumulated_data(231-233)has_accumulated_data(231-231)reset(194-217)reset(194-194)configure_burst_parameters(90-106)configure_burst_parameters(90-91)
operators/advanced_network_media/advanced_network_media_rx/memory_copy_strategies.cpp (3)
operators/advanced_network_media/advanced_network_media_rx/media_frame_assembler.cpp (6)
configure_burst_parameters(90-106)configure_burst_parameters(90-91)reset(194-217)reset(194-194)has_accumulated_data(231-233)has_accumulated_data(231-231)operators/advanced_network_media/advanced_network_media_rx/frame_assembly_controller.cpp (2)
reset(113-127)reset(113-113)operators/advanced_network_media/advanced_network_media_rx/memory_copy_strategies.h (2)
validate_sequence_continuity(172-215)StridedMemoryCopyStrategy(243-263)
operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.cpp (3)
operators/advanced_network_media/common/video_parameters.cpp (10)
get_video_sampling_format(23-52)get_video_sampling_format(23-23)get_color_bit_depth(54-65)get_color_bit_depth(54-54)get_expected_gxf_video_format(67-79)get_expected_gxf_video_format(67-68)calculate_frame_size(81-119)calculate_frame_size(81-82)get_channel_count_for_format(121-144)get_channel_count_for_format(121-121)operators/advanced_network_media/advanced_network_media_rx/media_frame_assembler.cpp (4)
on_frame_completed(618-622)on_frame_completed(618-618)on_frame_error(624-630)on_frame_error(624-624)operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.h (1)
AdvNetworkMediaRxOp(35-72)
operators/advanced_network_media/advanced_network_media_rx/media_frame_assembler.cpp (7)
operators/advanced_network_media/advanced_network_media_rx/memory_copy_strategies.h (4)
CopyStrategy(24-366)CopyStrategy(68-107)IMemoryCopyStrategy(37-325)MemoryCopyStrategyDetector(112-238)operators/advanced_network_media/advanced_network_media_rx/frame_assembly_controller.cpp (3)
FrameAssemblyController(25-38)reset(113-127)reset(113-113)operators/advanced_network_media/advanced_network_media_rx/frame_assembly_controller.h (3)
FrameAssemblyController(100-247)FrameState(30-286)StateEvent(39-284)operators/advanced_network_media/advanced_network_media_rx/media_frame_assembler.h (2)
MediaFrameAssembler(91-287)DefaultFrameCompletionHandler(292-310)operators/advanced_network_media/advanced_network_media_rx/frame_provider.h (1)
IFrameProvider(22-49)operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.cpp (15)
config(206-228)frame(72-72)frame(233-261)frame(414-433)frame(414-415)frame(445-448)frame(445-445)frame(462-469)frame(462-462)error_message(73-73)ENABLE_STATISTICS_LOGGING(531-635)on_frame_completed(674-682)on_frame_completed(674-674)on_frame_error(684-690)on_frame_error(684-684)operators/advanced_network_media/advanced_network_media_rx/memory_copy_strategies.cpp (16)
create_detector(18-20)create_detector(18-18)create_contiguous_strategy(22-26)create_contiguous_strategy(22-24)configure_burst_parameters(39-67)configure_burst_parameters(39-41)reset(144-152)reset(144-144)reset(339-343)reset(339-339)reset(493-501)reset(493-493)has_accumulated_data(335-337)has_accumulated_data(335-335)has_accumulated_data(467-469)has_accumulated_data(467-467)
operators/advanced_network_media/advanced_network_media_tx/adv_network_media_tx.h (1)
operators/advanced_network_media/advanced_network_media_tx/adv_network_media_tx.cpp (14)
AdvNetworkMediaTxOpImpl(46-46)AdvNetworkMediaTxOpImpl(46-46)AdvNetworkMediaTxOp(271-272)AdvNetworkMediaTxOp(274-279)initialize(281-290)initialize(281-281)setup(292-305)setup(292-292)compute(307-311)compute(307-308)op_input(138-194)op_input(138-138)op_output(203-257)op_output(203-203)
operators/advanced_network_media/common/frame_buffer.h (6)
operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.h (1)
holoscan(23-74)operators/advanced_network_media/advanced_network_media_rx/frame_provider.h (1)
holoscan(12-51)operators/advanced_network_media/advanced_network_media_rx/media_frame_assembler.h (1)
holoscan(19-346)operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.cpp (1)
frame_size_(454-456)operators/advanced_network_media/common/frame_buffer.cpp (18)
validate_frame_parameters(23-38)validate_frame_parameters(23-25)VideoBufferFrameBuffer(40-55)validate_format_compliance(57-91)validate_format_compliance(57-58)validate_format_compliance(109-133)validate_format_compliance(109-110)validate_format_compliance(147-155)validate_format_compliance(147-148)validate_format_compliance(214-233)validate_format_compliance(214-215)TensorFrameBuffer(93-107)AllocatedVideoBufferFrameBuffer(135-145)wrap_in_entity(157-199)wrap_in_entity(157-158)wrap_in_entity(235-272)wrap_in_entity(235-236)AllocatedTensorFrameBuffer(201-212)operators/advanced_network_media/advanced_network_media_tx/adv_network_media_tx.cpp (4)
entity(89-105)entity(89-89)entity(113-129)entity(113-113)
operators/advanced_network_media/common/frame_buffer.cpp (2)
operators/advanced_network_media/common/frame_buffer.h (4)
VideoBufferFrameBuffer(117-135)TensorFrameBuffer(141-160)AllocatedVideoBufferFrameBuffer(168-202)AllocatedTensorFrameBuffer(210-247)operators/advanced_network_media/advanced_network_media_tx/adv_network_media_tx.cpp (4)
entity(89-105)entity(89-89)entity(113-129)entity(113-113)
operators/advanced_network_media/advanced_network_media_rx/media_frame_assembler.h (5)
operators/advanced_network_media/advanced_network_media_rx/frame_provider.h (2)
holoscan(12-51)IFrameProvider(22-49)operators/advanced_network_media/common/frame_buffer.h (2)
holoscan(34-65)FrameBufferBase(40-64)operators/advanced_network_media/advanced_network_media_rx/memory_copy_strategies.h (5)
detail(19-367)MemoryCopyStrategyDetector(112-238)IMemoryCopyStrategy(37-325)CopyStrategy(24-366)CopyStrategy(68-107)operators/advanced_network_media/advanced_network_media_rx/frame_assembly_controller.h (2)
StateEvent(39-284)FrameAssemblyController(100-247)operators/advanced_network_media/advanced_network_media_rx/frame_assembly_controller.cpp (3)
FrameAssemblyController(25-38)reset(113-127)reset(113-113)
operators/advanced_network_media/advanced_network_media_rx/network_burst_processor.h (5)
operators/advanced_network_media/advanced_network_media_rx/frame_provider.h (1)
holoscan(12-51)operators/advanced_network_media/advanced_network_media_rx/media_frame_assembler.h (2)
holoscan(19-346)MediaFrameAssembler(91-287)operators/advanced_network_media/advanced_network_media_rx/network_burst_processor.cpp (5)
NetworkBurstProcessor(12-18)process_burst(20-52)process_burst(20-20)extract_packet_data(54-125)extract_packet_data(54-55)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.h (1)
shared_ptr(531-542)operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.cpp (4)
burst(345-390)burst(345-345)burst(476-504)burst(476-476)
operators/advanced_network_media/advanced_network_media_tx/python/adv_network_media_tx_pydoc.hpp (2)
operators/advanced_network_media/advanced_network_media_tx/adv_network_media_tx.cpp (6)
AdvNetworkMediaTxOp(271-272)AdvNetworkMediaTxOp(274-279)initialize(281-290)initialize(281-281)setup(292-305)setup(292-292)operators/advanced_network_media/advanced_network_media_tx/adv_network_media_tx.h (1)
AdvNetworkMediaTxOp(36-68)
operators/advanced_network_media/common/adv_network_media_logging.h (2)
operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.cpp (2)
ENABLE_STATISTICS_LOGGING(531-635)ANM_LOG_INFO(101-159)operators/advanced_network_media/advanced_network_media_tx/adv_network_media_tx.cpp (1)
ANM_LOG_INFO(54-81)
🪛 Clang (14.0.6)
operators/advanced_network_media/common/rtp_params.h
[error] 21-21: 'cstdint' file not found
(clang-diagnostic-error)
applications/adv_networking_media_player/cpp/adv_networking_media_player.cpp
[error] 18-18: 'fstream' file not found
(clang-diagnostic-error)
operators/advanced_network_media/common/video_parameters.h
[error] 21-21: 'string' file not found
(clang-diagnostic-error)
applications/adv_networking_media_sender/cpp/adv_networking_media_sender.cpp
[error] 17-17: 'assert.h' file not found
(clang-diagnostic-error)
operators/advanced_network_media/advanced_network_media_rx/python/adv_network_media_rx_pydoc.hpp
[error] 21-21: 'string' file not found
(clang-diagnostic-error)
operators/advanced_network_media/advanced_network_media_tx/adv_network_media_tx.cpp
[error] 18-18: 'advanced_network/common.h' file not found
(clang-diagnostic-error)
operators/advanced_network_media/advanced_network_media_rx/frame_assembly_controller.h
[error] 9-9: 'memory' file not found
(clang-diagnostic-error)
operators/advanced_network_media/advanced_network_media_rx/frame_provider.h
[error] 9-9: 'memory' file not found
(clang-diagnostic-error)
operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.h
[error] 21-21: 'holoscan/holoscan.hpp' file not found
(clang-diagnostic-error)
operators/advanced_network_media/advanced_network_media_rx/memory_copy_strategies.h
[error] 9-9: 'memory' file not found
(clang-diagnostic-error)
operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.cpp
[error] 18-18: 'cassert' file not found
(clang-diagnostic-error)
operators/advanced_network_media/advanced_network_media_tx/adv_network_media_tx.h
[error] 21-21: 'memory' file not found
(clang-diagnostic-error)
operators/advanced_network_media/common/frame_buffer.h
[error] 20-20: 'memory' file not found
(clang-diagnostic-error)
operators/advanced_network_media/advanced_network_media_rx/media_frame_assembler.h
[error] 9-9: 'memory' file not found
(clang-diagnostic-error)
operators/advanced_network_media/advanced_network_media_rx/network_burst_processor.h
[error] 9-9: 'memory' file not found
(clang-diagnostic-error)
operators/advanced_network_media/advanced_network_media_tx/python/adv_network_media_tx_pydoc.hpp
[error] 21-21: 'string' file not found
(clang-diagnostic-error)
operators/advanced_network_media/common/adv_network_media_common.h
[error] 21-21: 'cstdint' file not found
(clang-diagnostic-error)
operators/advanced_network_media/common/adv_network_media_logging.h
[error] 14-14: 'holoscan/logger/logger.hpp' file not found
(clang-diagnostic-error)
🪛 LanguageTool
applications/adv_networking_media_sender/README.md
[uncategorized] ~162-~162: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...d) - System tuning as described in the [High Performance Networking tutorial](../../tutorials/hi...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[uncategorized] ~489-~489: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...ed system tuning guidelines**, see the [High Performance Networking Tutorial](../../tutorials/hi...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[uncategorized] ~524-~524: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...nd setup ### Additional Resources - **[High Performance Networking Tutorial](../../tutorials/hi...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
operators/advanced_network_media/README.md
[uncategorized] ~844-~844: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...uirements > [!IMPORTANT] > Review the [High Performance Networking tutorial](../../tutorials/hi...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[uncategorized] ~849-~849: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...SDK - System tuning as described in the High Performance Networking tutorial - Sufficient memory...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
applications/adv_networking_media_player/README.md
[uncategorized] ~159-~159: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...d) - System tuning as described in the [High Performance Networking tutorial](../../tutorials/hi...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[uncategorized] ~463-~463: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...ed system tuning guidelines**, see the [High Performance Networking Tutorial](../../tutorials/hi...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[uncategorized] ~483-~483: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...nd setup ### Additional Resources - **[High Performance Networking Tutorial](../../tutorials/hi...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
🪛 markdownlint-cli2 (0.18.1)
applications/adv_networking_media_sender/README.md
144-144: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
233-233: Blank line inside blockquote
(MD028, no-blanks-blockquote)
operators/advanced_network_media/README.md
16-16: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
19-19: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
23-23: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
47-47: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
51-51: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
54-54: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
152-152: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
169-169: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
188-188: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
215-215: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
231-231: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
600-600: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
619-619: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
636-636: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
667-667: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
686-686: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
694-694: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
applications/adv_networking_media_player/README.md
107-107: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
118-118: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
122-122: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
130-130: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
135-135: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
245-245: Blank line inside blockquote
(MD028, no-blanks-blockquote)
🪛 Ruff (0.14.4)
applications/adv_networking_media_player/python/adv_networking_media_player.py
73-73: Consider moving this statement to an else block
(TRY300)
75-75: Do not catch blind exception: Exception
(BLE001)
85-85: Consider moving this statement to an else block
(TRY300)
86-86: Do not catch blind exception: Exception
(BLE001)
88-88: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
89-89: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
92-92: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
93-93: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
107-107: Do not catch blind exception: Exception
(BLE001)
108-108: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
117-117: Do not catch blind exception: Exception
(BLE001)
147-147: Do not catch blind exception: Exception
(BLE001)
148-148: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
165-165: Do not catch blind exception: Exception
(BLE001)
166-166: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
176-176: Do not catch blind exception: Exception
(BLE001)
177-177: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
211-211: Do not catch blind exception: Exception
(BLE001)
212-212: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
222-222: Do not catch blind exception: Exception
(BLE001)
applications/adv_networking_media_sender/python/adv_networking_media_sender.py
73-73: Consider moving this statement to an else block
(TRY300)
75-75: Do not catch blind exception: Exception
(BLE001)
85-85: Consider moving this statement to an else block
(TRY300)
86-86: Do not catch blind exception: Exception
(BLE001)
88-88: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
89-89: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
92-92: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
93-93: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
107-107: Do not catch blind exception: Exception
(BLE001)
108-108: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
117-117: Do not catch blind exception: Exception
(BLE001)
131-131: Do not catch blind exception: Exception
(BLE001)
143-143: Do not catch blind exception: Exception
(BLE001)
144-144: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
154-154: Do not catch blind exception: Exception
(BLE001)
155-155: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
161-161: Do not catch blind exception: Exception
(BLE001)
162-162: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
171-171: Do not catch blind exception: Exception
(BLE001)
172-172: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
206-206: Do not catch blind exception: Exception
(BLE001)
207-207: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
217-217: Do not catch blind exception: Exception
(BLE001)
applications/adv_networking_media_player/python/adv_networking_media_player.py
Show resolved
Hide resolved
applications/adv_networking_media_sender/cpp/adv_networking_media_sender.cpp
Outdated
Show resolved
Hide resolved
operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.cpp
Show resolved
Hide resolved
operators/advanced_network_media/advanced_network_media_rx/frame_assembly_controller.cpp
Show resolved
Hide resolved
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.h
Show resolved
Hide resolved
- Add AdvNetworkMediaRxOp for receiving media streams over Rivermax - Supports packet-to-frame conversion with ANO Burst processing - Configurable video formats, bit depths, and frame dimensions - Output as VideoBuffer or Tensor entities - Add AdvNetworkMediaTxOp for transmitting media streams over Rivermax - Processes VideoBuffer/Tensor inputs for network transmission - Configurable network interface and queue management - Support for various video formats Features: - SMPTE 2110 compliance for professional media over IP - GPU acceleration and GPUDirect support - Low latency optimizations - Python bindings for both operators These operators build upon the Advanced Network library to provide specialized functionality for broadcast and media streaming use cases requiring strict timing and high throughput performance. Signed-off-by: Rony Rado <[email protected]>
- Add high-performance media streaming application built on Advanced Network Media Tx operator - Utilizes AdvNetworkMediaTxOp for media transmission over Rivermax - Integrates with Advanced Network Manager for optimized network resource management - SMPTE 2110 compliant for professional broadcast applications - Real-time transmission of media files with precise timing control - Support multiple video formats and resolutions - RGB888, YUV420, NV12 and other common video formats - Configurable bit depths (8, 10, 12, 16-bit) - Multiple resolution support up to 4K and beyond - GPU acceleration with GPUDirect for zero-copy operations * Implement dual language support - C++ implementation for maximum performance - Python implementation for ease of use and development * Support professional broadcast features - Frame-accurate timing for live streaming applications - Looping playback for continuous streaming - VideoStreamReplayer integration for file-based sources Pipeline: VideoStreamReplayer → AdvNetworkMediaTxOp → Advanced Network Manager → Network Interface This application demonstrates how to use the Advanced Network Media operators for professional-grade media transmission in broadcast and media production environments requiring ultra-low latency and high throughput performance. Signed-off-by: Rony Rado <[email protected]>
- Add high-performance media receiving application built on Advanced Network Media Rx operator - Utilizes AdvNetworkMediaRxOp for professional media reception over Rivermax - Integrates with Advanced Network Manager for optimized network resource management - SMPTE 2110 compliant for professional broadcast applications - Real-time reception and processing of media streams with ultra-low latency - Support flexible output modes and format handling - Real-time visualization using HolovizOp for live monitoring - File output capability for recording and analysis - Format conversion support for optimal display - Support multiple video formats and resolutions - RGB888, YUV420, NV12, RGBA and other common video formats - Configurable bit depths (8, 10, 12, 16-bit) - Multiple resolution support up to 4K and beyond - GPU acceleration with GPUDirect for zero-copy operations - Implement dual language support - C++ implementation for maximum performance - Python implementation for ease of use and development Pipeline: Network Interface → Advanced Network Manager → AdvNetworkMediaRxOp → [FormatConverter] → HolovizOp/FramesWriter This application demonstrates how to use the Advanced Network Media operators for professional-grade media reception in broadcast and media production environments requiring ultra-low latency and high throughput performance. Signed-off-by: Rony Rado <[email protected]>
…configurable thresholds
- Add adaptive burst dropping system for Rivermax burst pool management
- Implements capacity-aware burst dropping to prevent memory pool exhaustion
- Configurable thresholds for warning (25%), critical (10%), and recovery (50%) levels
- Critical threshold mode drops new bursts when pool capacity falls below threshold
- Automatic recovery when pool capacity returns to healthy levels
- Add comprehensive pool capacity monitoring and statistics
- Extend YAML configuration support for burst pool adaptive dropping
- New "burst_pool_adaptive_dropping" configuration section
- Configurable enabled/disabled flag and threshold percentages
This enhancement prevents memory pool exhaustion in high-throughput ANO Rivermax
operations by intelligently dropping incoming bursts when system capacity
is critically low, ensuring system stability while maintaining optimal
performance under normal operating conditions.
Signed-off-by: Rony Rado <[email protected]>
Lint fixes Signed-off-by: Rony Rado <[email protected]>
- Install holoscan python SDK - Install libvulkan for holoviz operator - Install xvfb and x11vnc for headless servers Signed-off-by: Rony Rado <[email protected]>
8e5d16c to
8df7a2f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
49 files reviewed, 8 comments
Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format
| static int retry_attempts = 0; // Count how many cycles frame has been pending | ||
| static int dropped_frames = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Static variables in member functions create global state that persists across all operator instances. Consider using member variables in the impl class instead to ensure per-instance state isolation.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| static int not_available_count = 0; | ||
| static int sent = 0; | ||
| static int err = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Same issue as in process_input - static variables create shared state across all operator instances. Move these to member variables for proper encapsulation.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
applications/adv_networking_media_player/adv_networking_media_player.yaml
Show resolved
Hide resolved
| if (gap > kRtpSequenceGapWraparoundThreshold && (gap & (gap - 1)) == 0) { | ||
| statistics_.buffer_overflow_errors++; | ||
| ANM_FRAME_TRACE( | ||
| "Frame {}: Potential RX buffer wraparound detected: RTP sequence gap {} " | ||
| "(2^{}) - processing pipeline too slow, cannot keep up with incoming data rate", | ||
| statistics_.current_frame_number, | ||
| gap, | ||
| __builtin_ctz(gap)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Power-of-2 check logic may incorrectly classify gaps. gap & (gap - 1) == 0 only validates power-of-2 for positive integers, but when gap is negative (due to sequence wraparound), this check fails. Need to handle negative gaps and wraparound cases explicitly before power-of-2 validation.
| if (gap > kRtpSequenceGapWraparoundThreshold && (gap & (gap - 1)) == 0) { | |
| statistics_.buffer_overflow_errors++; | |
| ANM_FRAME_TRACE( | |
| "Frame {}: Potential RX buffer wraparound detected: RTP sequence gap {} " | |
| "(2^{}) - processing pipeline too slow, cannot keep up with incoming data rate", | |
| statistics_.current_frame_number, | |
| gap, | |
| __builtin_ctz(gap)); | |
| // Handle wraparound cases first | |
| if (gap < 0) { | |
| // Likely sequence number wraparound, don't treat as buffer overflow | |
| ANM_FRAME_TRACE( | |
| "Frame {}: RTP sequence wraparound detected: expected {}, got {} (gap of {})", | |
| statistics_.current_frame_number, | |
| expected_seq, | |
| rtp_params.sequence_number, | |
| gap); | |
| } else if (gap > kRtpSequenceGapWraparoundThreshold && (gap & (gap - 1)) == 0) { | |
| statistics_.buffer_overflow_errors++; | |
| ANM_FRAME_TRACE( | |
| "Frame {}: Potential RX buffer wraparound detected: RTP sequence gap {} " | |
| "(2^{}) - processing pipeline too slow, cannot keep up with incoming data rate", | |
| statistics_.current_frame_number, | |
| gap, | |
| __builtin_ctz(gap)); |
| bool success = false; ///< Whether extraction was successful | ||
|
|
||
| /// Implicit conversion to bool for easy error checking | ||
| explicit operator bool() const { return success && payload != nullptr; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Conversion operator should be constexpr for compile-time evaluation when possible
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| mutable std::chrono::steady_clock::time_point last_capacity_warning_time_; | ||
| mutable std::chrono::steady_clock::time_point last_capacity_critical_time_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: std::chrono::steady_clock::time_point default-initializes to epoch or uninitialized state. First comparison in logging methods may produce unexpected time deltas. Initialize to std::chrono::steady_clock::now() in constructor or check for default value before subtraction
| Parameter<uint32_t> frame_width_; | ||
| Parameter<uint32_t> frame_height_; | ||
|
|
||
| AdvNetworkMediaTxOpImpl* pimpl_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Raw pointer ownership unclear. Consider std::unique_ptr<AdvNetworkMediaTxOpImpl> to express exclusive ownership and automatic cleanup on destruction.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| class IMemoryCopyStrategy; | ||
|
|
||
| /** | ||
| * @brief Main frame processing states | ||
| */ | ||
| enum class FrameState { | ||
| IDLE, // No active frame, awaiting first packet | ||
| RECEIVING_PACKETS, // Actively receiving and processing packets | ||
| ERROR_RECOVERY // Frame corrupted, waiting for recovery marker | ||
| }; | ||
|
|
||
| /** | ||
| * @brief State machine events that drive transitions | ||
| */ | ||
| enum class StateEvent { | ||
| PACKET_ARRIVED, // Regular packet received | ||
| MARKER_DETECTED, // M-bit packet received | ||
| COPY_EXECUTED, // Copy operation completed | ||
| CORRUPTION_DETECTED, // Frame corruption detected | ||
| RECOVERY_MARKER, // M-bit received during error recovery | ||
| STRATEGY_DETECTED, // Memory copy strategy detection completed | ||
| FRAME_COMPLETED // Frame processing finished | ||
| }; | ||
|
|
||
| // Forward declaration - enum defined in memory_copy_strategies.h | ||
| enum class CopyStrategy; | ||
|
|
||
| /** | ||
| * @brief Stride information for strided copy operations | ||
| */ | ||
| struct StrideInfo { | ||
| size_t stride_size = 0; // Stride between packet payloads | ||
| size_t payload_size = 0; // Size of each payload | ||
| }; | ||
|
|
||
| /** | ||
| * @brief Result of state machine transition | ||
| */ | ||
| struct StateTransitionResult { | ||
| bool success = false; // Whether transition succeeded | ||
| FrameState new_frame_state = FrameState::IDLE; // New state after transition | ||
| bool should_execute_copy = false; // Whether copy operation should be executed | ||
| bool should_complete_frame = false; // Whether frame completion should be triggered | ||
| bool should_emit_frame = false; // Whether frame should be emitted | ||
| bool should_allocate_new_frame = false; // Whether new frame should be allocated | ||
| bool should_skip_memory_copy_processing = | ||
| false; // Whether to skip memory copy processing (e.g., during recovery) | ||
| std::string error_message; // Error description if success=false | ||
| }; | ||
|
|
||
| /** | ||
| * @brief Assembly controller context (internal state) | ||
| */ | ||
| struct FrameAssemblyContext { | ||
| FrameState frame_state = FrameState::IDLE; | ||
| size_t frame_position = 0; // Current byte position in frame | ||
| std::shared_ptr<FrameBufferBase> current_frame; // Active frame buffer | ||
| }; | ||
|
|
||
| // Forward declaration - interface defined in memory_copy_strategies.h | ||
| class IMemoryCopyStrategy; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Duplicate forward declaration of IMemoryCopyStrategy on lines 25 and 85.
| class IMemoryCopyStrategy; | |
| /** | |
| * @brief Main frame processing states | |
| */ | |
| enum class FrameState { | |
| IDLE, // No active frame, awaiting first packet | |
| RECEIVING_PACKETS, // Actively receiving and processing packets | |
| ERROR_RECOVERY // Frame corrupted, waiting for recovery marker | |
| }; | |
| /** | |
| * @brief State machine events that drive transitions | |
| */ | |
| enum class StateEvent { | |
| PACKET_ARRIVED, // Regular packet received | |
| MARKER_DETECTED, // M-bit packet received | |
| COPY_EXECUTED, // Copy operation completed | |
| CORRUPTION_DETECTED, // Frame corruption detected | |
| RECOVERY_MARKER, // M-bit received during error recovery | |
| STRATEGY_DETECTED, // Memory copy strategy detection completed | |
| FRAME_COMPLETED // Frame processing finished | |
| }; | |
| // Forward declaration - enum defined in memory_copy_strategies.h | |
| enum class CopyStrategy; | |
| /** | |
| * @brief Stride information for strided copy operations | |
| */ | |
| struct StrideInfo { | |
| size_t stride_size = 0; // Stride between packet payloads | |
| size_t payload_size = 0; // Size of each payload | |
| }; | |
| /** | |
| * @brief Result of state machine transition | |
| */ | |
| struct StateTransitionResult { | |
| bool success = false; // Whether transition succeeded | |
| FrameState new_frame_state = FrameState::IDLE; // New state after transition | |
| bool should_execute_copy = false; // Whether copy operation should be executed | |
| bool should_complete_frame = false; // Whether frame completion should be triggered | |
| bool should_emit_frame = false; // Whether frame should be emitted | |
| bool should_allocate_new_frame = false; // Whether new frame should be allocated | |
| bool should_skip_memory_copy_processing = | |
| false; // Whether to skip memory copy processing (e.g., during recovery) | |
| std::string error_message; // Error description if success=false | |
| }; | |
| /** | |
| * @brief Assembly controller context (internal state) | |
| */ | |
| struct FrameAssemblyContext { | |
| FrameState frame_state = FrameState::IDLE; | |
| size_t frame_position = 0; // Current byte position in frame | |
| std::shared_ptr<FrameBufferBase> current_frame; // Active frame buffer | |
| }; | |
| // Forward declaration - interface defined in memory_copy_strategies.h | |
| class IMemoryCopyStrategy; | |
| // Forward declarations for internal implementation | |
| class IMemoryCopyStrategy; | |
| /** | |
| * @brief Main frame processing states | |
| */ | |
| enum class FrameState { | |
| IDLE, // No active frame, awaiting first packet | |
| RECEIVING_PACKETS, // Actively receiving and processing packets | |
| ERROR_RECOVERY // Frame corrupted, waiting for recovery marker | |
| }; | |
| /** | |
| * @brief State machine events that drive transitions | |
| */ | |
| enum class StateEvent { | |
| PACKET_ARRIVED, // Regular packet received | |
| MARKER_DETECTED, // M-bit packet received | |
| COPY_EXECUTED, // Copy operation completed | |
| CORRUPTION_DETECTED, // Frame corruption detected | |
| RECOVERY_MARKER, // M-bit received during error recovery | |
| STRATEGY_DETECTED, // Memory copy strategy detection completed | |
| FRAME_COMPLETED // Frame processing finished | |
| }; | |
| // Forward declaration - enum defined in memory_copy_strategies.h | |
| enum class CopyStrategy; | |
| /** | |
| * @brief Stride information for strided copy operations | |
| */ | |
| struct StrideInfo { | |
| size_t stride_size = 0; // Stride between packet payloads | |
| size_t payload_size = 0; // Size of each payload | |
| }; | |
| /** | |
| * @brief Result of state machine transition | |
| */ | |
| struct StateTransitionResult { | |
| bool success = false; // Whether transition succeeded | |
| FrameState new_frame_state = FrameState::IDLE; // New state after transition | |
| bool should_execute_copy = false; // Whether copy operation should be executed | |
| bool should_complete_frame = false; // Whether frame completion should be triggered | |
| bool should_emit_frame = false; // Whether frame should be emitted | |
| bool should_allocate_new_frame = false; // Whether new frame should be allocated | |
| bool should_skip_memory_copy_processing = | |
| false; // Whether to skip memory copy processing (e.g., during recovery) | |
| std::string error_message; // Error description if success=false | |
| }; | |
| /** | |
| * @brief Assembly controller context (internal state) | |
| */ | |
| struct FrameAssemblyContext { | |
| FrameState frame_state = FrameState::IDLE; | |
| size_t frame_position = 0; // Current byte position in frame | |
| std::shared_ptr<FrameBufferBase> current_frame; // Active frame buffer | |
| }; |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain@ronyrad, I'll help you review the fixes and resolve the open issues. Let me first gather information about the open review comments and recent changes. 🏁 Script executed: Length of output: 1698 🏁 Script executed: Length of output: 139259 @ronyrad, I'll check the recent changes and verify which issues have been resolved. Let me examine the latest commits and compare them against the open review comments. 🏁 Script executed: Length of output: 5388 🏁 Script executed: Length of output: 1766 🏁 Script executed: Length of output: 319 🏁 Script executed: Length of output: 975 @ronyrad Thanks for the push. I ran verification against your head branch (ronyrad/holohub @ ano_rivermax_update_mar_25/adv_network_media_operators_dev_01). Here’s the current status by issue: Verified fixed
Still needs attention (not yet fixed in the branch)
Notes
Would you like me to auto-resolve the threads corresponding to the items listed under “Verified fixed”? If yes, I’ll resolve only my own comments on those and leave the rest open with this summary for the remaining changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
♻️ Duplicate comments (9)
operators/advanced_network_media/advanced_network_media_tx/adv_network_media_tx.cpp (2)
144-145: Convert static counters to instance members (previously flagged).These static variables create shared state across all operator instances, causing one operator's retry logic to interfere with another's. This was flagged in previous reviews but remains unresolved.
Move
retry_attemptsanddropped_framestoAdvNetworkMediaTxOpImplmember variables:class AdvNetworkMediaTxOpImpl { public: ... private: AdvNetworkMediaTxOp& parent_; + int retry_attempts_ = 0; + int dropped_frames_ = 0; }; void AdvNetworkMediaTxOpImpl::process_input(InputContext& op_input) { - static int retry_attempts = 0; - static int dropped_frames = 0; if (pending_tx_frame_) { - retry_attempts++; + retry_attempts_++; - if (retry_attempts >= MAX_RETRY_ATTEMPTS_BEFORE_DROP) { - dropped_frames++; + if (retry_attempts_ >= MAX_RETRY_ATTEMPTS_BEFORE_DROP) { + dropped_frames_++; ANM_LOG_ERROR(... - retry_attempts, - dropped_frames); + retry_attempts_, + dropped_frames_); - retry_attempts = 0; + retry_attempts_ = 0; } else { ANM_STATS_TRACE(... - parent_.queue_id_.get(), port_id_, retry_attempts); + parent_.queue_id_.get(), port_id_, retry_attempts_); return; } } ... - retry_attempts = 0; + retry_attempts_ = 0; }
209-211: Convert static counters to instance members (previously flagged).These static variables are shared across operator instances, breaking statistics isolation. This was identified in previous reviews but hasn't been fixed.
Move
not_available_count,sent, anderrtoAdvNetworkMediaTxOpImplmember variables:class AdvNetworkMediaTxOpImpl { public: ... private: AdvNetworkMediaTxOp& parent_; int retry_attempts_ = 0; int dropped_frames_ = 0; + int not_available_count_ = 0; + int sent_count_ = 0; + int error_count_ = 0; }; void AdvNetworkMediaTxOpImpl::process_output(OutputContext& op_output) { - static int not_available_count = 0; - static int sent = 0; - static int err = 0; ... if (!ano::is_tx_burst_available(cur_msg_)) { std::this_thread::sleep_for(...); - if (++not_available_count == DISPLAY_WARNING_AFTER_BURST_NOT_AVAILABLE) { + if (++not_available_count_ == DISPLAY_WARNING_AFTER_BURST_NOT_AVAILABLE) { ANM_LOG_ERROR(... - sent, - err); - not_available_count = 0; - err++; + sent_count_, + error_count_); + not_available_count_ = 0; + error_count_++; } return; } - not_available_count = 0; + not_available_count_ = 0; ... if (ret != Status::SUCCESS) { ANM_LOG_ERROR(...); ano::free_tx_burst(cur_msg_); - err++; + error_count_++; } else { - sent++; + sent_count_++; } cur_msg_ = nullptr; ANM_STATS_TRACE(... - sent, - err); + sent_count_, + error_count_); }applications/adv_networking_media_player/adv_networking_media_player.yaml (1)
37-38: Critical: CPU buffer size too small for RTP/UDP headers.The
buf_size: 20forData_RX_CPUis insufficient for typical RTP/UDP/IP headers, which require at minimum 42 bytes (20 IP + 8 UDP + 12 RTP base). With HDS enabled (line 85), header truncation will occur, causing assembly failures.Apply this diff:
num_bufs: 432000 - buf_size: 20 + buf_size: 64applications/adv_networking_media_sender/python/CMakeLists.txt (1)
16-16: Fix copy-paste error in comment.The comment references "media_player" but this file configures the "media_sender" application.
Apply this diff:
-# Copy adv_networking_media_player application file +# Copy adv_networking_media_sender application fileoperators/advanced_network_media/advanced_network_media_tx/adv_network_media_tx.h (1)
36-68: Considerstd::unique_ptrfor the PIMPL to clarify ownership.
AdvNetworkMediaTxOpImpl* pimpl_implies exclusive ownership but doesn’t express lifetime management. If it doesn’t conflict with existing patterns, changing this tostd::unique_ptr<AdvNetworkMediaTxOpImpl>(with construction ininitialize/ctor and defaulted destructor) would make ownership and cleanup explicit and exception-safe.operators/advanced_network_media/advanced_network_media_rx/media_frame_assembler.cpp (2)
108-130: Memory type changes don't refresh strided strategies.When
configure_memory_typesis called with an active strided strategy, the code only recreates contiguous strategies (lines 121-124) but leaves strided strategies with their stalecudaMemcpyKind. This causes wrong transfer direction (e.g., host→host instead of host→device) and data corruption.Apply this diff:
// If memory copy strategy is already set up, we may need to recreate it with new memory types if (current_copy_strategy_ && !memory_copy_strategy_detection_active_) { CopyStrategy strategy_type = current_copy_strategy_->get_type(); if (strategy_type == CopyStrategy::CONTIGUOUS) { current_copy_strategy_ = StrategyFactory::create_contiguous_strategy(source_type, destination_type); + setup_memory_copy_strategy(std::move(current_copy_strategy_)); + } else if (strategy_type == CopyStrategy::STRIDED) { + // Strided strategy needs redetection since we don't have stride info here + current_copy_strategy_.reset(); + force_memory_copy_strategy_redetection(); + return; } - // Note: For strided memory copy strategy, we would need the stride info, so we'd trigger - // redetection - - setup_memory_copy_strategy(std::move(current_copy_strategy_)); } }
393-411: First packet is always rejected as corrupt.When the first RTP packet arrives after reset,
get_current_frame()returnsnullptr(line 394), causingvalidate_packet_integrityto returnfalse. This triggersStateEvent::CORRUPTION_DETECTED, sending the assembler into error recovery before any frame can start.Apply this diff:
bool MediaFrameAssembler::validate_packet_integrity(const RtpParams& rtp_params) { auto frame = assembly_controller_->get_current_frame(); if (!frame) { - return false; + // No frame allocated yet (first packet of a stream): allow the state machine + // to allocate one instead of treating this as corruption. + return true; } int64_t bytes_left = frame->get_size() - assembly_controller_->get_frame_position();operators/advanced_network_media/advanced_network_media_rx/frame_assembly_controller.h (2)
9-11: Add missing<vector>include.The header uses
std::vector<StateEvent>on line 281 but does not include<vector>. This issue was previously flagged and remains unresolved.Apply this diff:
+#include <vector> #include <memory> #include <string> #include <functional>
25-25: Remove duplicate forward declaration.
IMemoryCopyStrategyis forward-declared twice (lines 25 and 85). This issue was previously flagged and remains unresolved.Apply this diff:
// Forward declaration - interface defined in memory_copy_strategies.h -class IMemoryCopyStrategy;Also applies to: 84-86
🧹 Nitpick comments (15)
operators/advanced_network_media/advanced_network_media_rx/metadata.json (1)
24-30: Minor: Clean up indentation in requirements section.The
operatorsarray (line 25) has inconsistent indentation relative to its parentrequirementsobject. Consider aligning it properly for consistency.Apply this diff to fix indentation:
"requirements": { - "operators": [{ + "operators": [{ "name": "advanced_network", "version": "1.4" } ] }operators/advanced_network_media/README.md (2)
152-152: Specify language identifiers for fenced code blocks.The following fenced code blocks lack language specifiers, which should be included for syntax highlighting and markdown linting compliance:
- Line 152: Plain-text flow diagram (use
```textor```markdown)- Line 169: Plain-text flow diagram (use
```text)- Line 188: Plain-text flow diagram (use
```text)- Line 215: Plain-text flow diagram (use
```text)- Line 231: Plain-text flow diagram (use
```text)- Line 600: Plain-text flow diagram (use
```text)- Line 619: Plain-text flow diagram (use
```text)- Line 636: Plain-text flow diagram (use
```text)- Line 667: Plain-text flow diagram (use
```text)- Line 686: Plain-text flow diagram (use
```text)- Line 694: Plain-text flow diagram (use
```text)Example fix for line 152:
### 1. Network Layer → Hardware Acceleration -``` +```text Network Interface (ConnectX NIC) → Rivermax Hardware Acceleration ├── IPO (Inline Packet Ordering) Receiver Service [OR]Also applies to: 169-169, 188-188, 215-215, 231-231, 600-600, 619-619, 636-636, 667-667, 686-686, 694-694
844-844: Hyphenate compound adjectives modifying nouns.Lines 844 and 849 use "High Performance Networking" which should be hyphenated as "High-Performance Networking" when it functions as a compound adjective preceding the noun (e.g., "High-Performance Networking tutorial").
Apply this diff:
-Review the [High Performance Networking tutorial](../../tutorials/high_performance_networking/README.md) for guided instructions to configure your system and test the Advanced Network Media operators. +Review the [High-Performance Networking tutorial](../../tutorials/high_performance_networking/README.md) for guided instructions to configure your system and test the Advanced Network Media operators.-System tuning as described in the High Performance Networking tutorial +System tuning as described in the High-Performance Networking tutorialAlso applies to: 849-849
operators/advanced_network_media/advanced_network_media_tx/CMakeLists.txt (1)
18-19: Reconcile inconsistent find_package behavior with parent CMakeLists.Line 18 uses
find_package(holoscan 2.6 REQUIRED...)whereas the parent CMakeLists (line 19 in operators/advanced_network_media/CMakeLists.txt) usesQUIETwith a conditional check. Since this subdirectory is only added if the parent finds holoscan, the REQUIRED flag here is redundant but not problematic. For clarity and consistency, consider usingQUIETwithif(holoscan_FOUND)or removing the redundant find_package entirely if it's guaranteed to be found at this point.operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp (1)
415-416: Log a warning when clamping burst_out_size_.The code silently clamps
burst_out_size_toMAX_PKT_IN_BURSTwhen invalid. Consider logging a warning to alert developers/operators of the configuration issue:if (burst_out_size_ > RivermaxBurst::MAX_PKT_IN_BURST || burst_out_size_ == 0) + HOLOSCAN_LOG_WARN("Invalid burst_out_size {} clamped to {}", burst_out_size_, RivermaxBurst::MAX_PKT_IN_BURST); burst_out_size_ = RivermaxBurst::MAX_PKT_IN_BURST;applications/adv_networking_media_player/README.md (1)
107-112: Optional: Consider minor markdown formatting improvements.The documentation is excellent and comprehensive. A few optional style refinements flagged by linters:
- Line 107-112: Add language identifier to fenced code block (e.g.,
text)- Lines 118, 122, 130, 135: Consider using proper headings (
####) instead of bold emphasis- The "High Performance Networking" references could use hyphens when used as compound adjectives, though this is a minor style preference
These are purely cosmetic and can be deferred.
Also applies to: 118-118, 122-122, 130-130, 135-135
applications/adv_networking_media_sender/cpp/adv_networking_media_sender.cpp (1)
17-19: Remove unused includes.Lines 17-19 include
assert.h,sys/time.h, andarpa/inet.h, but none of these are used in the implementation. Remove them for cleaner code.Apply this diff:
-#include <assert.h> -#include <sys/time.h> -#include <arpa/inet.h> - #include "holoscan/holoscan.hpp"applications/adv_networking_media_sender/python/adv_networking_media_sender.py (1)
75-95: Optional: Consider improving exception handling and logging.The static analysis tool suggests several improvements to exception handling:
- Use
logging.exception()instead oflogging.error()in exception handlers to automatically include traceback- Consider catching more specific exception types instead of broad
Exceptionwhere possible- Some
returnstatements in exception handlers could be moved toelseblocksThese are purely stylistic improvements for better debugging and code clarity. The current implementation is functionally correct and provides good error diagnostics.
Also applies to: 107-109, 131-136, 143-145, 154-156, 161-163, 171-173, 206-211, 217-218
operators/advanced_network_media/advanced_network_media_rx/network_burst_processor.h (1)
9-15: Tighten header surface: fix doc comment and trim unused includes.
- The comment on Line 29 says “Implicit conversion to bool”, but the operator is declared
explicit. Either drop “Implicit” or adjust the comment so it matches the actual semantics.holoscan/logger/logger.hppandadvanced_network/managers/rivermax/rivermax_ano_data_types.hdon’t appear to be needed for the declarations in this header (they’re only used in the.cpp). Consider forward-declaringMediaFrameAssemblerand keeping the heavier includes in the implementation file to keep this public header lighter.Also applies to: 24-31
operators/advanced_network_media/advanced_network_media_rx/network_burst_processor.cpp (1)
12-55: Burst processing and RTP extraction look solid; just drop the unused alias.The range checks, null-pointer guards, and RTP-parse error handling in
process_burstandextract_packet_dataare all sound and should behave well under malformed bursts. One small nit: thenamespace ano = holoscan::advanced_network;alias on Line 12 is never used and can be removed to avoid “unused alias” warnings.Also applies to: 58-129
applications/adv_networking_media_player/cpp/adv_networking_media_player.cpp (1)
49-262: FramesWriterOp and C++ media-player composition look robust; only minor perf nit.The frame writer’s initialization, D2H handling with
CUDA_TRY, frame-limit guard (>=), and detailed error diagnostics are all solid, and the App’s composition logic around RX enablement and visualization/file-output selection is coherent. If you ever care about throughput, you could skip resizinghost_buffer_and the extra flush for purely host-backed inputs (kHost/kSystem), but that’s an optimization, not a correctness issue.Also applies to: 266-337
operators/advanced_network_media/common/video_parameters.cpp (1)
23-52: Video parameter utilities look correct; consider explicit includes and expanding format mappings.
- The integer-based
calculate_frame_sizeimplementation with rounding up and 64‑bit arithmetic is a solid fix for under-allocation and overflow concerns across all supported sampling/bit-depth combinations.get_video_sampling_formatrelies onstd::transformandstd::tolower; it would be slightly safer to include<algorithm>and<cctype>directly in this translation unit (or the header) instead of depending on transitive includes.get_expected_gxf_video_formatcurrently only maps(RGB, 8)and(YCbCr_4_2_0, 8)explicitly, returningGXF_VIDEO_FORMAT_CUSTOMfor everything else. That’s safe, but if you plan to support 10/12‑bit or other sampling modes in GXF, this is the central place to extend those mappings (or at least document that only 8‑bit RGB/NV12 are currently recognized).Also applies to: 54-79, 81-119, 121-144
operators/advanced_network_media/advanced_network_media_rx/memory_copy_strategies.h (1)
112-192: Make detector and strategy classes explicitly non‑copyable to avoid shallow state copies
MemoryCopyStrategyDetector,ContiguousMemoryCopyStrategy, andStridedMemoryCopyStrategyall maintain internal pointer/state (payload pointers, accumulated sizes, stride state). Copying these types via the default-generated copy constructor/assignment would shallow‑copy that state and is unlikely to be intended.Consider explicitly deleting copy operations (and optionally allowing moves) for these types:
class MemoryCopyStrategyDetector { public: + MemoryCopyStrategyDetector() = default; + MemoryCopyStrategyDetector(const MemoryCopyStrategyDetector&) = delete; + MemoryCopyStrategyDetector& operator=(const MemoryCopyStrategyDetector&) = delete; + MemoryCopyStrategyDetector(MemoryCopyStrategyDetector&&) = default; + MemoryCopyStrategyDetector& operator=(MemoryCopyStrategyDetector&&) = default; static constexpr size_t DETECTION_PACKET_COUNT = 4; ... }; class ContiguousMemoryCopyStrategy : public IMemoryCopyStrategy { public: ... + ContiguousMemoryCopyStrategy(const ContiguousMemoryCopyStrategy&) = delete; + ContiguousMemoryCopyStrategy& operator=(const ContiguousMemoryCopyStrategy&) = delete; + ContiguousMemoryCopyStrategy(ContiguousMemoryCopyStrategy&&) = default; + ContiguousMemoryCopyStrategy& operator=(ContiguousMemoryCopyStrategy&&) = default; ... }; class StridedMemoryCopyStrategy : public IMemoryCopyStrategy { public: ... + StridedMemoryCopyStrategy(const StridedMemoryCopyStrategy&) = delete; + StridedMemoryCopyStrategy& operator=(const StridedMemoryCopyStrategy&) = delete; + StridedMemoryCopyStrategy(StridedMemoryCopyStrategy&&) = default; + StridedMemoryCopyStrategy& operator=(StridedMemoryCopyStrategy&&) = default; ... };This locks in the intended ownership/usage pattern and prevents subtle bugs if someone later copies these objects by value.
Also applies to: 197-238, 243-325
operators/advanced_network_media/advanced_network_media_rx/frame_assembly_controller.h (2)
176-176: Remove redundantprivate:access specifier.The class has two consecutive
private:labels (lines 176 and 235). The second one is redundant since the access level remains private throughout.Apply this diff:
void release_current_frame(); - private: /** * @brief Validate frame bounds for operationsAlso applies to: 235-235
244-246: Consider adding accessors for statistics members.The controller tracks
packets_processed_,frames_completed_, anderror_recoveries_but provides no public accessors. Consider adding getters to expose these metrics for monitoring, debugging, and telemetry.Example methods to add:
size_t get_packets_processed() const { return packets_processed_; } size_t get_frames_completed() const { return frames_completed_; } size_t get_error_recoveries() const { return error_recoveries_; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (62)
applications/CMakeLists.txt(1 hunks)applications/adv_networking_media_player/CMakeLists.txt(1 hunks)applications/adv_networking_media_player/README.md(1 hunks)applications/adv_networking_media_player/adv_networking_media_player.yaml(1 hunks)applications/adv_networking_media_player/cpp/CMakeLists.txt(1 hunks)applications/adv_networking_media_player/cpp/adv_networking_media_player.cpp(1 hunks)applications/adv_networking_media_player/cpp/metadata.json(1 hunks)applications/adv_networking_media_player/python/CMakeLists.txt(1 hunks)applications/adv_networking_media_player/python/adv_networking_media_player.py(1 hunks)applications/adv_networking_media_player/python/metadata.json(1 hunks)applications/adv_networking_media_sender/CMakeLists.txt(1 hunks)applications/adv_networking_media_sender/README.md(1 hunks)applications/adv_networking_media_sender/adv_networking_media_sender.yaml(1 hunks)applications/adv_networking_media_sender/cpp/CMakeLists.txt(1 hunks)applications/adv_networking_media_sender/cpp/adv_networking_media_sender.cpp(1 hunks)applications/adv_networking_media_sender/cpp/metadata.json(1 hunks)applications/adv_networking_media_sender/python/CMakeLists.txt(1 hunks)applications/adv_networking_media_sender/python/adv_networking_media_sender.py(1 hunks)applications/adv_networking_media_sender/python/metadata.json(1 hunks)operators/CMakeLists.txt(1 hunks)operators/advanced_network/Dockerfile(2 hunks)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/adv_network_rivermax_mgr.cpp(10 hunks)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp(10 hunks)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.h(10 hunks)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_config_manager.cpp(10 hunks)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_mgr_service.cpp(13 hunks)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_mgr_service.h(4 hunks)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_queue_configs.cpp(15 hunks)operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_queue_configs.h(3 hunks)operators/advanced_network_media/CMakeLists.txt(1 hunks)operators/advanced_network_media/README.md(1 hunks)operators/advanced_network_media/advanced_network_media_rx/CMakeLists.txt(1 hunks)operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.cpp(1 hunks)operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.h(1 hunks)operators/advanced_network_media/advanced_network_media_rx/frame_assembly_controller.cpp(1 hunks)operators/advanced_network_media/advanced_network_media_rx/frame_assembly_controller.h(1 hunks)operators/advanced_network_media/advanced_network_media_rx/frame_provider.h(1 hunks)operators/advanced_network_media/advanced_network_media_rx/media_frame_assembler.cpp(1 hunks)operators/advanced_network_media/advanced_network_media_rx/media_frame_assembler.h(1 hunks)operators/advanced_network_media/advanced_network_media_rx/memory_copy_strategies.cpp(1 hunks)operators/advanced_network_media/advanced_network_media_rx/memory_copy_strategies.h(1 hunks)operators/advanced_network_media/advanced_network_media_rx/metadata.json(1 hunks)operators/advanced_network_media/advanced_network_media_rx/network_burst_processor.cpp(1 hunks)operators/advanced_network_media/advanced_network_media_rx/network_burst_processor.h(1 hunks)operators/advanced_network_media/advanced_network_media_rx/python/CMakeLists.txt(1 hunks)operators/advanced_network_media/advanced_network_media_rx/python/adv_network_media_rx_pybind.cpp(1 hunks)operators/advanced_network_media/advanced_network_media_rx/python/adv_network_media_rx_pydoc.hpp(1 hunks)operators/advanced_network_media/advanced_network_media_tx/CMakeLists.txt(1 hunks)operators/advanced_network_media/advanced_network_media_tx/adv_network_media_tx.cpp(1 hunks)operators/advanced_network_media/advanced_network_media_tx/adv_network_media_tx.h(1 hunks)operators/advanced_network_media/advanced_network_media_tx/metadata.json(1 hunks)operators/advanced_network_media/advanced_network_media_tx/python/CMakeLists.txt(1 hunks)operators/advanced_network_media/advanced_network_media_tx/python/adv_network_media_tx_pybind.cpp(1 hunks)operators/advanced_network_media/advanced_network_media_tx/python/adv_network_media_tx_pydoc.hpp(1 hunks)operators/advanced_network_media/common/CMakeLists.txt(1 hunks)operators/advanced_network_media/common/adv_network_media_common.h(1 hunks)operators/advanced_network_media/common/adv_network_media_logging.h(1 hunks)operators/advanced_network_media/common/frame_buffer.cpp(1 hunks)operators/advanced_network_media/common/frame_buffer.h(1 hunks)operators/advanced_network_media/common/rtp_params.h(1 hunks)operators/advanced_network_media/common/video_parameters.cpp(1 hunks)operators/advanced_network_media/common/video_parameters.h(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (19)
- operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_config_manager.cpp
- operators/advanced_network/Dockerfile
- applications/adv_networking_media_sender/python/metadata.json
- applications/adv_networking_media_sender/cpp/CMakeLists.txt
- operators/advanced_network_media/advanced_network_media_rx/CMakeLists.txt
- applications/adv_networking_media_player/cpp/CMakeLists.txt
- operators/advanced_network_media/common/CMakeLists.txt
- operators/CMakeLists.txt
- applications/CMakeLists.txt
- applications/adv_networking_media_sender/cpp/metadata.json
- operators/advanced_network_media/advanced_network_media_rx/python/CMakeLists.txt
- operators/advanced_network_media/advanced_network_media_tx/metadata.json
- operators/advanced_network_media/advanced_network_media_tx/python/CMakeLists.txt
- applications/adv_networking_media_sender/adv_networking_media_sender.yaml
- applications/adv_networking_media_sender/CMakeLists.txt
- applications/adv_networking_media_player/CMakeLists.txt
- operators/advanced_network_media/advanced_network_media_rx/python/adv_network_media_rx_pybind.cpp
- applications/adv_networking_media_player/cpp/metadata.json
- operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.h
🧰 Additional context used
🧠 Learnings (7)
📚 Learning: 2025-10-30T19:04:41.239Z
Learnt from: bhashemian
Repo: nvidia-holoscan/holohub PR: 1203
File: applications/video_streaming/video_streaming_server/cpp/metadata.json:42-51
Timestamp: 2025-10-30T19:04:41.239Z
Learning: In the video_streaming application structure, umbrella metadata (applications/video_streaming/metadata.json) uses language-qualified mode names like "server_cpp" and "server_python" to distinguish between implementations, while component-specific metadata files (e.g., applications/video_streaming/video_streaming_server/cpp/metadata.json) use simple mode names like "server" since they are already scoped to a specific language implementation by their directory structure.
Applied to files:
applications/adv_networking_media_player/python/metadata.json
📚 Learning: 2025-10-22T16:21:10.281Z
Learnt from: cdinea
Repo: nvidia-holoscan/holohub PR: 1170
File: applications/video_streaming/video_streaming_client/cpp/streaming_client_demo.yaml:42-49
Timestamp: 2025-10-22T16:21:10.281Z
Learning: V4L2VideoCaptureOp in Holoscan SDK performs internal conversion from the camera's native pixel format (specified by the pixel_format parameter) to RGBA8888 output, regardless of the input format (e.g., YUYV, MJPEG). When using V4L2 as a source, downstream operators should expect RGBA8888 (4-channel) output format.
Applied to files:
operators/advanced_network_media/common/video_parameters.hoperators/advanced_network_media/common/video_parameters.cpp
📚 Learning: 2025-10-22T16:53:45.393Z
Learnt from: cdinea
Repo: nvidia-holoscan/holohub PR: 1170
File: operators/video_streaming/streaming_client_enhanced/python/CMakeLists.txt:16-24
Timestamp: 2025-10-22T16:53:45.393Z
Learning: The pybind11_add_holohub_module CMake macro in cmake/pybind11_add_holohub_module.cmake encapsulates all pybind11 setup internally, including finding pybind11, linking against holoscan::pybind11 conditionally, and linking the C++ operator target. Operator Python bindings in holohub should only call this macro without additional pybind11 setup.
Applied to files:
operators/advanced_network_media/CMakeLists.txtoperators/advanced_network_media/advanced_network_media_tx/python/adv_network_media_tx_pybind.cpp
📚 Learning: 2025-10-22T23:47:42.896Z
Learnt from: cdinea
Repo: nvidia-holoscan/holohub PR: 1170
File: applications/video_streaming/video_streaming_server/cpp/CMakeLists.txt:109-111
Timestamp: 2025-10-22T23:47:42.896Z
Learning: In the video streaming server application (applications/video_streaming/video_streaming_server/cpp/CMakeLists.txt), bundling libcudart.so.12 from the NGC operator binaries is intentional to ensure consistency with NGC binaries, even though the target links to CUDA::cudart.
Applied to files:
operators/advanced_network_media/CMakeLists.txt
📚 Learning: 2025-11-11T15:40:28.150Z
Learnt from: AndreasHeumann
Repo: nvidia-holoscan/holohub PR: 1220
File: applications/pipeline_visualization/cpp/create_tensor.hpp:21-22
Timestamp: 2025-11-11T15:40:28.150Z
Learning: In the pipeline_visualization application, FlatBuffers generated headers like tensor_generated.h can be included using the simplified path `#include <flatbuffers/tensor_generated.h>` because the CMake target pipeline_visualization_flatbuffers_schemas generates them and pipeline_visualization_flatbuffers_target exposes the correct include directories, which are inherited by targets that link against it.
Applied to files:
operators/advanced_network_media/common/frame_buffer.h
📚 Learning: 2025-10-22T16:33:55.411Z
Learnt from: cdinea
Repo: nvidia-holoscan/holohub PR: 1170
File: applications/video_streaming/video_streaming_client/python/streaming_client_demo_replayer.yaml:27-36
Timestamp: 2025-10-22T16:33:55.411Z
Learning: In the video_streaming bidirectional client applications (applications/video_streaming/video_streaming_client), the pipeline has two separate data paths: (1) Outgoing: source → format_converter → streaming_client INPUT (sends to server), and (2) Incoming: streaming_client OUTPUT → holoviz (receives from server). The format_converter prepares data for transmission and does NOT feed directly into holoviz visualization.
Applied to files:
applications/adv_networking_media_player/README.md
📚 Learning: 2025-11-12T10:24:18.508Z
Learnt from: ronyrad
Repo: nvidia-holoscan/holohub PR: 970
File: applications/adv_networking_media_player/python/adv_networking_media_player.py:163-164
Timestamp: 2025-11-12T10:24:18.508Z
Learning: In Holoscan Python applications, the `add_flow` method expects a set of tuples for port mappings, not a dictionary. The correct syntax is `self.add_flow(source_op, dest_op, {("output_port", "input_port")})` using curly braces with tuples. This matches the C++ API which uses `std::set<std::pair<std::string, std::string>>`. Multiple connections can be specified as `{("out1", "in1"), ("out2", "in2")}`.
Applied to files:
applications/adv_networking_media_player/python/adv_networking_media_player.py
🪛 Clang (14.0.6)
applications/adv_networking_media_sender/cpp/adv_networking_media_sender.cpp
[error] 17-17: 'assert.h' file not found
(clang-diagnostic-error)
operators/advanced_network_media/common/rtp_params.h
[error] 21-21: 'cstdint' file not found
(clang-diagnostic-error)
operators/advanced_network_media/advanced_network_media_tx/adv_network_media_tx.h
[error] 21-21: 'memory' file not found
(clang-diagnostic-error)
operators/advanced_network_media/common/video_parameters.h
[error] 21-21: 'string' file not found
(clang-diagnostic-error)
applications/adv_networking_media_player/cpp/adv_networking_media_player.cpp
[error] 18-18: 'fstream' file not found
(clang-diagnostic-error)
operators/advanced_network_media/advanced_network_media_tx/python/adv_network_media_tx_pydoc.hpp
[error] 21-21: 'string' file not found
(clang-diagnostic-error)
operators/advanced_network_media/advanced_network_media_rx/network_burst_processor.h
[error] 9-9: 'memory' file not found
(clang-diagnostic-error)
operators/advanced_network_media/advanced_network_media_rx/python/adv_network_media_rx_pydoc.hpp
[error] 21-21: 'string' file not found
(clang-diagnostic-error)
operators/advanced_network_media/common/adv_network_media_common.h
[error] 21-21: 'cstdint' file not found
(clang-diagnostic-error)
operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.h
[error] 21-21: 'holoscan/holoscan.hpp' file not found
(clang-diagnostic-error)
operators/advanced_network_media/common/frame_buffer.h
[error] 20-20: 'memory' file not found
(clang-diagnostic-error)
operators/advanced_network_media/advanced_network_media_rx/frame_assembly_controller.h
[error] 9-9: 'memory' file not found
(clang-diagnostic-error)
operators/advanced_network_media/advanced_network_media_tx/adv_network_media_tx.cpp
[error] 18-18: 'advanced_network/common.h' file not found
(clang-diagnostic-error)
operators/advanced_network_media/common/adv_network_media_logging.h
[error] 14-14: 'holoscan/logger/logger.hpp' file not found
(clang-diagnostic-error)
operators/advanced_network_media/advanced_network_media_rx/media_frame_assembler.h
[error] 9-9: 'memory' file not found
(clang-diagnostic-error)
operators/advanced_network_media/advanced_network_media_rx/memory_copy_strategies.h
[error] 9-9: 'memory' file not found
(clang-diagnostic-error)
operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.cpp
[error] 18-18: 'cassert' file not found
(clang-diagnostic-error)
operators/advanced_network_media/advanced_network_media_rx/frame_provider.h
[error] 9-9: 'memory' file not found
(clang-diagnostic-error)
🪛 LanguageTool
operators/advanced_network_media/README.md
[uncategorized] ~844-~844: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...uirements > [!IMPORTANT] > Review the [High Performance Networking tutorial](../../tutorials/hi...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[uncategorized] ~849-~849: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...SDK - System tuning as described in the High Performance Networking tutorial - Sufficient memory...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
applications/adv_networking_media_player/README.md
[uncategorized] ~159-~159: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...d) - System tuning as described in the [High Performance Networking tutorial](../../tutorials/hi...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[uncategorized] ~463-~463: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...ed system tuning guidelines**, see the [High Performance Networking Tutorial](../../tutorials/hi...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[uncategorized] ~483-~483: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...nd setup ### Additional Resources - **[High Performance Networking Tutorial](../../tutorials/hi...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
applications/adv_networking_media_sender/README.md
[uncategorized] ~162-~162: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...d) - System tuning as described in the [High Performance Networking tutorial](../../tutorials/hi...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[uncategorized] ~489-~489: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...ed system tuning guidelines**, see the [High Performance Networking Tutorial](../../tutorials/hi...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[uncategorized] ~524-~524: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...nd setup ### Additional Resources - **[High Performance Networking Tutorial](../../tutorials/hi...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
🪛 markdownlint-cli2 (0.18.1)
operators/advanced_network_media/README.md
16-16: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
19-19: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
23-23: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
47-47: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
51-51: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
54-54: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
152-152: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
169-169: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
188-188: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
215-215: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
231-231: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
600-600: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
619-619: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
636-636: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
667-667: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
686-686: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
694-694: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
applications/adv_networking_media_player/README.md
107-107: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
118-118: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
122-122: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
130-130: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
135-135: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
245-245: Blank line inside blockquote
(MD028, no-blanks-blockquote)
applications/adv_networking_media_sender/README.md
107-107: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
118-118: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
122-122: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
130-130: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
135-135: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
245-245: Blank line inside blockquote
(MD028, no-blanks-blockquote)
🪛 Ruff (0.14.5)
applications/adv_networking_media_sender/python/adv_networking_media_sender.py
73-73: Consider moving this statement to an else block
(TRY300)
75-75: Do not catch blind exception: Exception
(BLE001)
85-85: Consider moving this statement to an else block
(TRY300)
86-86: Do not catch blind exception: Exception
(BLE001)
88-88: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
89-89: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
92-92: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
93-93: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
107-107: Do not catch blind exception: Exception
(BLE001)
108-108: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
117-117: Do not catch blind exception: Exception
(BLE001)
131-131: Do not catch blind exception: Exception
(BLE001)
143-143: Do not catch blind exception: Exception
(BLE001)
144-144: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
154-154: Do not catch blind exception: Exception
(BLE001)
155-155: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
161-161: Do not catch blind exception: Exception
(BLE001)
162-162: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
171-171: Do not catch blind exception: Exception
(BLE001)
172-172: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
206-206: Do not catch blind exception: Exception
(BLE001)
207-207: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
217-217: Do not catch blind exception: Exception
(BLE001)
applications/adv_networking_media_player/python/adv_networking_media_player.py
73-73: Consider moving this statement to an else block
(TRY300)
75-75: Do not catch blind exception: Exception
(BLE001)
85-85: Consider moving this statement to an else block
(TRY300)
86-86: Do not catch blind exception: Exception
(BLE001)
88-88: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
89-89: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
92-92: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
93-93: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
107-107: Do not catch blind exception: Exception
(BLE001)
108-108: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
117-117: Do not catch blind exception: Exception
(BLE001)
147-147: Do not catch blind exception: Exception
(BLE001)
148-148: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
165-165: Do not catch blind exception: Exception
(BLE001)
166-166: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
176-176: Do not catch blind exception: Exception
(BLE001)
177-177: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
211-211: Do not catch blind exception: Exception
(BLE001)
212-212: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
222-222: Do not catch blind exception: Exception
(BLE001)
🔇 Additional comments (44)
operators/advanced_network_media/advanced_network_media_rx/metadata.json (1)
16-16: ✅ Critical tag category issue resolved.The previous concern about using an unapproved tag category has been addressed. The first tag is now correctly set to "Networking and Distributed Computing" per the approved category list.
operators/advanced_network_media/README.md (3)
1-363: Comprehensive and well-structured documentation. Excellent technical clarity.The RX data flow section (lines 84–363) provides outstanding detail with clear separation of concerns across network, manager, operator, and application layers. The Mermaid diagrams effectively communicate architecture, and the text descriptions accurately complement them. Zero-copy architecture principles are well-explained with appropriate emphasis on pointer-based optimization.
520-839: Excellent TX data flow documentation with balanced coverage of both service paths.The TX section clearly distinguishes between
MediaSenderZeroCopyServiceandMediaSenderServicewith appropriate use cases and performance tradeoffs. The decision flow diagram (lines 776–820) is particularly helpful for developers choosing the right mode. Configuration guidance is concrete and actionable.
365-519: Comprehensive data structure reference with clear inheritance and composition relationships.The class diagram effectively documents public data structures (BurstParams, RivermaxBurst, AnoBurstExtendedInfo, MediaFrameAssembler) and their interactions. Clear distinction between RX/TX frame buffers and RDK service classes aids understanding of the system boundaries.
operators/advanced_network_media/advanced_network_media_tx/CMakeLists.txt (2)
33-40: Library linking looks comprehensive.The target correctly links to holoscan::core, GXF::multimedia, rivermax-dev-kit, and both advanced_network_common and advanced_network_media_common libraries.
29-30: The include path structure is legitimate and consistent with codebase patterns.Verification confirms both include paths are intentional, not a typo:
operators/advanced_network/advanced_network/contains the headers referenced in the source (e.g.,common.h,kernels.h)- The source file explicitly includes
"advanced_network/common.h", which resolves via the nested path- The parallel component
advanced_network_media_rxuses the identical dual-include pattern, confirming this is a deliberate design choice- The parent path
../../advanced_networkand child path../../advanced_network/advanced_networkare both necessary: the parent supports CMake module discovery while the child directly resolves the headersNo issues found.
Likely an incorrect or invalid review comment.
operators/advanced_network_media/CMakeLists.txt (2)
19-32: Clean conditional build structure.The parent CMakeLists correctly uses
QUIETwith a conditional check before proceeding. The ordering (common library first viaadd_subdirectory, then operators viaadd_holohub_operatormacro) ensures dependencies are available. The graceful fallback message is appropriate for optional operator builds.
28-29: No action required—operators already correctly link to advanced_network_media_common.The
add_holohub_operatormacro simply callsadd_subdirectory()for the operator name (line 183 of HoloHubConfigHelpers.cmake). Each operator subdirectory independently manages its own dependencies viatarget_link_libraries(). Bothadvanced_network_media_rxandadvanced_network_media_txalready explicitly link toadvanced_network_media_commonin their respective CMakeLists.txt files (lines 43 and 39), which is the correct approach—subdirectories do not inherit parent dependencies automatically; they must declare their own.operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_queue_configs.cpp (2)
48-52: LGTM! Burst pool configuration properly propagated.The copy constructor correctly initializes the four new burst pool configuration fields, ensuring proper object copying semantics.
490-494: LGTM! Configuration properly propagated to builder.The burst pool configuration is correctly copied from the source settings to the builder's internal state, enabling downstream application during service initialization.
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/adv_network_rivermax_mgr.cpp (2)
304-306: LGTM! Burst pool configuration applied at the right lifecycle point.Applying the burst pool configuration after service initialization ensures the burst manager is fully created before receiving configuration settings.
623-648: LGTM! Proper service lookup and configuration application.The implementation correctly:
- Looks up the RX service by service_id
- Safely casts to
RivermaxManagerRxServicewith appropriate error handling- Applies the burst pool configuration via the service's public method
- Logs success and errors appropriately
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_mgr_service.h (1)
145-158: LGTM! Well-designed API for burst pool configuration.The additions provide:
get_burst_manager()- Controlled access to the internal burst managerapply_burst_pool_configuration()- Clear, single-responsibility method for applying configurationThis design properly encapsulates the burst pool configuration logic within the service.
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_mgr_service.cpp (3)
74-90: LGTM! Robust configuration application with proper error handling.The implementation correctly:
- Checks for null
burst_manager_before applying configuration- Applies both the adaptive dropping flag and threshold percentages
- Logs configuration details for debugging
- Reports errors when burst manager is uninitialized
150-158: LGTM! Configuration properly extracted from builder.The IPO receiver service correctly copies all four burst pool configuration fields from the builder to internal state, completing the configuration propagation chain.
591-596: LGTM! Thread-safety fix properly applied.The
processing_frame_reset is now protected bymutex_, addressing the race condition flagged in previous reviews. The scoped lock ensures the mutex is released before callingstop()on the provider and pool.operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp (2)
445-474: LGTM! Excellent observability features.The
get_pool_status_string()andget_burst_drop_statistics()methods provide clear, actionable visibility into:
- Pool utilization and capacity state (CRITICAL, LOW, RECOVERING, HEALTHY)
- Detailed drop statistics by category
- Easy debugging and monitoring of adaptive dropping behavior
507-512: LGTM! Drop counters correctly incremented after decision.The counters are incremented only when
should_drop_burst_adaptive()returnstrue, ensuring accurate drop statistics. This addresses the concerns raised in previous reviews.operators/advanced_network_media/common/rtp_params.h (1)
39-73: LGTM: Previous undefined behavior issues resolved.The RTP header parsing now correctly handles byte-order conversions with proper casts to unsigned types before shifting. The sequence number (lines 51-53), timestamp (lines 59-62), and payload size (lines 69-70) extractions all avoid undefined behavior and strict aliasing violations.
operators/advanced_network_media/advanced_network_media_rx/frame_provider.h (1)
22-49: LGTM: Clean interface design.The
IFrameProviderinterface provides a well-designed abstraction for frame buffer allocation and lifecycle management. The pure virtual methods appropriately decouple frame providers from consumers, and the documentation clearly explains the contract.applications/adv_networking_media_player/python/CMakeLists.txt (1)
16-30: LGTM: CMake configuration follows standard pattern.The custom targets properly copy the Python application and YAML configuration to the build directory, with correct dependency ordering to ensure the YAML is available before the application target completes.
operators/advanced_network_media/common/video_parameters.h (1)
29-99: Video parameter API looks well-structured and self-contained.The enums and function declarations form a clear, minimal surface for format/depth handling, and the documentation matches the behaviors implemented in the
.cpp. No blocking issues from the header side.applications/adv_networking_media_player/python/adv_networking_media_player.py (1)
34-96: Python media-player app wiring and lifecycle handling look correct.The RX/TX enablement checks, advanced-network initialization, RX operator creation, Holoviz wiring (with the set-of-tuples port mapping), scheduler setup, and final
shutdown()infinallyform a coherent and robust application flow. No blocking issues spotted here.Also applies to: 98-180, 183-224
operators/advanced_network_media/advanced_network_media_rx/python/adv_network_media_rx_pydoc.hpp (1)
29-70: RX operator Python docs are clear and aligned with the intended usage.The constructor, lifecycle, and type-name docstrings give Python users a good mental model of the operator, including the requirement to initialize the advanced network first. Just ensure these defaults stay in sync with the pybind signature over time.
Also applies to: 72-95
operators/advanced_network_media/advanced_network_media_rx/frame_assembly_controller.cpp (4)
25-111: LGTM on constructor and state transition logic.The constructor properly validates the frame provider, and the
process_eventmethod correctly handles state transitions for both success and error paths. The fix addressing the prior review comment (attempting state transition wheneverresult.new_frame_statediffers from current state) is implemented correctly.
201-301: Frame allocation and completion logic is correct.The IDLE and RECEIVING_PACKETS state handlers properly defer frame allocation, handle single-packet frames, and check pool availability before requesting new frames. The implementation correctly prevents reducing pool size unnecessarily.
304-384: Error recovery logic correctly addresses prior review.The recovery marker handlers (both RECOVERY_MARKER and MARKER_DETECTED in ERROR_RECOVERY) now correctly release the corrupted frame before checking pool availability. This prevents the deadlock scenario identified in the prior review where a full pool would prevent recovery completion.
113-477: Helper methods and state machine utilities are well-implemented.The helper methods (
reset,advance_frame_position,allocate_new_frame,release_current_frame) are straightforward and correct. TheFrameAssemblyHelperutilities provide proper state/event string conversion and comprehensive state transition validation.operators/advanced_network_media/advanced_network_media_rx/adv_network_media_rx.h (1)
1-76: Operator header declaration looks good.The
AdvNetworkMediaRxOpclass is well-structured using the Pimpl pattern. The parameter declarations are comprehensive and appropriate for a media RX operator. The static analysis error aboutholoscan/holoscan.hppnot found is a false positive due to the build environment and can be safely ignored.operators/advanced_network_media/common/frame_buffer.h (2)
20-37: Excellent fixes to prior review comments.The header now properly includes
<vector>(line 22) and uses targetedusingdeclarations scoped withinnamespace holoscan::ops(lines 34-37) instead of globalusing namespacedirectives. These changes address the prior review concerns and prevent namespace pollution.
39-114: Well-structured frame buffer hierarchy.The frame buffer class hierarchy is cleanly designed with appropriate separation of concerns.
FrameBufferBaseprovides common functionality,VideoFrameBufferBaseadds video-specific validation, and concrete implementations handle different backing storage types (VideoBuffer, Tensor, pre-allocated memory).operators/advanced_network_media/common/frame_buffer.cpp (2)
23-91: Validation logic is thorough and correct.The
validate_frame_parametersmethod properly checks dimensions and size before delegating to format-specific validation. TheVideoBufferFrameBuffer::validate_format_compliancecorrectly handles NV12_709, RGB, and CUSTOM formats with appropriate alignment checks (4:2:0 for NV12_709, stride alignment for all planes).
157-272: Entity wrapping implementations are correct.Both
wrap_in_entitymethods properly create GXF entities, configure format-specific parameters (color planes for VideoBuffer, shape/strides for Tensor), and wrap the pre-allocated memory with release callbacks. The implementations correctly handle RGB, NV12_709, and CUSTOM formats.operators/advanced_network_media/advanced_network_media_rx/memory_copy_strategies.cpp (4)
39-272: Memory copy strategy detection is robust.The
MemoryCopyStrategyDetectorimplementation handles edge cases well: configuration changes during detection trigger resets, sequence discontinuities and buffer wraparounds are properly detected, and the pattern analysis correctly distinguishes between contiguous and strided memory layouts. The 1MB threshold for wraparound detection (line 262) is reasonable.
278-403: Contiguous strategy implementation is solid.The
ContiguousMemoryCopyStrategycorrectly accumulates contiguous packets and executes copies when contiguity breaks. Bounds validation (lines 324-330, 392-402) prevents overflows, and the strategy properly resets accumulation state after each copy operation.
409-635: Strided strategy efficiently handles strided memory patterns.The
StridedMemoryCopyStrategycorrectly accumulates packets while maintaining stride consistency, then usescudaMemcpy2Dfor efficient batch copying (lines 565-566). The strategy properly falls back to individual packet copies when accumulation count is 1, and includes comprehensive bounds validation.
641-682: Copy helper provides clean CUDA abstraction.The
CopyOperationHelpermethods properly determine copy direction based on memory storage types and wrap CUDA memory copy operations with validation and exception handling. This provides a clean, safe interface for the strategy implementations.operators/advanced_network_media/advanced_network_media_rx/media_frame_assembler.cpp (3)
489-531: Packet statistics tracking is correct.The
update_packet_statisticsmethod properly tracks sequence discontinuities and detects potential buffer wraparounds. The format strings for trace logging (lines 504-516) correctly include placeholders for all arguments. The power-of-2 gap detection at line 502 helps identify burst buffer overflow conditions.
57-84: Constructor properly initializes assembler components.The constructor validates configuration, creates the frame assembly controller, and conditionally sets up memory copy strategy detection or forces a contiguous strategy. The initialization logic correctly handles both detection and forced-contiguous modes.
132-180: Packet processing orchestration is well-structured.The
process_incoming_packetmethod properly orchestrates the packet processing flow: updates statistics, determines the appropriate event, processes through the assembly controller, and executes resulting actions. Error recovery state changes are logged for observability.operators/advanced_network_media/advanced_network_media_rx/media_frame_assembler.h (1)
1-348: MediaFrameAssembler header is well-designed.The header provides a clean, comprehensive API for frame assembly with:
- Configurable memory and burst parameters
- Pluggable completion handlers via
IFrameCompletionHandler- Detailed statistics tracking with optional timing information
- Helper utilities for configuration creation and validation
The separation of concerns between state management (
FrameAssemblyController), memory copy strategies (IMemoryCopyStrategy), and the assembler orchestration is well-architected.operators/advanced_network_media/advanced_network_media_rx/memory_copy_strategies.h (1)
21-75: Interfaces and helper API look coherent and focusedThe enum,
IMemoryCopyStrategyinterface, andCopyOperationHelperAPI are well-scoped and clearly documented. Responsibilities are split cleanly between detection, concrete strategies, and low-level copy helpers, which should make the RX path easier to reason about and extend.Also applies to: 330-364
operators/advanced_network_media/advanced_network_media_rx/frame_assembly_controller.h (2)
108-122: Well-documented unused parameters.The unused
rtp_paramsandpayloadparameters inprocess_event()are clearly documented as reserved for future extensibility. The design rationale explaining that the state machine focuses on transitions rather than packet data processing is sound.
55-58: Verification confirmsStrideInfois actively used.The
StrideInfostruct is utilized throughout the codebase as a parameter type, return type component, and member variable inStridedMemoryCopyStrategy. It is not dead code. The struct serves a legitimate purpose for the strided memory copy strategy system and does not require moving or refactoring.Likely an incorrect or invalid review comment.
| class AllocatedVideoBufferFrameBuffer : public VideoFrameBufferBase { | ||
| public: | ||
| /** | ||
| * @brief Constructs an AllocatedViddeoBufferFrameBuffer from pre-allocated memory. | ||
| * | ||
| * @param data Pointer to the allocated memory | ||
| * @param size Size of the allocated memory in bytes | ||
| * @param width Frame width | ||
| * @param height Frame height | ||
| * @param format Video format | ||
| * @param storage_type Memory storage type (device or host) | ||
| */ | ||
| AllocatedVideoBufferFrameBuffer( | ||
| void* data, size_t size, uint32_t width, uint32_t height, nvidia::gxf::VideoFormat format, | ||
| nvidia::gxf::MemoryStorageType storage_type = nvidia::gxf::MemoryStorageType::kDevice); | ||
| virtual ~AllocatedVideoBufferFrameBuffer() = default; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix typo in documentation.
Line 174 contains a typo in the documentation: "AllocatedViddeoBufferFrameBuffer" should be "AllocatedVideoBufferFrameBuffer".
Apply this diff:
/**
* @class AllocatedVideoBufferFrameBuffer
* @brief Frame buffer implementation for pre-allocated memory buffers.
*
* Used primarily by the RX operator for receiving frames.
*/
class AllocatedVideoBufferFrameBuffer : public VideoFrameBufferBase {
public:
/**
- * @brief Constructs an AllocatedViddeoBufferFrameBuffer from pre-allocated memory.
+ * @brief Constructs an AllocatedVideoBufferFrameBuffer from pre-allocated memory.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| class AllocatedVideoBufferFrameBuffer : public VideoFrameBufferBase { | |
| public: | |
| /** | |
| * @brief Constructs an AllocatedViddeoBufferFrameBuffer from pre-allocated memory. | |
| * | |
| * @param data Pointer to the allocated memory | |
| * @param size Size of the allocated memory in bytes | |
| * @param width Frame width | |
| * @param height Frame height | |
| * @param format Video format | |
| * @param storage_type Memory storage type (device or host) | |
| */ | |
| AllocatedVideoBufferFrameBuffer( | |
| void* data, size_t size, uint32_t width, uint32_t height, nvidia::gxf::VideoFormat format, | |
| nvidia::gxf::MemoryStorageType storage_type = nvidia::gxf::MemoryStorageType::kDevice); | |
| virtual ~AllocatedVideoBufferFrameBuffer() = default; | |
| class AllocatedVideoBufferFrameBuffer : public VideoFrameBufferBase { | |
| public: | |
| /** | |
| * @brief Constructs an AllocatedVideoBufferFrameBuffer from pre-allocated memory. | |
| * | |
| * @param data Pointer to the allocated memory | |
| * @param size Size of the allocated memory in bytes | |
| * @param width Frame width | |
| * @param height Frame height | |
| * @param format Video format | |
| * @param storage_type Memory storage type (device or host) | |
| */ | |
| AllocatedVideoBufferFrameBuffer( | |
| void* data, size_t size, uint32_t width, uint32_t height, nvidia::gxf::VideoFormat format, | |
| nvidia::gxf::MemoryStorageType storage_type = nvidia::gxf::MemoryStorageType::kDevice); | |
| virtual ~AllocatedVideoBufferFrameBuffer() = default; |
🤖 Prompt for AI Agents
operators/advanced_network_media/common/frame_buffer.h lines 171-186: The
constructor docstring has a typo in the class name
("AllocatedViddeoBufferFrameBuffer"); update the comment to use the correct
class name "AllocatedVideoBufferFrameBuffer" in the brief description so the
documentation matches the actual class identifier.
|
|
||
| Operator for receiving media frames over advanced network infrastructure. This operator receives video frames over Rivermax-enabled network infrastructure and outputs them as GXF VideoBuffer or Tensor entities. | ||
|
|
||
| **Inputs** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
Use proper heading syntax instead of bold emphasis for section headers.
Lines 16, 19, 23 (under AdvNetworkMediaRxOp) and lines 47, 51, 54 (under AdvNetworkMediaTxOp) use bold formatting (**text**) for subsection headers, but should use markdown heading syntax (###) for consistency and to satisfy linting requirements.
Apply this diff to correct the heading formatting:
### `holoscan::ops::AdvNetworkMediaRxOp`
Operator for receiving media frames over advanced network infrastructure. This operator receives video frames over Rivermax-enabled network infrastructure and outputs them as GXF VideoBuffer or Tensor entities.
-**Inputs**
+### Inputs
- None (receives data directly from network interface via Advanced Network Manager library)
-**Outputs**
+### Outputs
- **`output`**: Video frames as GXF entities (VideoBuffer or Tensor)
- type: `gxf::Entity`
-**Parameters**
+### Parameters
- **`interface_name`**: Name of the network interface to use for receivingApply the same fix for the corresponding section under AdvNetworkMediaTxOp.
Also applies to: 19-19, 23-23, 47-47, 51-51, 54-54
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
16-16: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
🤖 Prompt for AI Agents
operators/advanced_network_media/README.md lines 16, 19, 23, 47, 51, 54: the
reviewer flagged that those subsection titles use bold emphasis (**text**)
instead of markdown headings; replace each bolded subsection header with a
proper heading (e.g., prepend "### " before the title text and remove the
surrounding ** **) so the sections under AdvNetworkMediaRxOp and
AdvNetworkMediaTxOp use consistent heading syntax and satisfy linting rules.
| bool RxBurstsManager::should_drop_burst_adaptive(uint32_t current_utilization) const { | ||
| switch (burst_drop_policy_) { | ||
| case BurstDropPolicy::NONE: | ||
| return false; | ||
|
|
||
| case BurstDropPolicy::CRITICAL_THRESHOLD: | ||
| default: { | ||
| // CORE LOGIC: Drop new bursts when critical, stop when recovered | ||
|
|
||
| // Enter critical dropping mode when pool capacity falls below critical threshold | ||
| if (current_utilization < pool_critical_threshold_percent_) { | ||
| if (!in_critical_dropping_mode_) { | ||
| in_critical_dropping_mode_ = true; | ||
| HOLOSCAN_LOG_WARN( | ||
| "CRITICAL: Pool capacity {}% - entering burst dropping mode (port={}, queue={})", | ||
| current_utilization, | ||
| port_id_, | ||
| queue_id_); | ||
| } | ||
| return true; // Drop ALL new bursts in critical mode | ||
| } | ||
|
|
||
| // Exit critical dropping mode when pool capacity recovers to target threshold | ||
| if (in_critical_dropping_mode_ && current_utilization >= pool_recovery_threshold_percent_) { | ||
| in_critical_dropping_mode_ = false; | ||
| HOLOSCAN_LOG_INFO( | ||
| "RECOVERY: Pool capacity {}% - exiting burst dropping mode (port={}, queue={})", | ||
| current_utilization, | ||
| port_id_, | ||
| queue_id_); | ||
| return false; | ||
| } | ||
|
|
||
| // Stay in current mode (dropping or not dropping) | ||
| return in_critical_dropping_mode_; | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify thread-safety of mutable state in const method.
The method should_drop_burst_adaptive() is declared const but modifies the mutable member in_critical_dropping_mode_ (lines 570, 582). If should_drop_burst_due_to_capacity() can be called concurrently from multiple threads (e.g., from different RX service threads or from the same service if packet processing is multi-threaded), this creates a race condition.
Please verify:
- Is
should_drop_burst_due_to_capacity()called from only one thread per RxBurstsManager instance? - If multi-threaded access is possible, should
in_critical_dropping_mode_be atomic or protected by a mutex?
Run this script to check for concurrent access patterns:
🏁 Script executed:
#!/bin/bash
# Search for concurrent access patterns to should_drop_burst_due_to_capacity
# Find all calls to should_drop_burst_due_to_capacity
rg -n -C5 'should_drop_burst_due_to_capacity' --type=cpp
# Check if RxBurstsManager methods are called from multiple threads
rg -n -C3 'RxBurstsManager.*thread|std::thread.*RxBurstsManager' --type=cpp
# Look for thread pool or async patterns in burst processing
rg -n -C3 'std::async|thread_pool|ThreadPool' operators/advanced_network/advanced_network/managers/rivermax/Length of output: 4731
🏁 Script executed:
#!/bin/bash
# Verify the method signature and thread-safety of should_drop_burst_adaptive
# Find the method signature of should_drop_burst_adaptive in header
rg -n 'bool.*should_drop_burst_adaptive' operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.h
# Find the method implementation
rg -n 'bool RxBurstsManager::should_drop_burst_adaptive' operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp
# Find all calls to should_drop_burst_adaptive
rg -n -C3 'should_drop_burst_adaptive' operators/advanced_network/advanced_network/managers/rivermax/ --type=cpp --type=h
# Check member variable declaration for in_critical_dropping_mode_
rg -n 'in_critical_dropping_mode_' operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/ --type=cpp --type=h
# Look for mutable keyword in class declaration
rg -n -A2 -B2 'mutable.*in_critical_dropping_mode_' operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/Length of output: 5722
🏁 Script executed:
#!/bin/bash
# Verify threading context and synchronization in burst processing
# Search for locks/mutexes around burst processing
rg -n -C5 'std::lock|std::mutex|std::atomic|lock_guard' operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp
# Find enqueue_packet_burst method which calls should_drop_burst_due_to_capacity
rg -n -B5 'should_drop_burst_due_to_capacity' operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.cpp | head -30
# Check class member variables for synchronization primitives
rg -n 'mutable|mutex|atomic' operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.h | grep -E 'mutable|mutex|atomic'
# Search for threading documentation or comments about thread-safety
rg -n 'thread|concurrent|multi' operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/burst_manager.h | head -20
# Check how RxBurstsManager is instantiated and used
rg -n 'RxBurstsManager' operators/advanced_network/advanced_network/managers/rivermax/ --type=cpp --type=h | grep -E '(new|make_shared|std::shared_ptr|std::unique_ptr)' | head -15Length of output: 5865
Thread-safety issue confirmed: in_critical_dropping_mode_ requires atomic protection.
The review comment is correct. The mutable bool in_critical_dropping_mode_ member (line 628 in burst_manager.h) is modified within the const method should_drop_burst_adaptive() at lines 570 and 582 without synchronization.
This is a race condition: the variable is shared across multiple components (RxBurstsManager is held as std::shared_ptr and passed to RxPacketProcessor), and the codebase demonstrates heavy use of mutexes elsewhere for thread-safe access, indicating multi-threaded packet processing is expected.
Notably, other mutable statistics in the same class ARE protected with std::atomic<uint64_t> (lines 631–635), creating an inconsistency. The fix is to change in_critical_dropping_mode_ to mutable std::atomic<bool> to match the pattern used for other mutable state accessed from const methods.
| // Burst pool adaptive dropping configuration | ||
| bool burst_pool_adaptive_dropping_enabled = false; | ||
| uint32_t burst_pool_low_threshold_percent = 25; | ||
| uint32_t burst_pool_critical_threshold_percent = 10; | ||
| uint32_t burst_pool_recovery_threshold_percent = 50; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
Add validation for burst pool threshold configuration.
The burst pool threshold percentages have default values (critical=10%, low=25%, recovery=50%), but there's no validation ensuring:
critical_threshold < low_threshold < recovery_threshold- All values are in the valid range [0, 100]
Without validation, misconfiguration could lead to incorrect adaptive dropping behavior where the system never enters or exits dropping mode.
Consider adding validation in RivermaxCommonRxQueueValidator::validate():
ReturnStatus RivermaxCommonRxQueueValidator::validate(
const std::shared_ptr<RivermaxCommonRxQueueConfig>& settings) const {
// existing validation...
// Validate burst pool thresholds
if (settings->burst_pool_adaptive_dropping_enabled) {
if (settings->burst_pool_critical_threshold_percent >= settings->burst_pool_low_threshold_percent ||
settings->burst_pool_low_threshold_percent >= settings->burst_pool_recovery_threshold_percent) {
HOLOSCAN_LOG_ERROR("Burst pool thresholds must satisfy: critical < low < recovery");
return ReturnStatus::failure;
}
if (settings->burst_pool_recovery_threshold_percent > 100) {
HOLOSCAN_LOG_ERROR("Burst pool thresholds must be <= 100");
return ReturnStatus::failure;
}
}
return ReturnStatus::success;
}🤖 Prompt for AI Agents
In
operators/advanced_network/advanced_network/managers/rivermax/rivermax_mgr_impl/rivermax_queue_configs.h
around lines 110-114, add validation in
RivermaxCommonRxQueueValidator::validate() to ensure burst pool thresholds are
within [0,100] and ordered as critical < low < recovery when
burst_pool_adaptive_dropping_enabled is true; on violation log an error (e.g.,
HOLOSCAN_LOG_ERROR) and return failure, otherwise continue and return success.
|
@coderabbitai autoresolve open conversations |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 143 @ronyrad, I'm unable to auto-resolve the review threads directly due to GitHub API authentication constraints in my environment. However, I can provide you with a clear list of which issues have been verified as fixed, so you or a maintainer can resolve them manually. ✅ Verified Fixed - Ready to ResolveBased on my earlier verification, the following review comments should be marked as resolved:
|
This PR adds multimedia network operators that ease development of media streaming applications with Holoscan Holohub. Two sample applications (sender and player) are provided to demonstrate how to utilize these operators effectively.
New Components Added
🔧 Core Operators
📺 Sample Applications
VideoStreamReplayer → AdvNetworkMediaTxOp → Network InterfaceNetwork Interface → AdvNetworkMediaRxOp → HolovizOp/FramesWriterDeveloper Benefits
Dependencies
This PR builds upon the foundational Rivermax infrastructure provided by PR #813, which includes Rivermax Dev Kit migration and Tx support implementation.
Target Use Cases
Broadcast and media production environments requiring precise timing and high throughput over IP networks. The sample applications serve as reference implementations for developers building similar streaming solutions.
Summary by CodeRabbit
New Features
Enhancements
Documentation