Lines Matching refs:middle_len
364 static int middle_len(const struct ceph_msg *msg) in middle_len() function
366 return le32_to_cpu(msg->hdr.middle_len); in middle_len()
412 static int __tail_onwire_len(int front_len, int middle_len, int data_len, in __tail_onwire_len() argument
416 middle_len < 0 || middle_len > CEPH_MSG_MAX_MIDDLE_LEN || in __tail_onwire_len()
419 if (!front_len && !middle_len && !data_len) in __tail_onwire_len()
423 return front_len + middle_len + data_len + in __tail_onwire_len()
426 return padded_len(front_len) + padded_len(middle_len) + in __tail_onwire_len()
432 return __tail_onwire_len(front_len(msg), middle_len(msg), in tail_onwire_len()
605 int front_len, int middle_len, int data_len, in fill_header() argument
614 hdr->middle_len = cpu_to_le32(middle_len); in fill_header()
665 WARN_ON(!middle_len(con->in_msg) && !data_len(con->in_msg)); in verify_epilogue_crcs()
669 if (middle_len(con->in_msg)) in verify_epilogue_crcs()
672 middle_len(con->in_msg)); in verify_epilogue_crcs()
1017 if (!front_len(msg) && !middle_len(msg) && !data_len(msg)) in setup_message_sgs()
1024 if (middle_len(msg)) in setup_message_sgs()
1026 middle_len(msg)); in setup_message_sgs()
1046 if (middle_len(msg)) in setup_message_sgs()
1047 init_sgs(&cur_sg, msg->middle->vec.iov_base, middle_len(msg), in setup_message_sgs()
1148 dpos = padded_len(front_len(con->in_msg) + padded_len(middle_len(con->in_msg))); in decrypt_tail()
1617 if (!front_len(msg) && !middle_len(msg)) { in prepare_message_plain()
1642 if (middle_len(msg)) { in prepare_message_plain()
1644 crc32c(-1, msg->middle->vec.iov_base, middle_len(msg)); in prepare_message_plain()
1645 add_out_kvec(con, msg->middle->vec.iov_base, middle_len(msg)); in prepare_message_plain()
1735 middle_len(con->out_msg), in prepare_message()
2051 if (!front_len(msg) && !middle_len(msg)) { in prepare_read_tail_plain()
2061 if (middle_len(msg)) { in prepare_read_tail_plain()
2062 add_in_kvec(con, msg->middle->vec.iov_base, middle_len(msg)); in prepare_read_tail_plain()
2063 WARN_ON(msg->middle->vec.iov_len != middle_len(msg)); in prepare_read_tail_plain()
2944 if (middle_len(msg)) { in __handle_control()
2945 WARN_ON(middle_len(msg) > msg->middle->alloc_len); in __handle_control()
2946 msg->middle->vec.iov_len = middle_len(msg); in __handle_control()
2951 if (!front_len(msg) && !middle_len(msg) && !data_len(msg)) in __handle_control()
3482 WARN_ON(!resid || resid > middle_len(con->out_msg)); in prepare_zero_middle()
3483 sent = middle_len(con->out_msg) - resid; in prepare_zero_middle()
3515 boundary = front_len(con->out_msg) + middle_len(con->out_msg); in revoke_at_queue_data()
3522 if (middle_len(con->out_msg)) in revoke_at_queue_data()
3523 prepare_zero_middle(con, middle_len(con->out_msg)); in revoke_at_queue_data()
3530 boundary = middle_len(con->out_msg); in revoke_at_queue_data()
3535 if (middle_len(con->out_msg)) in revoke_at_queue_data()
3536 prepare_zero_middle(con, middle_len(con->out_msg)); in revoke_at_queue_data()
3583 if (!front_len(con->out_msg) && !middle_len(con->out_msg) && in revoke_at_finish_message()
3591 boundary = front_len(con->out_msg) + middle_len(con->out_msg) + in revoke_at_finish_message()
3599 if (middle_len(con->out_msg)) in revoke_at_finish_message()
3600 prepare_zero_middle(con, middle_len(con->out_msg)); in revoke_at_finish_message()
3607 boundary = middle_len(con->out_msg) + CEPH_EPILOGUE_PLAIN_LEN; in revoke_at_finish_message()
3612 if (middle_len(con->out_msg)) in revoke_at_finish_message()
3613 prepare_zero_middle(con, middle_len(con->out_msg)); in revoke_at_finish_message()