MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sysctl_rack_clear

Function sysctl_rack_clear

freebsd/netinet/tcp_stacks/rack.c:508–577  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506int32_t rack_clear_counter=0;
507
508static int
509sysctl_rack_clear(SYSCTL_HANDLER_ARGS)
510{
511 uint32_t stat;
512 int32_t error;
513
514 error = SYSCTL_OUT(req, &rack_clear_counter, sizeof(uint32_t));
515 if (error || req->newptr == NULL)
516 return error;
517
518 error = SYSCTL_IN(req, &stat, sizeof(uint32_t));
519 if (error)
520 return (error);
521 if (stat == 1) {
522#ifdef INVARIANTS
523 printf("Clearing RACK counters\n");
524#endif
525 counter_u64_zero(rack_badfr);
526 counter_u64_zero(rack_badfr_bytes);
527 counter_u64_zero(rack_rtm_prr_retran);
528 counter_u64_zero(rack_rtm_prr_newdata);
529 counter_u64_zero(rack_timestamp_mismatch);
530 counter_u64_zero(rack_reorder_seen);
531 counter_u64_zero(rack_tlp_tot);
532 counter_u64_zero(rack_tlp_newdata);
533 counter_u64_zero(rack_tlp_retran);
534 counter_u64_zero(rack_tlp_retran_bytes);
535 counter_u64_zero(rack_tlp_retran_fail);
536 counter_u64_zero(rack_to_tot);
537 counter_u64_zero(rack_to_arm_rack);
538 counter_u64_zero(rack_to_arm_tlp);
539 counter_u64_zero(rack_paced_segments);
540 counter_u64_zero(rack_calc_zero);
541 counter_u64_zero(rack_calc_nonzero);
542 counter_u64_zero(rack_unpaced_segments);
543 counter_u64_zero(rack_saw_enobuf);
544 counter_u64_zero(rack_saw_enetunreach);
545 counter_u64_zero(rack_per_timer_hole);
546 counter_u64_zero(rack_to_alloc_hard);
547 counter_u64_zero(rack_to_alloc_emerg);
548 counter_u64_zero(rack_sack_proc_all);
549 counter_u64_zero(rack_sack_proc_short);
550 counter_u64_zero(rack_sack_proc_restart);
551 counter_u64_zero(rack_to_alloc);
552 counter_u64_zero(rack_to_alloc_limited);
553 counter_u64_zero(rack_alloc_limited_conns);
554 counter_u64_zero(rack_split_limited);
555 counter_u64_zero(rack_find_high);
556 counter_u64_zero(rack_sack_attacks_detected);
557 counter_u64_zero(rack_sack_attacks_reversed);
558 counter_u64_zero(rack_sack_used_next_merge);
559 counter_u64_zero(rack_sack_used_prev_merge);
560 counter_u64_zero(rack_sack_splits);
561 counter_u64_zero(rack_sack_skipped_acked);
562 counter_u64_zero(rack_ack_total);
563 counter_u64_zero(rack_express_sack);
564 counter_u64_zero(rack_sack_total);
565 counter_u64_zero(rack_move_none);

Callers

nothing calls this directly

Calls 2

counter_u64_zeroFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected