Lines Matching refs:th
99 static inline u8 tcp_accecn_ace(const struct tcphdr *th) in tcp_accecn_ace() argument
101 return (th->ae << 2) | (th->cwr << 1) | th->ece; in tcp_accecn_ace()
341 const struct tcphdr *th = (const struct tcphdr *)skb->data; in tcp_ecn_received_counters_payload() local
343 tcp_ecn_received_counters(sk, skb, skb->len - th->doff * 4); in tcp_ecn_received_counters_payload()
350 static inline bool cookie_accecn_ok(const struct tcphdr *th) in cookie_accecn_ok() argument
352 return tcp_accecn_ace(th) > 0x1; in cookie_accecn_ok()
377 static inline bool tcp_accecn_syn_requested(const struct tcphdr *th) in tcp_accecn_syn_requested() argument
379 u8 ace = tcp_accecn_ace(th); in tcp_accecn_syn_requested()
407 static inline void tcp_accecn_echo_syn_ect(struct tcphdr *th, u8 ect) in tcp_accecn_echo_syn_ect() argument
421 th->ae = !!(ect & INET_ECN_ECT_0); in tcp_accecn_echo_syn_ect()
422 th->cwr = ect != INET_ECN_ECT_0; in tcp_accecn_echo_syn_ect()
423 th->ece = ect == INET_ECN_ECT_1; in tcp_accecn_echo_syn_ect()
427 struct tcphdr *th) in tcp_accecn_set_ace() argument
437 th->ece = !!(wire_ace & 0x1); in tcp_accecn_set_ace()
438 th->cwr = !!(wire_ace & 0x2); in tcp_accecn_set_ace()
439 th->ae = !!(wire_ace & 0x4); in tcp_accecn_set_ace()
472 const struct tcphdr *th, u8 ip_dsfield) in tcp_ecn_rcv_synack() argument
475 u8 ace = tcp_accecn_ace(th); in tcp_ecn_rcv_synack()
528 static inline void tcp_ecn_rcv_syn(struct tcp_sock *tp, const struct tcphdr *th, in tcp_ecn_rcv_syn() argument
532 if (!tcp_accecn_syn_requested(th)) { in tcp_ecn_rcv_syn()
542 if (tcp_ecn_mode_rfc3168(tp) && (!th->ece || !th->cwr)) in tcp_ecn_rcv_syn()
547 const struct tcphdr *th) in tcp_ecn_rcv_ecn_echo() argument
549 if (th->ece && !th->syn && tcp_ecn_mode_rfc3168(tp)) in tcp_ecn_rcv_ecn_echo()
622 tcp_ecn_make_synack(const struct request_sock *req, struct tcphdr *th) in tcp_ecn_make_synack() argument
625 tcp_accecn_echo_syn_ect(th, tcp_rsk(req)->syn_ect_rcv); in tcp_ecn_make_synack()
627 th->ece = 1; in tcp_ecn_make_synack()