subscription<Packet> receive(unsigned cpuid, std::function<int (Packet)> next_packet) {
auto sub = _queues[cpuid]->_rx_stream.listen(std::move(next_packet));
_queues[cpuid]->rx_start();
- return std::move(sub);
+ return sub;
}
ethernet_address hw_address() {
struct ether_addr mac;
std::unique_ptr<DPDKQueuePair> init_local_queue(CephContext *c, EventCenter *center, string hugepages, uint16_t qid) {
std::unique_ptr<DPDKQueuePair> qp;
qp = std::unique_ptr<DPDKQueuePair>(new DPDKQueuePair(c, center, this, qid));
- return std::move(qp);
+ return qp;
}
unsigned hash2qid(uint32_t hash) {
// return hash % hw_queues_count();
n->rss_hash.construct(old->rss_hash);
std::copy(old->frags, old->frags + old->_nr_frags, n->frags);
old->copy_internal_fragment_to(n.get());
- return std::move(n);
+ return n;
}
static std::unique_ptr<impl> copy(impl* old) {
static std::unique_ptr<impl> allocate_if_needed(std::unique_ptr<impl> old, size_t extra_frags) {
if (old->_allocated_frags >= old->_nr_frags + extra_frags) {
- return std::move(old);
+ return old;
}
return copy(old.get(), std::max<size_t>(old->_nr_frags + extra_frags, 2 * old->_nr_frags));
}