| 291 | } |
| 292 | |
| 293 | static void *do_rx(void *arg) |
| 294 | { |
| 295 | struct thread_data *td = arg; |
| 296 | const int cfg_receiver_wait_ms = 400; |
| 297 | uint64_t tstop; |
| 298 | int ret, fd = td->fd; |
| 299 | |
| 300 | tstop = gettimeofday_ms() + cfg_runtime_ms + cfg_receiver_wait_ms; |
| 301 | do { |
| 302 | if (cfg_type == SOCK_STREAM) |
| 303 | ret = do_flush_tcp(td, fd); |
| 304 | else |
| 305 | ret = do_flush_datagram(td, fd); |
| 306 | |
| 307 | if (ret) |
| 308 | break; |
| 309 | |
| 310 | do_poll(fd, POLLIN); |
| 311 | } while (gettimeofday_ms() < tstop); |
| 312 | |
| 313 | if (close(fd)) |
| 314 | t_error(1, errno, "close"); |
| 315 | pthread_exit(&td->ret); |
| 316 | return NULL; |
| 317 | } |
| 318 | |
| 319 | static inline struct io_uring_cqe *wait_cqe_fast(struct io_uring *ring) |
| 320 | { |
nothing calls this directly
no test coverage detected