rogue
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
rogue::protocols::rocev2::Server Class Reference

#include <Server.h>

Inheritance diagram for rogue::protocols::rocev2::Server:
rogue::protocols::rocev2::Core rogue::interfaces::stream::Master rogue::interfaces::stream::Slave rogue::EnableSharedFromThis< rogue::interfaces::stream::Master > rogue::interfaces::stream::Pool rogue::EnableSharedFromThis< rogue::interfaces::stream::Slave > rogue::EnableSharedFromThisBase rogue::EnableSharedFromThis< rogue::interfaces::stream::Pool > rogue::EnableSharedFromThisBase rogue::EnableSharedFromThisBase

Public Member Functions

 Server (const std::string &deviceName, uint8_t ibPort, uint8_t gidIndex, uint32_t maxPayload, uint32_t rxQueueDepth)
 
 ~Server ()
 
void stop ()
 Stops the receive thread and releases external ibverbs resources.
 
void setFpgaGid (const std::string &gidBytes)
 
void completeConnection (uint32_t fpgaQpn, uint32_t fpgaRqPsn, uint32_t pmtu=5, uint32_t minRnrTimer=1)
 
uint32_t getQpn () const
 
std::string getGid () const
 
uint32_t getRqPsn () const
 
uint32_t getSqPsn () const
 
uint64_t getMrAddr () const
 
uint32_t getMrRkey () const
 
uint64_t getFrameCount () const
 
uint64_t getByteCount () const
 
void acceptFrame (rogue::interfaces::stream::FramePtr frame) override
 
- Public Member Functions inherited from rogue::protocols::rocev2::Core
 Core (const std::string &deviceName, uint8_t ibPort, uint8_t gidIndex, uint32_t maxPayload=DefaultMaxPayload)
 Creator.
 
virtual ~Core ()
 Destructor - releases the protection domain and closes the ibverbs context.
 
uint32_t maxPayload () const
 
- Public Member Functions inherited from rogue::interfaces::stream::Master
 Master ()
 Constructs a stream master.
 
virtual ~Master ()
 Destroys the stream master.
 
uint32_t slaveCount ()
 Returns the number of attached slaves.
 
void addSlave (std::shared_ptr< rogue::interfaces::stream::Slave > slave)
 Attaches a downstream slave.
 
std::shared_ptr< rogue::interfaces::stream::Frame > reqFrame (uint32_t size, bool zeroCopyEn)
 Requests allocation of a new frame from the primary slave.
 
void sendFrame (std::shared_ptr< rogue::interfaces::stream::Frame > frame)
 Sends a frame to all attached slaves.
 
bool ensureSingleBuffer (std::shared_ptr< rogue::interfaces::stream::Frame > &frame, bool reqEn)
 Ensures a frame is represented by a single buffer.
 
void equalsPy (boost::python::object p)
 Supports == operator usage from Python.
 
boost::python::object rshiftPy (boost::python::object p)
 Supports >> operator usage from Python.
 
void operator== (std::shared_ptr< rogue::interfaces::stream::Slave > &other)
 Supports == operator usage in C++.
 
std::shared_ptr< rogue::interfaces::stream::Slave > & operator>> (std::shared_ptr< rogue::interfaces::stream::Slave > &other)
 Connects this master to a slave via stream chaining operator.
 
- Public Member Functions inherited from rogue::EnableSharedFromThis< rogue::interfaces::stream::Master >
std::shared_ptr< rogue::interfaces::stream::Master > shared_from_this ()
 Returns a shared_ptr<T> for this instance.
 
- Public Member Functions inherited from rogue::EnableSharedFromThisBase
virtual ~EnableSharedFromThisBase ()
 Virtual destructor for polymorphic base usage.
 
- Public Member Functions inherited from rogue::interfaces::stream::Slave
 Slave ()
 Constructs a stream slave.
 
virtual ~Slave ()
 Destroys the stream slave.
 
void setDebug (uint32_t debug, std::string name)
 Sets debug message verbosity and logger name.
 
uint64_t getFrameCount ()
 Returns frame counter.
 
