// we need to get the size before std::moving segments data
const size_t cur_msg_size = get_current_msg_size();
- auto msg_frame = MessageFrame::Decode(std::move(rx_segments_data));
+ auto msg_frame = MessageFrame::Decode(rx_segments_data);
// XXX: paranoid copy just to avoid oops
ceph_msg_header2 current_header = msg_frame.header();
boost::container::static_vector<ceph::msgr::v2::segment_t,
ceph::msgr::v2::MAX_NUM_SEGMENTS> rx_segments_desc;
- boost::container::static_vector<ceph::bufferlist,
- ceph::msgr::v2::MAX_NUM_SEGMENTS> rx_segments_data;
+ ceph::msgr::v2::segment_bls_t rx_segments_data;
ceph::msgr::v2::Tag next_tag;
utime_t backoff; // backoff time
utime_t recv_stamp;
#include <array>
#include <utility>
+#include <boost/container/static_vector.hpp>
+
/**
* Protocol V2 Frame Structures
*
using ControlFrame::ControlFrame;
};
+using segment_bls_t =
+ boost::container::static_vector<bufferlist, MAX_NUM_SEGMENTS>;
+
// This class is used for encoding/decoding header of the message frame.
// Body is processed almost independently with the sole junction point
// being the `extra_payload_len` passed to get_buffer().
segment_t::DEFAULT_ALIGNMENT,
segment_t::DEFAULT_ALIGNMENT,
segment_t::PAGE_SIZE_ALIGNMENT> {
- struct {
- uint32_t front;
- uint32_t middle;
- uint32_t data;
- } len;
-
static const Tag tag = Tag::MESSAGE;
static MessageFrame Encode(const ceph_msg_header2 &msg_header,
return f;
}
- using rx_segments_t =
- boost::container::static_vector<ceph::bufferlist,
- ceph::msgr::v2::MAX_NUM_SEGMENTS>;
- static MessageFrame Decode(rx_segments_t &&recv_segments) {
+ static MessageFrame Decode(segment_bls_t& recv_segments) {
MessageFrame f;
// transfer segments' bufferlists. If a MessageFrame contains less
// SegmentsNumV segments, the missing ones will be seen as zeroed.