Lines Matching refs:tp

415 void tcp_clear_retrans(struct tcp_sock *tp);
424 void tcp_disable_fack(struct tcp_sock *tp);
572 void tcp_skb_mark_lost_uncond_verify(struct tcp_sock *tp, struct sk_buff *skb);
585 static inline int tcp_bound_to_half_wnd(struct tcp_sock *tp, int pktsize) in tcp_bound_to_half_wnd() argument
596 if (tp->max_window >= 512) in tcp_bound_to_half_wnd()
597 cutoff = (tp->max_window >> 1); in tcp_bound_to_half_wnd()
599 cutoff = tp->max_window; in tcp_bound_to_half_wnd()
602 return max_t(int, cutoff, 68U - tp->tcp_header_len); in tcp_bound_to_half_wnd()
629 static inline u32 __tcp_set_rto(const struct tcp_sock *tp) in __tcp_set_rto() argument
631 return usecs_to_jiffies((tp->srtt_us >> 3) + tp->rttvar_us); in __tcp_set_rto()
634 static inline void __tcp_fast_path_on(struct tcp_sock *tp, u32 snd_wnd) in __tcp_fast_path_on() argument
636 tp->pred_flags = htonl((tp->tcp_header_len << 26) | in __tcp_fast_path_on()
641 static inline void tcp_fast_path_on(struct tcp_sock *tp) in tcp_fast_path_on() argument
643 __tcp_fast_path_on(tp, tp->snd_wnd >> tp->rx_opt.snd_wscale); in tcp_fast_path_on()
648 struct tcp_sock *tp = tcp_sk(sk); in tcp_fast_path_check() local
650 if (skb_queue_empty(&tp->out_of_order_queue) && in tcp_fast_path_check()
651 tp->rcv_wnd && in tcp_fast_path_check()
653 !tp->urg_data) in tcp_fast_path_check()
654 tcp_fast_path_on(tp); in tcp_fast_path_check()
679 static inline u32 tcp_min_rtt(const struct tcp_sock *tp) in tcp_min_rtt() argument
681 return tp->rtt_min[0].rtt; in tcp_min_rtt()
688 static inline u32 tcp_receive_window(const struct tcp_sock *tp) in tcp_receive_window() argument
690 s32 win = tp->rcv_wup + tp->rcv_wnd - tp->rcv_nxt; in tcp_receive_window()
893 u32 tcp_slow_start(struct tcp_sock *tp, u32 acked);
894 void tcp_cong_avoid_ai(struct tcp_sock *tp, u32 w, u32 acked);
943 static inline int tcp_is_sack(const struct tcp_sock *tp) in tcp_is_sack() argument
945 return tp->rx_opt.sack_ok; in tcp_is_sack()
948 static inline bool tcp_is_reno(const struct tcp_sock *tp) in tcp_is_reno() argument
950 return !tcp_is_sack(tp); in tcp_is_reno()
953 static inline bool tcp_is_fack(const struct tcp_sock *tp) in tcp_is_fack() argument
955 return tp->rx_opt.sack_ok & TCP_FACK_ENABLED; in tcp_is_fack()
958 static inline void tcp_enable_fack(struct tcp_sock *tp) in tcp_enable_fack() argument
960 tp->rx_opt.sack_ok |= TCP_FACK_ENABLED; in tcp_enable_fack()
966 static inline void tcp_enable_early_retrans(struct tcp_sock *tp) in tcp_enable_early_retrans() argument
968 tp->do_early_retrans = sysctl_tcp_early_retrans && in tcp_enable_early_retrans()
973 static inline void tcp_disable_early_retrans(struct tcp_sock *tp) in tcp_disable_early_retrans() argument
975 tp->do_early_retrans = 0; in tcp_disable_early_retrans()
978 static inline unsigned int tcp_left_out(const struct tcp_sock *tp) in tcp_left_out() argument
980 return tp->sacked_out + tp->lost_out; in tcp_left_out()
997 static inline unsigned int tcp_packets_in_flight(const struct tcp_sock *tp) in tcp_packets_in_flight() argument
999 return tp->packets_out - tcp_left_out(tp) + tp->retrans_out; in tcp_packets_in_flight()
1004 static inline bool tcp_in_slow_start(const struct tcp_sock *tp) in tcp_in_slow_start() argument
1006 return tp->snd_cwnd < tp->snd_ssthresh; in tcp_in_slow_start()
1009 static inline bool tcp_in_initial_slowstart(const struct tcp_sock *tp) in tcp_in_initial_slowstart() argument
1011 return tp->snd_ssthresh >= TCP_INFINITE_SSTHRESH; in tcp_in_initial_slowstart()
1026 const struct tcp_sock *tp = tcp_sk(sk); in tcp_current_ssthresh() local
1029 return tp->snd_ssthresh; in tcp_current_ssthresh()
1031 return max(tp->snd_ssthresh, in tcp_current_ssthresh()
1032 ((tp->snd_cwnd >> 1) + in tcp_current_ssthresh()
1033 (tp->snd_cwnd >> 2))); in tcp_current_ssthresh()
1037 #define tcp_verify_left_out(tp) WARN_ON(tcp_left_out(tp) > tp->packets_out) argument
1040 __u32 tcp_init_cwnd(const struct tcp_sock *tp, const struct dst_entry *dst);
1045 static inline __u32 tcp_max_tso_deferred_mss(const struct tcp_sock *tp) in tcp_max_tso_deferred_mss() argument
1056 static __inline__ __u32 tcp_max_burst(const struct tcp_sock *tp) in tcp_max_burst() argument
1058 return tp->reordering; in tcp_max_burst()
1062 static inline u32 tcp_wnd_end(const struct tcp_sock *tp) in tcp_wnd_end() argument
1064 return tp->snd_una + tp->snd_wnd; in tcp_wnd_end()
1082 const struct tcp_sock *tp = tcp_sk(sk); in tcp_is_cwnd_limited() local
1085 if (tcp_in_slow_start(tp)) in tcp_is_cwnd_limited()
1086 return tp->snd_cwnd < 2 * tp->max_packets_out; in tcp_is_cwnd_limited()
1088 return tp->is_cwnd_limited; in tcp_is_cwnd_limited()
1118 static inline void tcp_init_wl(struct tcp_sock *tp, u32 seq) in tcp_init_wl() argument
1120 tp->snd_wl1 = seq; in tcp_init_wl()
1123 static inline void tcp_update_wl(struct tcp_sock *tp, u32 seq) in tcp_update_wl() argument
1125 tp->snd_wl1 = seq; in tcp_update_wl()
1150 static inline void tcp_prequeue_init(struct tcp_sock *tp) in tcp_prequeue_init() argument
1152 tp->ucopy.task = NULL; in tcp_prequeue_init()
1153 tp->ucopy.len = 0; in tcp_prequeue_init()
1154 tp->ucopy.memory = 0; in tcp_prequeue_init()
1155 skb_queue_head_init(&tp->ucopy.prequeue); in tcp_prequeue_init()
1184 struct tcp_sock *tp = tcp_sk(sk); in tcp_slow_start_after_idle_check() local
1187 if (!sysctl_tcp_slow_start_after_idle || tp->packets_out) in tcp_slow_start_after_idle_check()
1189 delta = tcp_time_stamp - tp->lsndtime; in tcp_slow_start_after_idle_check()
1224 static inline int keepalive_intvl_when(const struct tcp_sock *tp) in keepalive_intvl_when() argument
1226 return tp->keepalive_intvl ? : sysctl_tcp_keepalive_intvl; in keepalive_intvl_when()
1229 static inline int keepalive_time_when(const struct tcp_sock *tp) in keepalive_time_when() argument
1231 return tp->keepalive_time ? : sysctl_tcp_keepalive_time; in keepalive_time_when()
1234 static inline int keepalive_probes(const struct tcp_sock *tp) in keepalive_probes() argument
1236 return tp->keepalive_probes ? : sysctl_tcp_keepalive_probes; in keepalive_probes()
1239 static inline u32 keepalive_time_elapsed(const struct tcp_sock *tp) in keepalive_time_elapsed() argument
1241 const struct inet_connection_sock *icsk = &tp->inet_conn; in keepalive_time_elapsed()
1244 tcp_time_stamp - tp->rcv_tstamp); in keepalive_time_elapsed()
1311 static inline void tcp_clear_retrans_hints_partial(struct tcp_sock *tp) in tcp_clear_retrans_hints_partial() argument
1313 tp->lost_skb_hint = NULL; in tcp_clear_retrans_hints_partial()
1316 static inline void tcp_clear_all_retrans_hints(struct tcp_sock *tp) in tcp_clear_all_retrans_hints() argument
1318 tcp_clear_retrans_hints_partial(tp); in tcp_clear_all_retrans_hints()
1319 tp->retransmit_skb_hint = NULL; in tcp_clear_all_retrans_hints()
1430 void tcp_free_fastopen_req(struct tcp_sock *tp);
1575 struct tcp_sock *tp = tcp_sk(sk); in tcp_push_pending_frames() local
1577 __tcp_push_pending_frames(sk, tcp_current_mss(sk), tp->nonagle); in tcp_push_pending_frames()
1585 static inline u32 tcp_highest_sack_seq(struct tcp_sock *tp) in tcp_highest_sack_seq() argument
1587 if (!tp->sacked_out) in tcp_highest_sack_seq()
1588 return tp->snd_una; in tcp_highest_sack_seq()
1590 if (tp->highest_sack == NULL) in tcp_highest_sack_seq()
1591 return tp->snd_nxt; in tcp_highest_sack_seq()
1593 return TCP_SKB_CB(tp->highest_sack)->seq; in tcp_highest_sack_seq()
1624 static inline bool tcp_stream_is_thin(struct tcp_sock *tp) in tcp_stream_is_thin() argument
1626 return tp->packets_out < 4 && !tcp_in_initial_slowstart(tp); in tcp_stream_is_thin()
1668 static inline u32 tcp_notsent_lowat(const struct tcp_sock *tp) in tcp_notsent_lowat() argument
1670 return tp->notsent_lowat ?: sysctl_tcp_notsent_lowat; in tcp_notsent_lowat()
1675 const struct tcp_sock *tp = tcp_sk(sk); in tcp_stream_memory_free() local
1676 u32 notsent_bytes = tp->write_seq - tp->snd_nxt; in tcp_stream_memory_free()
1678 return notsent_bytes < tcp_notsent_lowat(tp); in tcp_stream_memory_free()
1766 extern void tcp_rack_advance(struct tcp_sock *tp,