hololink::emulation::RoCEv2DataPlane
hololink::emulation::RoCEv2DataPlane
The DataPlane implementation for RoCEv2 UDP transport.
Inherits from: hololink::emulation::DataPlane (public)
Constructors
RoCEv2DataPlane
python:
def __init__(self: hemu.RoCEv2DataPlane, hsb_emulator: hemu.HSBEmulator, source_ip: hemu.IPAddress, data_plane_id: int, sensor_id: int)
Construct a new RoCEv2DataPlane object
Parameters
The HSBEmulator object to attach to.
The IP address of the DataPlane.
The identifying index of the DataPlane.
The identifying index of the sensor interface associated with the DataPlane.
Destructor
~RoCEv2DataPlane
Methods
start
Start the DataPlane by initiating the BootP broadcast.
stop
Stop the DataPlane by stopping the BootP broadcast.
stop_bootp
This is a clear alias for stop().
is_running
Check if the DataPlane is running.
(Bootp is broadcasting)
Returns: True if the DataPlane is running, false otherwise.
send
Send a tensor over the DataPlane.
This method is synchronous. It will block and metadata will be protected by a mutex until the send is complete.
Returns: The number of bytes sent or < 0 if error occurred.
Parameters
The tensor object reference to send. Supported device types are kDLCPU, kDLCUDA, kDLCUDAHost (host pinned), and kDLCUDAManaged (Unified Memory)
The frame metadata to send. Acts as a buffer flush. If nullptr, the data is by default buffered until the next send command that fills an MTU or a non-nullptr frame_metadata is provided.
get_sensor_id
Get the sensor ID associated with the DataPlane.
Returns: The sensor ID.
packetizer_enabled
Check if the packetizer is enabled.
Returns: True if the packetizer is enabled, false otherwise.
get_start_time
broadcast_bootp
update_metadata
Update the TransmissionMetadata for the RoCEv2DataPlane.
Only one thread may call RoCEv2DataPlane::send at a time. DataPlane::send() ensures thread safety.