Initial commit

This commit is contained in:
dev
2025-02-27 21:53:53 +08:00
commit 815e55e4c0
1291 changed files with 185445 additions and 0 deletions

32
tests/common/net/Echo.h Normal file
View File

@@ -0,0 +1,32 @@
#pragma once
#include "common/net/ib/RDMABuf.h"
#include "common/serde/Service.h"
namespace hf3fs::net::test {
struct EchoReq {
SERDE_STRUCT_FIELD(val, std::string{});
SERDE_STRUCT_FIELD(rdma_bufs, std::vector<RDMARemoteBuf>{});
};
struct EchoRsp {
SERDE_STRUCT_FIELD(val, std::string{});
};
struct HelloReq {
SERDE_STRUCT_FIELD(val, std::string{});
};
struct HelloRsp {
SERDE_STRUCT_FIELD(val, std::string{});
SERDE_STRUCT_FIELD(idx, uint32_t{});
};
SERDE_SERVICE(Echo, 86) {
SERDE_SERVICE_METHOD(echo, 1, EchoReq, EchoRsp);
SERDE_SERVICE_METHOD(hello, 2, HelloReq, HelloRsp);
SERDE_SERVICE_METHOD(fail, 3, HelloReq, HelloRsp);
};
} // namespace hf3fs::net::test