🎈 perf(timer, packet_io_yield): update parameter

This commit is contained in:
yangwei
2024-08-01 13:57:37 +08:00
committed by luwenpeng
parent 49539eb253
commit 0deeb7f3e7
3 changed files with 3 additions and 3 deletions

View File

@@ -289,7 +289,7 @@ static void *work_thread(void *arg)
if (nr_recv == 0) if (nr_recv == 0)
{ {
packet_io_yield(packet_io, thr_idx, 10); packet_io_yield(packet_io, thr_idx, 900);
} }
} }

View File

@@ -55,7 +55,7 @@ void tcp_segment_free(struct tcp_segment *seg)
struct tcp_reassembly *tcp_reassembly_new(uint64_t max_timeout, uint64_t max_seg_num) struct tcp_reassembly *tcp_reassembly_new(uint64_t max_timeout, uint64_t max_seg_num)
{ {
struct tcp_reassembly *assembler = (struct tcp_reassembly *)calloc(1, sizeof(struct tcp_reassembly)); struct tcp_reassembly *assembler = (struct tcp_reassembly *)malloc(sizeof(struct tcp_reassembly));
if (!assembler) if (!assembler)
{ {
TCP_REASSEMBLY_LOG_ERROR("calloc failed"); TCP_REASSEMBLY_LOG_ERROR("calloc failed");

View File

@@ -58,7 +58,7 @@ uint64_t stellar_get_real_time_sec()
uint64_t stellar_get_real_time_msec() uint64_t stellar_get_real_time_msec()
{ {
struct timespec now; struct timespec now;
clock_gettime(CLOCK_REALTIME, &now); clock_gettime(CLOCK_REALTIME_COARSE, &now);
return TIMESPEC_TO_MSEC(now); return TIMESPEC_TO_MSEC(now);
} }