Lines Matching refs:seg_num
60 int seg_num; member
127 rmpp_recv->last_ack = rmpp_recv->seg_num; in format_ack()
128 ack->rmpp_hdr.seg_num = cpu_to_be32(rmpp_recv->seg_num); in format_ack()
195 rmpp_mad->rmpp_hdr.seg_num = 0; in ack_ds_ack()
231 rmpp_mad->rmpp_hdr.seg_num = 0; in nack_recv()
308 rmpp_recv->seg_num = 1; in create_rmpp_recv()
385 return be32_to_cpu(rmpp_mad->rmpp_hdr.seg_num); in get_seg_num()
403 int seg_num) in find_seg_location() argument
410 if (seg_num > cur_seg_num) in find_seg_location()
412 if (seg_num == cur_seg_num) in find_seg_location()
423 while (new_buf && (get_seg_num(new_buf) == rmpp_recv->seg_num + 1)) { in update_seg_num()
425 rmpp_recv->seg_num++; in update_seg_num()
443 return hdr_size + rmpp_recv->seg_num * data_size - pad; in get_mad_len()
451 if (rmpp_recv->seg_num > 1) in complete_rmpp()
469 int seg_num; in continue_rmpp() local
476 seg_num = get_seg_num(&mad_recv_wc->recv_buf); in continue_rmpp()
480 (seg_num > rmpp_recv->newwin)) in continue_rmpp()
483 if ((seg_num <= rmpp_recv->last_ack) || in continue_rmpp()
490 prev_buf = find_seg_location(&rmpp_recv->rmpp_wc->rmpp_list, seg_num); in continue_rmpp()
503 } else if (rmpp_recv->seg_num == rmpp_recv->newwin) { in continue_rmpp()
569 rmpp_mad->rmpp_hdr.seg_num = cpu_to_be32(++mad_send_wr->seg_num); in send_next_seg()
571 if (mad_send_wr->seg_num == 1) { in send_next_seg()
577 if (mad_send_wr->seg_num == mad_send_wr->send_buf.seg_count) { in send_next_seg()
620 int seg_num) in adjust_last_ack() argument
624 wr->last_ack = seg_num; in adjust_last_ack()
627 if (wr->last_ack_seg->num == seg_num) in adjust_last_ack()
647 int seg_num, newwin, ret; in process_rmpp_ack() local
656 seg_num = be32_to_cpu(rmpp_mad->rmpp_hdr.seg_num); in process_rmpp_ack()
658 if (newwin < seg_num) { in process_rmpp_ack()
667 if (!seg_num) in process_rmpp_ack()
683 if (seg_num > mad_send_wr->send_buf.seg_count || in process_rmpp_ack()
684 seg_num > mad_send_wr->newwin) { in process_rmpp_ack()
691 if (newwin < mad_send_wr->newwin || seg_num < mad_send_wr->last_ack) in process_rmpp_ack()
694 if (seg_num > mad_send_wr->last_ack) { in process_rmpp_ack()
695 adjust_last_ack(mad_send_wr, seg_num); in process_rmpp_ack()
720 mad_send_wr->seg_num < mad_send_wr->newwin && in process_rmpp_ack()
721 mad_send_wr->seg_num < mad_send_wr->send_buf.seg_count) { in process_rmpp_ack()
749 if (rmpp_hdr->seg_num == cpu_to_be32(1)) { in process_rmpp_data()
879 mad_send_wr->seg_num = 1; in ib_send_rmpp_mad()
920 if (mad_send_wr->seg_num == mad_send_wr->newwin || in ib_process_rmpp_send_wc()
921 mad_send_wr->seg_num == mad_send_wr->send_buf.seg_count) in ib_process_rmpp_send_wc()
945 mad_send_wr->seg_num = mad_send_wr->last_ack; in ib_retry_rmpp()