| 529 | (V_tcp_delack_enabled || (tp->t_flags & TF_NEEDSYN))) |
| 530 | |
| 531 | void inline |
| 532 | cc_ecnpkt_handler(struct tcpcb *tp, struct tcphdr *th, uint8_t iptos) |
| 533 | { |
| 534 | INP_WLOCK_ASSERT(tp->t_inpcb); |
| 535 | |
| 536 | if (CC_ALGO(tp)->ecnpkt_handler != NULL) { |
| 537 | switch (iptos & IPTOS_ECN_MASK) { |
| 538 | case IPTOS_ECN_CE: |
| 539 | tp->ccv->flags |= CCF_IPHDR_CE; |
| 540 | break; |
| 541 | case IPTOS_ECN_ECT0: |
| 542 | /* FALLTHROUGH */ |
| 543 | case IPTOS_ECN_ECT1: |
| 544 | /* FALLTHROUGH */ |
| 545 | case IPTOS_ECN_NOTECT: |
| 546 | tp->ccv->flags &= ~CCF_IPHDR_CE; |
| 547 | break; |
| 548 | } |
| 549 | |
| 550 | if (th->th_flags & TH_CWR) |
| 551 | tp->ccv->flags |= CCF_TCPHDR_CWR; |
| 552 | else |
| 553 | tp->ccv->flags &= ~CCF_TCPHDR_CWR; |
| 554 | |
| 555 | CC_ALGO(tp)->ecnpkt_handler(tp->ccv); |
| 556 | |
| 557 | if (tp->ccv->flags & CCF_ACKNOW) { |
| 558 | tcp_timer_activate(tp, TT_DELACK, tcp_delacktime); |
| 559 | tp->t_flags |= TF_ACKNOW; |
| 560 | } |
| 561 | } |
| 562 | } |
| 563 | |
| 564 | /* |
| 565 | * TCP input handling is split into multiple parts: |
no test coverage detected