18#ifndef __ROGUE_PROTOCOLS_ROCEV2_SERVER_H__
19#define __ROGUE_PROTOCOLS_ROCEV2_SERVER_H__
22#include <infiniband/verbs.h>
51 struct ibv_comp_channel* comp_channel_;
82 std::atomic<bool> threadEn_;
94 std::shared_ptr<rogue::Logging> log_;
97 std::atomic<uint64_t> frameCount_;
98 std::atomic<uint64_t> byteCount_;
100 void postRecvWr(uint32_t slot);
101 void runThread(std::weak_ptr<int> lockPtr);
106 void processCompletion(
struct ibv_wc& wc);
111 void cleanupResources();
119 void retBuffer(uint8_t* data, uint32_t meta, uint32_t rawSize)
override;
122 static std::shared_ptr<rogue::protocols::rocev2::Server>
create(
123 const std::string& deviceName,
129 Server(
const std::string& deviceName,
133 uint32_t rxQueueDepth);
145 uint32_t minRnrTimer = 1);
147 uint32_t
getQpn()
const {
return hostQpn_; }
148 std::string
getGid()
const;
161typedef std::shared_ptr<rogue::protocols::rocev2::Server>
ServerPtr;
static std::shared_ptr< rogue::interfaces::stream::Master > create()
Creates a stream master.
Stream slave endpoint and default frame pool.
uint32_t maxPayload() const
uint64_t getFrameCount() const
void retBuffer(uint8_t *data, uint32_t meta, uint32_t rawSize) override
void setFpgaGid(const std::string &gidBytes)
uint64_t getMrAddr() const
static void setup_python()
uint32_t getMrRkey() const
uint32_t getRqPsn() const
uint32_t getSqPsn() const
std::string getGid() const
void completeConnection(uint32_t fpgaQpn, uint32_t fpgaRqPsn, uint32_t pmtu=5, uint32_t minRnrTimer=1)
void acceptFrame(rogue::interfaces::stream::FramePtr frame) override
uint64_t getByteCount() const
std::shared_ptr< rogue::interfaces::stream::Frame > FramePtr
Shared pointer alias for Frame.
std::shared_ptr< rogue::protocols::rocev2::Server > ServerPtr
static const uint32_t DefaultMaxPayload
static const uint32_t DefaultRxQueueDepth