diff --git a/src/msg/async/dpdk/TCP.h b/src/msg/async/dpdk/TCP.h index ccecf207216..eb3c10490e6 100644 --- a/src/msg/async/dpdk/TCP.h +++ b/src/msg/async/dpdk/TCP.h @@ -543,13 +543,13 @@ class tcp { } void do_syn_sent() { _state = SYN_SENT; - _snd.syn_tx_time = clock_type::now(_tcp.cct); + _snd.syn_tx_time = clock_type::now(); // Send to remote output(); } void do_syn_received() { _state = SYN_RECEIVED; - _snd.syn_tx_time = clock_type::now(_tcp.cct); + _snd.syn_tx_time = clock_type::now(); // Send to remote output(); } @@ -1198,7 +1198,7 @@ void tcp::tcb::output_one(bool data_retransmit) { p.set_offload_info(oi); if (!data_retransmit && (len || syn_on || fin_on)) { - auto now = clock_type::now(_tcp.cct); + auto now = clock_type::now(); if (len) { unsigned nr_transmits = 0; _snd.data.emplace_back(unacked_segment{std::move(clone), @@ -1380,7 +1380,7 @@ void tcp::tcb::fast_retransmit() { template void tcp::tcb::update_rto(clock_type::time_point tx_time) { // Update RTO according to RFC6298 - auto R = std::chrono::duration_cast(clock_type::now(_tcp.cct) - tx_time); + auto R = std::chrono::duration_cast(clock_type::now() - tx_time); if (_snd.first_rto_sample) { _snd.first_rto_sample = false; // RTTVAR <- R/2 @@ -1445,7 +1445,7 @@ tcp_sequence tcp::tcb::get_isn() { hash[3] = _isn_secret.key[15]; CryptoPP::Weak::MD5::Transform(hash, _isn_secret.key); auto seq = hash[0]; - auto m = duration_cast(clock_type::now(_tcp.cct).time_since_epoch()); + auto m = duration_cast(clock_type::now().time_since_epoch()); seq += m.count() / 4; return make_seq(seq); } diff --git a/src/test/msgr/test_userspace_event.cc b/src/test/msgr/test_userspace_event.cc index 121c3882639..067d81545b0 100644 --- a/src/test/msgr/test_userspace_event.cc +++ b/src/test/msgr/test_userspace_event.cc @@ -76,11 +76,11 @@ TEST_F(UserspaceManagerTest, StressTest) { std::uniform_int_distribution<> dist(0, 100); mappings.resize(1001); - mappings[0] = make_pair(-1, -1); + mappings[0] = std::make_pair(-1, -1); for (int i = 0; i < 1000; ++i) { int fd = manager->get_eventfd(); ASSERT_TRUE(fd > 0); - mappings[fd] = make_pair(0, 0); + mappings[fd] = std::make_pair(0, 0); } int r = 0; int fd = manager->get_eventfd(); @@ -155,11 +155,11 @@ TEST_F(UserspaceManagerTest, StressTest) { ASSERT_TRUE(r > 0); if ((size_t)r >= mappings.size()) mappings.resize(r+1); - mappings[r] = make_pair(0, 0); + mappings[r] = std::make_pair(0, 0); } else { manager->close(fd); std::cerr << " close fd " << fd << std::endl; - mappings[fd] = make_pair(-1, -1); + mappings[fd] = std::make_pair(-1, -1); } ASSERT_TRUE(manager->check()); }