Lines Matching refs:bunch
1136 static int next_bunch(struct thr_info *tip, struct io_bunch *bunch) in next_bunch() argument
1140 result = read(tip->ifd, &bunch->hdr, sizeof(bunch->hdr)); in next_bunch()
1141 if (result != sizeof(bunch->hdr)) { in next_bunch()
1149 assert(bunch->hdr.npkts <= BT_MAX_PKTS); in next_bunch()
1151 count = bunch->hdr.npkts * sizeof(struct io_pkt); in next_bunch()
1152 result = read(tip->ifd, &bunch->pkts, count); in next_bunch()
1270 static void process_bunch(struct thr_info *tip, struct io_bunch *bunch) in process_bunch() argument
1273 struct iocb *list[bunch->hdr.npkts]; in process_bunch()
1275 assert(0 < bunch->hdr.npkts && bunch->hdr.npkts <= BT_MAX_PKTS); in process_bunch()
1276 while (!is_send_done(tip) && (i < bunch->hdr.npkts)) { in process_bunch()
1278 int ntodo = min(nfree_current(tip), bunch->hdr.npkts - i); in process_bunch()
1281 iocbs_map(tip, list, &bunch->pkts[i], ntodo); in process_bunch()
1283 stall(tip, bunch->hdr.time_stamp - genesis); in process_bunch()
1307 assert(i <= bunch->hdr.npkts); in process_bunch()
1338 struct io_bunch bunch; in replay_sub() local
1369 while (!is_send_done(tip) && next_bunch(tip, &bunch)) in replay_sub()
1370 process_bunch(tip, &bunch); in replay_sub()