-int
-tcp_ledbat_delay_ack(struct tcpcb *tp, struct tcphdr *th) {
- /* If any flag other than TH_ACK is set, set "end-of-write" bit */
- if (th->th_flags & ~TH_ACK)
- tp->t_flagsext |= TF_STREAMEOW;
- else
- tp->t_flagsext &= ~(TF_STREAMEOW);
-
- if ((tp->t_flags & TF_RXWIN0SENT) == 0 &&
- (th->th_flags & TH_PUSH) == 0 &&
- (tp->t_unacksegs == 1))
- return(1);
- return(0);
+static int
+tcp_ledbat_delay_ack(struct tcpcb *tp, struct tcphdr *th)
+{
+ if (tcp_ack_strategy == TCP_ACK_STRATEGY_MODERN) {
+ return tcp_cc_delay_ack(tp, th);
+ } else {
+ if ((tp->t_flags & TF_RXWIN0SENT) == 0 &&
+ (th->th_flags & TH_PUSH) == 0 && (tp->t_unacksegs == 1)) {
+ return 1;
+ }
+ return 0;
+ }