forked from mooncake-track/Mooncake
[Transfer Engine]: make reclaimEndpoint got chance to run. (#322)
Signed-off-by: doujiang24 <doujiang24@gmail.com>
This commit is contained in:
parent
9ea7d95aee
commit
adac1be4fb
|
|
@ -25,6 +25,14 @@ RUN apt-get install -y libibverbs-dev \
|
|||
RUN wget https://go.dev/dl/go1.22.12.linux-amd64.tar.gz \
|
||||
&& tar -C /usr/local -xzf go1.22.12.linux-amd64.tar.gz
|
||||
|
||||
RUN git clone https://github.com/alibaba/yalantinglibs.git \
|
||||
&& cd yalantinglibs \
|
||||
&& mkdir -p build \
|
||||
&& cd build \
|
||||
&& cmake .. -DBUILD_EXAMPLES=OFF -DBUILD_BENCHMARK=OFF -DBUILD_UNIT_TESTS=OFF \
|
||||
&& cmake --build . -j$(nproc) \
|
||||
&& cmake --install .
|
||||
|
||||
ENV GOPROXY='https://goproxy.cn'
|
||||
ENV PATH=/usr/local/go/bin:$PATH
|
||||
|
||||
|
|
|
|||
|
|
@ -265,13 +265,11 @@ std::shared_ptr<RdmaEndPoint> RdmaContext::endpoint(
|
|||
auto endpoint = endpoint_store_->getEndpoint(peer_nic_path);
|
||||
if (endpoint) {
|
||||
return endpoint;
|
||||
} else {
|
||||
auto endpoint = endpoint_store_->insertEndpoint(peer_nic_path, this);
|
||||
return endpoint;
|
||||
}
|
||||
|
||||
endpoint = endpoint_store_->insertEndpoint(peer_nic_path, this);
|
||||
endpoint_store_->reclaimEndpoint();
|
||||
return nullptr;
|
||||
return endpoint;
|
||||
}
|
||||
|
||||
int RdmaContext::disconnectAllEndpoints() {
|
||||
|
|
@ -328,13 +326,13 @@ int RdmaContext::getBestGidIndex(const std::string &device_name,
|
|||
|
||||
for (i = 0; i < port_attr.gid_tbl_len; i++) {
|
||||
if (ibv_query_gid_ex(context, port, i, &gid_entry, 0)) {
|
||||
PLOG(ERROR) << "Failed to query GID " << i << " on "
|
||||
<< device_name << "/" << port;
|
||||
continue; // if gid is invalid ibv_query_gid_ex() will return !0
|
||||
PLOG(ERROR) << "Failed to query GID " << i << " on " << device_name
|
||||
<< "/" << port;
|
||||
continue; // if gid is invalid ibv_query_gid_ex() will return !0
|
||||
}
|
||||
if ((ipv6_addr_v4mapped((struct in6_addr *)gid_entry.gid.raw) &&
|
||||
gid_entry.gid_type == IBV_GID_TYPE_ROCE_V2)
|
||||
|| gid_entry.gid_type == IBV_GID_TYPE_IB) {
|
||||
gid_entry.gid_type == IBV_GID_TYPE_ROCE_V2) ||
|
||||
gid_entry.gid_type == IBV_GID_TYPE_IB) {
|
||||
gid_index = i;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue