The commonly used append_frame function currently copies
frame data, incurring expensive heap allocation and data copying.
Instead, switch to claiming the frame data, re-using it without copying.
Signed-off-by: Or Ozeri <oro@il.ibm.com>
ldout(cct, 25) << __func__ << " assembled frame " << bl.length()
<< " bytes " << tx_frame_asm << dendl;
- connection->outgoing_bl.append(bl);
+ connection->outgoing_bl.claim_append(bl);
return true;
}