* For non recvmsg && multishot, a zero receive marks the end. For recvmsg * with multishot, we always get the header regardless. Hence a "zero receive" * is the size of the header. */
| 1147 | * is the size of the header. |
| 1148 | */ |
| 1149 | static int recv_done_res(int res) |
| 1150 | { |
| 1151 | if (!res) |
| 1152 | return 1; |
| 1153 | if (rcv_msg && recv_mshot && res == sizeof(struct io_uring_recvmsg_out)) |
| 1154 | return 1; |
| 1155 | return 0; |
| 1156 | } |
| 1157 | |
| 1158 | static int recv_inc(struct conn *c, struct conn_dir *cd, int *bid, |
| 1159 | struct io_uring_cqe *cqe) |