diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -24486,15 +24486,29 @@ * when you exit recovery. */ case TCP_RACK_PACING_BETA: + if (strcmp(tp->t_cc->name, CCALGONAME_NEWRENO) != 0) + error = EINVAL; + else if (rack->rc_pacing_cc_set == 0) + optval = rack->r_ctl.rc_saved_beta.beta; + else { + /* + * Reach out into the CC data and report back what + * I have previously set. Yeah it looks hackish but + * we don't want to report the saved values. + */ + if (tp->t_ccv.cc_data) + optval = ((struct newreno *)tp->t_ccv.cc_data)->beta; + else + error = EINVAL; + } break; - /* - * Beta_ecn is the congestion control value for NewReno that influences how - * much of a backoff happens when a ECN mark is detected. It is normally set - * to 80 for 80% i.e. the cwnd is reduced by 20% of its previous value when - * you exit recovery. Note that classic ECN has a beta of 50, it is only - * ABE Ecn that uses this "less" value, but we do too with pacing :) - */ - + /* + * Beta_ecn is the congestion control value for NewReno that influences how + * much of a backoff happens when a ECN mark is detected. It is normally set + * to 80 for 80% i.e. the cwnd is reduced by 20% of its previous value when + * you exit recovery. Note that classic ECN has a beta of 50, it is only + * ABE Ecn that uses this "less" value, but we do too with pacing :) + */ case TCP_RACK_PACING_BETA_ECN: if (strcmp(tp->t_cc->name, CCALGONAME_NEWRENO) != 0) error = EINVAL;