Lines Matching +full:chg +full:- +full:int

1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
73 * take and shift over by 1 minus the value (1-8).
100 int tqe_len; /* TCP segment data length */
135 #define SEGQ_EMPTY(tp) TAILQ_EMPTY(&(tp)->t_segq)
151 uint64_t end; /* End if not open-range req */
176 * - sendmap
177 * - timers
178 * - rack_times
202 * is unfilled. This may mean that a time is off by a micro-second
231 #define SNDMAP_TLP 0x000080/* segment sent as tail-loss-probe */
239 int req;
245 int sendmap_send_cnt;
248 int sendmap_flags;
311 #define t_zero_size (sizeof(struct tcpcb) - \
330 #define HPTS_CPU_NONE ((uint16_t)-1)
354 uint32_t snd_cwnd; /* congestion-controlled window */
357 int rcv_numsacks; /* # distinct sack blks present */
365 int t_srtt; /* smoothed round-trip time */
366 int t_rttvar; /* variance in round-trip time */
375 int t_segqlen; /* segment reassembly queue length */
396 int t_rxtcur; /* current retransmit value (ticks) */
398 int t_rxtshift; /* log(2) of rexmt exp. backoff */
406 u_int t_pmtud_saved_maxseg; /* pre-blackhole MSS */
407 int t_blackhole_enter; /* when to enter blackhole detection */
408 int t_blackhole_exit; /* when to exit blackhole detection */
411 int t_softerror; /* possible error not yet reported */
416 int t_sndzerowin; /* zero-window updates sent */
417 int snd_numholes; /* number of holes seen by sender */
424 int t_rttlow; /* smallest observerved RTT */
425 int rfbuf_cnt; /* recv buffer autoscaling byte count */
427 int t_sndrexmitpack; /* retransmit packets sent */
428 int t_rcvoopack; /* out-of-order packets received */
432 int t_bytes_acked; /* # bytes acked during current RTT */
438 int t_dupacks; /* consecutive dup acks recd */
439 int t_lognum; /* Number of log entries */
440 int t_loglimit; /* Maximum number of log entries */
443 int64_t t_pacing_rate; /* bytes / sec, -1 => unlimited */
448 struct statsblob *t_stats; /* Per-connection stats */
472 unsigned int *t_tfo_pending; /* TFO server pending counter */
553 * you return non-zero (an error number) to say no you can't.
584 * of the condtion (ptr == &tp->t_fb_ptr) will be
592 * TCP_QUERY_SENDMAP - Query of outstanding data.
593 * TCP_QUERY_TIMERS_UP - Query about running timers.
594 * TCP_SUPPORTED_LRO - Declaration in req_param of
597 * TCP_QUERY_RACK_TIMES - Enquire about various timestamps
608 * stack does not communicate via chg messages that it too does,
614 int (*tfb_tcp_output)(struct tcpcb *);
616 struct tcphdr *, int, int, uint8_t);
617 int (*tfb_do_segment_nounlock)(struct tcpcb *, struct mbuf *,
618 struct tcphdr *, int, int, uint8_t, int, struct timeval *);
619 int (*tfb_do_queued_segments)(struct tcpcb *, int);
620 int (*tfb_tcp_ctloutput)(struct tcpcb *, struct sockopt *);
622 int (*tfb_tcp_fb_init)(struct tcpcb *, void **);
623 void (*tfb_tcp_fb_fini)(struct tcpcb *, int);
625 int (*tfb_tcp_timer_stop_all)(struct tcpcb *);
627 int (*tfb_tcp_handoff_ok)(struct tcpcb *);
629 int (*tfb_pru_options)(struct tcpcb *, int);
630 void (*tfb_hwtls_change)(struct tcpcb *, int);
631 int (*tfb_chg_query)(struct tcpcb *, struct tcp_query_resp *);
634 int (*tfb_compute_pipe)(struct tcpcb *tp);
635 int (*tfb_stack_info)(struct tcpcb *tp, struct stack_specific_info *);
653 struct tcpcb * tcp_drop(struct tcpcb *, int);
658 #define tptoinpcb(tp) (&(tp)->t_inpcb)
659 #define tptosocket(tp) (tp)->t_inpcb.inp_socket
667 static inline int
671 int rv; in tcp_output()
675 rv = tp->t_fb->tfb_tcp_output(tp); in tcp_output()
677 KASSERT(tp->t_fb->tfb_flags & TCP_FUNC_OUTPUT_CANDROP, in tcp_output()
679 tp->t_fb->tfb_tcp_block_name, tp)); in tcp_output()
680 tp = tcp_drop(tp, -rv); in tcp_output()
693 static inline int
697 int rv; in tcp_output_unlock()
701 rv = tp->t_fb->tfb_tcp_output(tp); in tcp_output_unlock()
703 KASSERT(tp->t_fb->tfb_flags & TCP_FUNC_OUTPUT_CANDROP, in tcp_output_unlock()
705 tp->t_fb->tfb_tcp_block_name, tp)); in tcp_output_unlock()
706 rv = -rv; in tcp_output_unlock()
726 static inline int
729 int rv; in tcp_output_nodrop()
733 rv = tp->t_fb->tfb_tcp_output(tp); in tcp_output_nodrop()
734 KASSERT(rv >= 0 || tp->t_fb->tfb_flags & TCP_FUNC_OUTPUT_CANDROP, in tcp_output_nodrop()
736 tp->t_fb->tfb_tcp_block_name, tp)); in tcp_output_nodrop()
745 static inline int
746 tcp_unlock_or_drop(struct tcpcb *tp, int tcp_output_retval) in tcp_unlock_or_drop()
753 tcp_output_retval = -tcp_output_retval; in tcp_unlock_or_drop()
763 static int inline
766 return ((ack - tp->snd_una) / tp->t_maxseg + in tcp_packets_this_ack()
767 ((((ack - tp->snd_una) % tp->t_maxseg) != 0) ? 1 : 0)); in tcp_packets_this_ack()
823 #define BYTES_THIS_ACK(tp, th) (th->th_ack - tp->snd_una)
837 #define TF2_LOG_AUTO 0x00000008 /* Session is auto-logging. */
839 #define TF2_ECN_PERMIT 0x00000020 /* connection ECN-ready */
872 #define TOF_SIGNATURE 0x0040 /* TCP-MD5 signature option (RFC2385) */
879 u_char *to_signature; /* pointer to the TCP-MD5 signature */
891 #define TO_SYN 0x01 /* parse SYN-only options */
899 uint32_t hc_sendpipe; /* outbound delay-bandwidth product */
900 uint32_t hc_recvpipe; /* inbound delay-bandwidth product */
908 * The smoothed round-trip time and estimated variance
911 * (smoothed = (1/scale)sample + ((scale-1)/scale)smoothed).
927 * 1 extra tick because of +-1/2 tick uncertainty in the
939 max((tp)->t_rttmin, (((tp)->t_srtt >> (TCP_RTT_SHIFT - TCP_DELTA_SHIFT)) \
940 + (tp)->t_rttvar) >> TCP_DELTA_SHIFT)
972 uint64_t tcps_sndacks; /* ack-only packets sent */
975 uint64_t tcps_sndwinup; /* window update-only packets sent */
985 uint64_t tcps_rcvduppack; /* duplicate-only packets received */
986 uint64_t tcps_rcvdupbyte; /* duplicate-only bytes received */
988 uint64_t tcps_rcvpartdupbyte; /* dup. bytes in part-dup. packets */
989 uint64_t tcps_rcvoopack; /* out-of-order packets received */
990 uint64_t tcps_rcvoobyte; /* out-of-order bytes received */
1021 uint64_t tcps_sc_bucketoverflow;/* syncache per-bucket limit hit */
1075 uint64_t tcps_tw_recycles; /* Times time-wait was recycled. */
1076 uint64_t tcps_tw_resets; /* Times time-wait sent a reset. */
1077 uint64_t tcps_tw_responds; /* Times time-wait sent a valid ack. */
1080 uint64_t tcps_ace_nect; /* ACE SYN packet with Non-ECT */
1114 * In-kernel consumers can use these accessor macros directly to update
1127 void kmod_tcpstat_add(int statnum, int val);
1143 #define TCPSTATES_DEC(state) counter_u64_add(V_tcps_states[state], -1)
1157 int tso;
1163 uint32_t len, int tso);
1168 * TCB structure exported to user-land via sysctl(3).
1174 * (s) - used by userland utilities in src
1175 * (p) - used by utilities in ports
1176 * (3) - is known to be used by third party software not in ports
1177 * (n) - no known usage
1222 * TCP function information (name-to-id mapping, aliases, and refcnt)
1223 * exported to user-land via sysctl(3).
1235 #define TCPCTL_DO_RFC1323 1 /* use RFC-1323 extensions */
1258 VNET_DECLARE(int, tcp_log_in_vain);
1265 VNET_DECLARE(int, drop_synfin);
1266 VNET_DECLARE(int, path_mtu_discovery);
1267 VNET_DECLARE(int, tcp_abc_l_var);
1270 VNET_DECLARE(int, tcp_autorcvbuf_max);
1271 VNET_DECLARE(int, tcp_autosndbuf_inc);
1272 VNET_DECLARE(int, tcp_autosndbuf_max);
1273 VNET_DECLARE(int, tcp_bind_all_fibs);
1274 VNET_DECLARE(int, tcp_delack_enabled);
1275 VNET_DECLARE(int, tcp_do_autorcvbuf);
1276 VNET_DECLARE(int, tcp_do_autosndbuf);
1277 VNET_DECLARE(int, tcp_do_ecn);
1278 VNET_DECLARE(int, tcp_do_lrd);
1279 VNET_DECLARE(int, tcp_do_prr);
1280 VNET_DECLARE(int, tcp_do_prr_conservative);
1281 VNET_DECLARE(int, tcp_do_newcwv);
1282 VNET_DECLARE(int, tcp_do_rfc1323);
1283 VNET_DECLARE(int, tcp_tolerate_missing_ts);
1284 VNET_DECLARE(int, tcp_do_rfc3042);
1285 VNET_DECLARE(int, tcp_do_rfc3390);
1286 VNET_DECLARE(int, tcp_do_rfc3465);
1287 VNET_DECLARE(int, tcp_do_newsack);
1288 VNET_DECLARE(int, tcp_do_sack);
1289 VNET_DECLARE(int, tcp_do_tso);
1290 VNET_DECLARE(int, tcp_ecn_maxretries);
1291 VNET_DECLARE(int, tcp_initcwnd_segments);
1292 VNET_DECLARE(int, tcp_insecure_rst);
1293 VNET_DECLARE(int, tcp_insecure_syn);
1294 VNET_DECLARE(int, tcp_insecure_ack);
1297 VNET_DECLARE(int, tcp_minmss);
1298 VNET_DECLARE(int, tcp_mssdflt);
1300 VNET_DECLARE(int, tcp_perconn_stats_dflt_tpl);
1301 VNET_DECLARE(int, tcp_perconn_stats_enable);
1303 VNET_DECLARE(int, tcp_recvspace);
1304 VNET_DECLARE(int, tcp_retries);
1305 VNET_DECLARE(int, tcp_sack_globalholes);
1306 VNET_DECLARE(int, tcp_sack_globalmaxholes);
1307 VNET_DECLARE(int, tcp_sack_maxholes);
1308 VNET_DECLARE(int, tcp_sack_tso);
1309 VNET_DECLARE(int, tcp_sc_rst_sock_fail);
1310 VNET_DECLARE(int, tcp_sendspace);
1311 VNET_DECLARE(int, tcp_udp_tunneling_overhead);
1312 VNET_DECLARE(int, tcp_udp_tunneling_port);
1371 int tcp_addoptions(struct tcpopt *, u_char *);
1376 int tcp_ctloutput(struct socket *, struct sockopt *);
1382 int tcp_reass(struct tcpcb *, struct tcphdr *, tcp_seq *, int *,
1386 void tcp_dooptions(struct tcpopt *, u_char *, int, int);
1388 struct tcpcb *, int, int);
1390 struct tcphdr *, struct mbuf *, int);
1391 void tcp_xmit_timer(struct tcpcb *, int);
1405 int tcp_input(struct mbuf **, int *, int);
1406 int tcp_autorcvbuf(struct mbuf *, struct tcphdr *, struct socket *,
1407 struct tcpcb *, int);
1408 int tcp_input_with_port(struct mbuf **, int *, int, uint16_t);
1409 void tcp_do_segment(struct tcpcb *, struct mbuf *, struct tcphdr *, int,
1410 int, uint8_t);
1412 int register_tcp_functions(struct tcp_function_block *blk, int wait);
1413 int register_tcp_functions_as_names(struct tcp_function_block *blk,
1414 int wait, const char *names[], int *num_names);
1415 int register_tcp_functions_as_name(struct tcp_function_block *blk,
1416 const char *name, int wait);
1417 int deregister_tcp_functions(struct tcp_function_block *blk, bool quiesce,
1420 int find_tcp_function_alias(struct tcp_function_block *blk, struct tcp_function_set *fs);
1421 uint32_t tcp_get_srtt(struct tcpcb *tp, int granularity);
1425 int tcp_default_ctloutput(struct tcpcb *tp, struct sockopt *sopt);
1426 int tcp_ctloutput_set(struct inpcb *inp, struct sockopt *sopt);
1428 uint32_t option_val, int err);
1449 int ifcap;
1461 void tcp_mss_update(struct tcpcb *, int, int, struct hc_metrics_lite *,
1463 void tcp_mss(struct tcpcb *, int);
1464 int tcp_mssopt(struct in_conninfo *);
1467 int tcp_default_output(struct tcpcb *);
1468 void tcp_state_change(struct tcpcb *, int);
1473 struct mbuf *, int);
1475 void tcp_record_dsack(struct tcpcb *tp, tcp_seq start, tcp_seq end, int tlp);
1482 int inp_to_cpuid(struct inpcb *inp);
1504 int tcp_dsack_block_exists(struct tcpcb *);
1510 int tcp_sack_adjust(struct tcpcb *tp);
1511 struct sackhole *tcp_sack_output(struct tcpcb *tp, int *sack_bytes_rexmt);
1519 int tcp_newreno(struct tcpcb *, struct tcphdr *);
1520 int tcp_compute_pipe(struct tcpcb *);
1523 int tcp_stats_sample_rollthedice(struct tcpcb *tp, void *seed_bytes,
1525 int tcp_can_enable_pacing(void);
1526 int tcp_incr_dgp_pacing_cnt(void);
1529 void tcp_change_time_units(struct tcpcb *, int);
1536 int tcp_stats_init(void);
1541 tcp_req_find_a_req_that_is_completed_by(struct tcpcb *tp, tcp_seq th_ack, int *ip);
1542 int tcp_req_check_for_comp(struct tcpcb *tp, tcp_seq ack_point);
1543 int
1559 tcp_req_alloc_req_full(struct tcpcb *tp, struct tcp_snd_req *req, uint64_t ts, int rec_dups);
1564 int tcp_do_ack_accounting(struct tcpcb *tp, struct tcphdr *th, struct tcpopt *to, uint32_t tiwin, i…
1570 tp->t_flags2 &= ~(TF2_SUPPORTS_MBUFQ| in tcp_lro_features_off()
1581 th->th_seq = ntohl(th->th_seq); in tcp_fields_to_host()
1582 th->th_ack = ntohl(th->th_ack); in tcp_fields_to_host()
1583 th->th_win = ntohs(th->th_win); in tcp_fields_to_host()
1584 th->th_urp = ntohs(th->th_urp); in tcp_fields_to_host()
1591 th->th_seq = htonl(th->th_seq); in tcp_fields_to_net()
1592 th->th_ack = htonl(th->th_ack); in tcp_fields_to_net()
1593 th->th_win = htons(th->th_win); in tcp_fields_to_net()
1594 th->th_urp = htons(th->th_urp); in tcp_fields_to_net()