Core
Core opens the ibverbs device and allocates the shared protection
domain (PD) that Server builds on top of. The completion queue (CQ),
queue pair (QP, type IBV_QPT_RC), and memory region (MR) are owned
by Server, not Core.
For conceptual guidance, see RoCEv2 Protocol.
Python binding
This C++ class is also exported into Python as
rogue.protocols.rocev2.Core.
Python API page:
Class Reference
-
class rogue::protocols::rocev2::Core
Opens the ibverbs device and allocates the shared protection domain. Subclassed by
Server, which adds the CQ / QP (typeIBV_QPT_RC) / MR resources on top.-
Core(const std::string &deviceName, uint8_t ibPort, uint8_t gidIndex, uint32_t maxPayload = 9000)
- Parameters:
deviceName – ibverbs device name (e.g.
rxe0for SoftRoCE,mlx5_0for a Mellanox/NVIDIA NIC)ibPort – ibverbs port number (almost always
1)gidIndex – GID table index for the host NIC’s RoCEv2 IPv4/IPv6 entry
maxPayload – maximum bytes per RDMA WRITE (default:
DefaultMaxPayload= 9000)
-
virtual ~Core()
Deallocates the protection domain and closes the ibverbs context. The CQ, QP, and MR (owned by
Server) must already have been released byServer::stop()before this destructor runs.
-
uint32_t maxPayload() const
- Returns:
Configured maximum payload size in bytes.
-
static void setup_python()
Registers the
rogue.protocols.rocev2.CoreBoost.Python class and exposes the module-level constantsDefaultMaxPayloadandDefaultRxQueueDepth. Called bymodule.cpp.
-
Core(const std::string &deviceName, uint8_t ibPort, uint8_t gidIndex, uint32_t maxPayload = 9000)
Type Aliases
Module Constants
-
static const uint32_t DefaultRxQueueDepth = 256
Default number of receive work requests to keep posted at all times.
-
static const uint32_t DefaultMaxPayload = 9000
Default maximum transfer unit for a single RDMA WRITE (jumbo-frame equivalent).