Skip to content

Commit

Permalink
Changes to ambassador
Browse files Browse the repository at this point in the history
  • Loading branch information
Ebenezer-group committed Sep 22, 2024
1 parent 06620f5 commit 03019a3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/tiers/cmwA.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ioUring{
ioUring (int sock,::msghdr& msg):frntBuf{sock}{
::io_uring_params ps{};
ps.flags=IORING_SETUP_SINGLE_ISSUER|IORING_SETUP_DEFER_TASKRUN;
if(int rc=::io_uring_queue_init_params(128,&rng,&ps);rc<0)
if(int rc=::io_uring_queue_init_params(1024,&rng,&ps);rc<0)
raise("ioUring",rc);
recvmsg(msg);
reed();
Expand All @@ -57,7 +57,7 @@ class ioUring{
}
static ::io_uring_cqe *cqes[10];
seen=::io_uring_peek_batch_cqe(&rng,&cqes[0],10);
return ::std::span<::io_uring_cqe>(cqes[0],seen);
return ::std::span<::io_uring_cqe*>(&cqes[0],seen);
}

void reed (){
Expand Down Expand Up @@ -224,8 +224,7 @@ int main (int ac,char** av)try{

for(;;){
auto const spn=ring.submit();
auto cq=spn.data();
for(::uint32_t j=0;j<spn.size();++j){
for(auto cq:spn){
if(cq->res<0||(cq->res==0&&cq->user_data!=closTag)){
if(-EPIPE!=cq->res&&0!=cq->res)bail("op failed %llu %d",cq->user_data,cq->res);
::syslog(LOG_ERR,"Back tier vanished %llu %d",cq->user_data,cq->res);
Expand Down Expand Up @@ -273,7 +272,6 @@ int main (int ac,char** av)try{
}
ring.reed();
}else if(!cmwBuf.all(cq->res))ring.writ();
++cq;
}
}
}catch(::std::exception& e){bail("Oops:%s",e.what());}

0 comments on commit 03019a3

Please sign in to comment.