Skip to content
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

Refactor RDMA connection classes #307

Merged
merged 3 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion media-proxy/include/mesh/conn_rdma.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ class Rdma : public Connection {
bool init; // Indicates if RDMA is initialized
void *buffer_block; // Pointer to the allocated buffer block
int queue_size; // Number of buffers in the queue
direction dir; // Data transfer direction
static std::atomic<int> active_connections; // Number of active RDMA connections

// Queue for managing buffers
Expand Down
3 changes: 2 additions & 1 deletion media-proxy/src/mesh/conn_rdma.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ namespace mesh::connection {

std::atomic<int> Rdma::active_connections(0);

Rdma::Rdma() : ep_ctx(nullptr), init(false), trx_sz(0), m_dev_handle(nullptr) {
Rdma::Rdma() : ep_ctx(nullptr), init(false), trx_sz(0), m_dev_handle(nullptr),
buffer_block(nullptr), queue_size(0) {
std::memset(&ep_cfg, 0, sizeof(ep_cfg));
++active_connections;
}
Expand Down
1 change: 0 additions & 1 deletion media-proxy/src/mesh/conn_rdma_rx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ namespace mesh::connection {

RdmaRx::RdmaRx() : Rdma() {
_kind = Kind::receiver; // Set the Kind in the constructor
dir = direction::RX; // Set the direction in the constructor
}

RdmaRx::~RdmaRx()
Expand Down
1 change: 0 additions & 1 deletion media-proxy/src/mesh/conn_rdma_tx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ namespace mesh::connection {

RdmaTx::RdmaTx() : Rdma() {
_kind = Kind::transmitter; // Set the Kind in the constructor
dir = direction::TX; // Set the direction in the constructor
}

RdmaTx::~RdmaTx()
Expand Down
Loading