mirror of
https://github.com/microsoft/mscclpp.git
synced 2026-05-12 01:10:22 +00:00
Make getWc not return a void pointer
This commit is contained in:
@@ -113,7 +113,7 @@ void IBConnection::flush() {
|
||||
ErrorCode::InternalError);
|
||||
}
|
||||
for (int i = 0; i < wcNum; ++i) {
|
||||
const struct ibv_wc* wc = reinterpret_cast<const struct ibv_wc*>(qp->getWc(i));
|
||||
const ibv_wc* wc = qp->getWc(i);
|
||||
if (wc->status != IBV_WC_SUCCESS) {
|
||||
throw mscclpp::IbError("pollCq failed: status " + std::to_string(wc->status), wc->status);
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@ int IbQp::pollCq() { return ibv_poll_cq(this->cq, MSCCLPP_IB_CQ_POLL_NUM, this->
|
||||
|
||||
IbQpInfo& IbQp::getInfo() { return this->info; }
|
||||
|
||||
const void* IbQp::getWc(int idx) const { return &this->wcs[idx]; }
|
||||
const ibv_wc* IbQp::getWc(int idx) const { return &this->wcs[idx]; }
|
||||
|
||||
IbCtx::IbCtx(const std::string& devName) : devName(devName) {
|
||||
int num;
|
||||
|
||||
@@ -72,7 +72,7 @@ class IbQp {
|
||||
int pollCq();
|
||||
|
||||
IbQpInfo& getInfo();
|
||||
const void* getWc(int idx) const;
|
||||
const ibv_wc* getWc(int idx) const;
|
||||
|
||||
private:
|
||||
IbQp(ibv_context* ctx, ibv_pd* pd, int port);
|
||||
|
||||
@@ -79,7 +79,7 @@ int main(int argc, const char* argv[])
|
||||
return 1;
|
||||
}
|
||||
for (int i = 0; i < wcNum; ++i) {
|
||||
const struct ibv_wc* wc = reinterpret_cast<const struct ibv_wc*>(qp->getWc(i));
|
||||
const ibv_wc* wc = qp->getWc(i);
|
||||
if (wc->status != IBV_WC_SUCCESS) {
|
||||
WARN("wc status %d", wc->status);
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user