uint64_t getByteCount ()
 Returns byte counter.
 
bool ensureSingleBuffer (std::shared_ptr< rogue::interfaces::stream::Frame > &frame, bool reqEn)
 Ensures frame is backed by a single buffer.
 
std::shared_ptr< rogue::interfaces::stream::Frame > reqLocalFrame (uint32_t size, bool zeroCopyEn)
 Services a local frame allocation request through this object's pool interface.
 
boost::python::object lshiftPy (boost::python::object p)
 Supports << operator usage from Python.
 
std::shared_ptr< rogue::interfaces::stream::Master > & operator<< (std::shared_ptr< rogue::interfaces::stream::Master > &other)
 Connects this slave to a master via stream chaining operator.
 
- Public Member Functions inherited from rogue::interfaces::stream::Pool
 Pool ()
 Constructs a pool with default allocation behavior enabled.
 
virtual ~Pool ()
 Destroys the pool and releases any cached buffer storage.
 
uint32_t getAllocBytes ()
 Returns total currently allocated bytes.
 
uint32_t getAllocCount ()
 Returns total currently allocated buffer count.
 
virtual std::shared_ptr< rogue::interfaces::stream::Frame > acceptReq (uint32_t size, bool zeroCopyEn)
 Services a frame allocation request from a master.
 
void setFixedSize (uint32_t size)
 Sets fixed-size mode.
 
uint32_t getFixedSize ()
 Returns fixed-size allocation setting.
 
void setPoolSize (uint32_t size)
 Sets buffer pool size.
 
uint32_t getPoolSize ()
 Returns configured maximum number of cached pool entries.
 
- Public Member Functions inherited from rogue::EnableSharedFromThis< rogue::interfaces::stream::Pool >
std::shared_ptr< rogue::interfaces::stream::Pool > shared_from_this ()
 Returns a shared_ptr<T> for this instance.
 
- Public Member Functions inherited from rogue::EnableSharedFromThis< rogue::interfaces::stream::Slave >
std::shared_ptr< rogue::interfaces::stream::Slave > shared_from_this ()
 Returns a shared_ptr<T> for this instance.
 

Static Public Member Functions

static std::shared_ptr< rogue::protocols::rocev2::Server > create (const std::string &deviceName, uint8_t ibPort, uint8_t gidIndex, uint32_t maxPayload=DefaultMaxPayload, uint32_t rxQueueDepth=DefaultRxQueueDepth)
 
static void setup_python ()
 
- Static Public Member Functions inherited from rogue::protocols::rocev2::Core
static void setup_python ()
 
- Static Public Member Functions inherited from rogue::interfaces::stream::Master
static std::shared_ptr< rogue::interfaces::stream::Master > create ()
 Creates a stream master.
 
static void setup_python ()
 Registers this type with Python bindings.
 
- Static Public Member Functions inherited from rogue::interfaces::stream::Slave
static std::shared_ptr< rogue::interfaces::stream::Slave > create ()
 Creates a new stream slave.
 
static void setup_python ()
 Registers this type with Python bindings.
 
- Static Public Member Functions inherited from rogue::interfaces::stream::Pool
static void setup_python ()
 Registers this type with Python bindings.
 

Protected Member Functions

void retBuffer (uint8_t *data, uint32_t meta, uint32_t rawSize) override
 
- Protected Member Functions inherited from rogue::interfaces::stream::Pool
std::shared_ptr< rogue::interfaces::stream::Buffer > allocBuffer (uint32_t size, uint32_t *total)
 Allocate a buffer passed size.
 
std::shared_ptr< rogue::interfaces::stream::Buffer > createBuffer (void *data, uint32_t meta, uint32_t size, uint32_t alloc)
 Creates a Buffer with a pre-allocated data block.
 
void decCounter (uint32_t alloc)
 Decrements allocation counter.
 

Additional Inherited Members

- Protected Attributes inherited from rogue::protocols::rocev2::Core
struct ibv_context * ctx_
 
struct ibv_pd * pd_
 
std::string deviceName_
 
uint8_t ibPort_
 
uint8_t gidIndex_
 
uint32_t maxPayload_
 
std::shared_ptr< rogue::Logging > log_
 

Detailed Description

Definition at line 42 of file Server.h.

Constructor & Destructor Documentation

◆ Server()

rogue::protocols::rocev2::Server::Server ( const std::string &  deviceName,
uint8_t  ibPort,
uint8_t  gidIndex,
uint32_t  maxPayload,
uint32_t  rxQueueDepth 
)

Definition at line 77 of file Server.cpp.

◆ ~Server()

rogue::protocols::rocev2::Server::~Server ( )

Definition at line 837 of file Server.cpp.

Member Function Documentation

◆ acceptFrame()

void rogue::protocols::rocev2::Server::acceptFrame ( rogue::interfaces::stream::FramePtr  frame)
overridevirtual

Reimplemented from rogue::interfaces::stream::Slave.

Definition at line 784 of file Server.cpp.

◆ completeConnection()

void rogue::protocols::rocev2::Server::completeConnection ( uint32_t  fpgaQpn,
uint32_t  fpgaRqPsn,
uint32_t  pmtu = 5,
uint32_t  minRnrTimer = 1 
)

Definition at line 362 of file Server.cpp.

◆ create()

rogue::protocols::rocev2::ServerPtr rogue::protocols::rocev2::Server::create ( const std::string &  deviceName,
uint8_t  ibPort,
uint8_t  gidIndex,
uint32_t  maxPayload = DefaultMaxPayload,
uint32_t  rxQueueDepth = DefaultRxQueueDepth 
)
static

Definition at line 63 of file Server.cpp.

◆ getByteCount()

uint64_t rogue::protocols::rocev2::Server::getByteCount ( ) const
inline

Definition at line 185 of file Server.h.

◆ getFrameCount()

uint64_t rogue::protocols::rocev2::Server::getFrameCount ( ) const
inline

Definition at line 184 of file Server.h.

◆ getGid()

std::string rogue::protocols::rocev2::Server::getGid ( ) const

Definition at line 480 of file Server.cpp.

◆ getMrAddr()

uint64_t rogue::protocols::rocev2::Server::getMrAddr ( ) const
inline

Definition at line 182 of file Server.h.

◆ getMrRkey()

uint32_t rogue::protocols::rocev2::Server::getMrRkey ( ) const
inline

Definition at line 183 of file Server.h.

◆ getQpn()

uint32_t rogue::protocols::rocev2::Server::getQpn ( ) const
inline

Definition at line 178 of file Server.h.

◆ getRqPsn()

uint32_t rogue::protocols::rocev2::Server::getRqPsn ( ) const
inline

Definition at line 180 of file Server.h.

◆ getSqPsn()

uint32_t rogue::protocols::rocev2::Server::getSqPsn ( ) const
inline

Definition at line 181 of file Server.h.

◆ retBuffer()

void rogue::protocols::rocev2::Server::retBuffer ( uint8_t *  data,
uint32_t  meta,
uint32_t  rawSize 
)
overrideprotectedvirtual

Reimplemented from rogue::interfaces::stream::Pool.

Definition at line 543 of file Server.cpp.

◆ setFpgaGid()

void rogue::protocols::rocev2::Server::setFpgaGid ( const std::string &  gidBytes)

Definition at line 350 of file Server.cpp.

◆ setup_python()

void rogue::protocols::rocev2::Server::setup_python ( )
static

Definition at line 855 of file Server.cpp.

◆ stop()

void rogue::protocols::rocev2::Server::stop ( )
virtual

Stops the receive thread and releases external ibverbs resources.

Before calling stop(), callers must ensure that completeConnection() and any other public operations using the Server's ibverbs resources have completed and that no new ones can begin. Deferred returns from previously issued zero-copy buffers may overlap stop(); their receive-WR re-posts are serialized against QP/MR teardown internally.

The RX slab remains valid until destruction so retained zero-copy buffers do not reference freed memory after stop().

Reimplemented from rogue::interfaces::stream::Master.

Definition at line 791 of file Server.cpp.


The documentation for this class was generated from the following files: