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

Function cc_ecnpkt_handler

freebsd/netinet/tcp_input.c:531–562  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

529 (V_tcp_delack_enabled || (tp->t_flags & TF_NEEDSYN)))
530
531void inline
532cc_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:

Callers 2

tcp_do_segmentFunction · 0.85
rack_do_segment_nounlockFunction · 0.85

Calls 1

tcp_timer_activateFunction · 0.85

Tested by

no test coverage detected