Lines Matching refs:tg
61 static void pi_set_crtt(struct target *tg, int64_t m,
80 static boolean_t highest_ack_tg(uint16_t seq, struct target *tg);
984 highest_ack_tg(uint16_t seq, struct target *tg) in highest_ack_tg() argument
990 pii = tg->tg_phyint_inst; in highest_ack_tg()
1007 if (pii->pii_probes[pr_ndx].pr_target == tg && in highest_ack_tg()
1049 struct target *tg; in check_pii_crtt_improved() local
1058 for (tg = pii->pii_targets; tg != NULL; tg = tg->tg_next) { in check_pii_crtt_improved()
1059 if (tg->tg_status != TG_ACTIVE) in check_pii_crtt_improved()
1061 if (tg->tg_crtt > (pii->pii_phyint->pi_group->pg_probeint / in check_pii_crtt_improved()
1078 struct target *tg; in check_exception_target() local
1102 for (tg = pii->pii_targets; tg != NULL; tg = tg->tg_next) { in check_exception_target()
1103 if (tg != target && tg->tg_status == TG_ACTIVE) { in check_exception_target()
1104 if (tg->tg_crtt > in check_exception_target()
1258 pi_set_crtt(struct target *tg, int64_t m, boolean_t is_probe_uni) in pi_set_crtt() argument
1260 struct phyint_instance *pii = tg->tg_phyint_inst; in pi_set_crtt()
1262 int64_t sa = tg->tg_rtt_sa; in pi_set_crtt()
1263 int64_t sv = tg->tg_rtt_sd; in pi_set_crtt()
1271 tg->tg_deferred[tg->tg_num_deferred] = m; in pi_set_crtt()
1284 probe_interval, tg->tg_num_deferred); in pi_set_crtt()
1292 if (tg->tg_num_deferred == MAXDEFERREDRTT) { in pi_set_crtt()
1299 for (i = 0; i <= tg->tg_num_deferred; i++) { in pi_set_crtt()
1300 tg->tg_crtt = ns2ms(compute_crtt(&tg->tg_rtt_sa, in pi_set_crtt()
1301 &tg->tg_rtt_sd, tg->tg_deferred[i])); in pi_set_crtt()
1304 tg->tg_num_deferred = 0; in pi_set_crtt()
1306 tg->tg_num_deferred++; in pi_set_crtt()
1317 if (is_probe_uni || new_crtt < tg->tg_crtt) { in pi_set_crtt()
1318 tg->tg_rtt_sa = sa; in pi_set_crtt()
1319 tg->tg_rtt_sd = sv; in pi_set_crtt()
1320 tg->tg_crtt = new_crtt; in pi_set_crtt()
1322 tg->tg_num_deferred = 0; in pi_set_crtt()
2027 struct target *tg; in reset_crtt_all() local
2031 for (tg = pii->pii_targets; tg != NULL; tg = tg->tg_next) { in reset_crtt_all()
2032 tg->tg_crtt = 0; in reset_crtt_all()
2033 tg->tg_rtt_sa = -1; in reset_crtt_all()
2034 tg->tg_rtt_sd = 0; in reset_crtt_all()
2040 for (tg = pii->pii_targets; tg != NULL; tg = tg->tg_next) { in reset_crtt_all()
2041 tg->tg_crtt = 0; in reset_crtt_all()
2042 tg->tg_rtt_sa = -1; in reset_crtt_all()
2043 tg->tg_rtt_sd = 0; in reset_crtt_all()
2293 struct target *tg; in probe_success_info() local
2320 tg = pr_statp->pr_target; in probe_success_info()
2321 assert(tg != NULL); in probe_success_info()
2329 if (tg->tg_crtt != 0) { in probe_success_info()
2330 timeout += tg->tg_crtt; in probe_success_info()
2344 if (cur_tg != NULL && tg == cur_tg) { in probe_success_info()
2419 struct target *tg; in probe_fail_info() local
2448 tg = pr_statp->pr_target; in probe_fail_info()
2452 assert(tg != NULL); in probe_fail_info()
2460 if (tg->tg_crtt != 0) { in probe_fail_info()
2461 timeout += tg->tg_crtt; in probe_fail_info()