From nobody Wed Oct 19 01:01:47 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MsXW011JGz4gJPb; Wed, 19 Oct 2022 01:01:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MsXVz5vTfz3RL7; Wed, 19 Oct 2022 01:01:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666141307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n2+LR9WPbi1C0YPVXEpzRtHGNYZL3NIOrxNmKSMxOiQ=; b=XWswL/zeNxTdwY01gCjj63FW5McoRgQsqi5LkJBiKlQ/SOwWb4MKyNvO7oIQP/lCv3Jf1+ +VNFIWZMUhEXmqfyp37TY2N2Xnk9vjefvA9unFy8eMmiLsCsSEArrTVlBM0KkYJ75gEcld DQ9CIUBbip2+he3rTwt8K1Y/PO0qXSO15SyF+dHiFyo9BoXtbFA3qb8/pdG5aRs2bHDDr0 FMU5+jZjBx8mXxWR5JnUdWQYl6i9zOXZMiEXOAcEhm6jrmNZEPy2mSrl/BlKWfA7FByQ5Y rPIKikKx26PvexS4aaBqn+03AX4aDABfkuQfc4E9RHKTrEXws4lJ1B0WG9lQdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MsXVz4sJ0zMP7; Wed, 19 Oct 2022 01:01:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29J11liX012975; Wed, 19 Oct 2022 01:01:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29J11lh5012974; Wed, 19 Oct 2022 01:01:47 GMT (envelope-from git) Date: Wed, 19 Oct 2022 01:01:47 GMT Message-Id: <202210190101.29J11lh5012974@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: c37384665f0d - main - tcp: style the struct tcpcb definition List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c37384665f0d67ee3ed992352982fd05db9314b5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666141307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n2+LR9WPbi1C0YPVXEpzRtHGNYZL3NIOrxNmKSMxOiQ=; b=FarfEm4nqt7proFG4nGddiAyot0RgF/yWfDJn9JmLhRJAB6YHOPnqMhgURGOqaRIiMkKf2 J4x3IhdFK1cQcohSL1y9ohpvO1Y1bUXz3HN4Wm6d6g2AjrSvm+6vNIXQldgubLfMUkxpo4 OFPPttGvwUWCnmc/TgMt6Ze63Bk8J0ov1Ri9qtbVsaefWYv3aTQj+uGOqOAiTwCn8ppX2j hv/bfP8EFyW9voCQq9Ir4fU7LjmYgYINtiVUS78l6d7NGbX7e3pPNWsQSDRLm0O1GzPyif 0sSZ+SRK7mhi/dZdAB76QWexF1kr9QHxhXdyIhA4z41lRCEgKS44KZYsDeI39w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666141307; a=rsa-sha256; cv=none; b=VSsq5YskiYShcjJUuV+pwY7mxaFicTc1fSOyCA9yDT9ctaMYpt9+6ia2/ibZHRsVuD9ZNf 4TPhwhdKn1AfLJBRiuGHjbl0vsx0jZ/3ujoQbrwWzmnmsNy1fiwfin+Fv4jZIfy4EnPBKp POW1PoXZFt6LhjY1+QytLOldj6re3L6p0uWCXcLy5A/I1Bq36bsYhsNvzD2kwwFQAjuOpw 69pcnMWwupCtHT1Y2le+uC4ceFGvEkSHbwJ2HC8+nitzwO453ELqxPGeFplVj240DjFI7F HLHZ5iM/wz/MfW1Li2b3xb6NXtSL53uWwbcb9fCM4GZtYtvG75j6Vb5KleUuYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=c37384665f0d67ee3ed992352982fd05db9314b5 commit c37384665f0d67ee3ed992352982fd05db9314b5 Author: Gleb Smirnoff AuthorDate: 2022-10-19 01:00:30 +0000 Commit: Gleb Smirnoff CommitDate: 2022-10-19 01:00:30 +0000 tcp: style the struct tcpcb definition - Use C99 types uintXX_t instead of u_intXX_t. - Try to make space/tab usage a little bit more consistent. - Shorten comments to fit into 80 chars. Not a functional change, just making future changes easier to read. --- sys/netinet/tcp_var.h | 52 +++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 607e8ff0162a..1c6e0bbccbab 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -148,25 +148,25 @@ struct tcpcb { tcp_seq snd_max; /* highest sequence number sent; * used to recognize retransmits */ - tcp_seq snd_nxt; /* send next */ - tcp_seq snd_up; /* send urgent pointer */ - uint32_t snd_wnd; /* send window */ - uint32_t snd_cwnd; /* congestion-controlled window */ + tcp_seq snd_nxt; /* send next */ + tcp_seq snd_up; /* send urgent pointer */ + uint32_t snd_wnd; /* send window */ + uint32_t snd_cwnd; /* congestion-controlled window */ uint32_t t_peakrate_thr; /* pre-calculated peak rate threshold */ /* Cache line 2 */ - u_int32_t ts_offset; /* our timestamp offset */ - u_int32_t rfbuf_ts; /* recv buffer autoscaling timestamp */ + uint32_t ts_offset; /* our timestamp offset */ + uint32_t rfbuf_ts; /* recv buffer autoscaling timestamp */ int rcv_numsacks; /* # distinct sack blks present */ - u_int t_tsomax; /* TSO total burst length limit in bytes */ + u_int t_tsomax; /* TSO total burst length limit */ u_int t_tsomaxsegcount; /* TSO maximum segment count */ u_int t_tsomaxsegsize; /* TSO maximum segment size in bytes */ tcp_seq rcv_nxt; /* receive next */ tcp_seq rcv_adv; /* advertised window */ - uint32_t rcv_wnd; /* receive window */ + uint32_t rcv_wnd; /* receive window */ u_int t_flags2; /* More tcpcb flags storage */ int t_srtt; /* smoothed round-trip time */ int t_rttvar; /* variance in round-trip time */ - u_int32_t ts_recent; /* timestamp echo data */ + uint32_t ts_recent; /* timestamp echo data */ u_char snd_scale; /* window scaling for send window */ u_char rcv_scale; /* window scaling for recv window */ u_char snd_limited; /* segments limited transmitted */ @@ -176,13 +176,13 @@ struct tcpcb { /* Cache line 3 */ tcp_seq rcv_up; /* receive urgent pointer */ int t_segqlen; /* segment reassembly queue length */ - uint32_t t_segqmbuflen; /* Count of bytes mbufs on all entries */ + uint32_t t_segqmbuflen; /* total reassembly queue byte length */ struct tsegqe_head t_segq; /* segment reassembly queue */ - struct mbuf *t_in_pkt; - struct mbuf *t_tail_pkt; + struct mbuf *t_in_pkt; + struct mbuf *t_tail_pkt; struct tcp_timer *t_timers; /* All the TCP timers in one struct */ struct vnet *t_vnet; /* back pointer to parent vnet */ - uint32_t snd_ssthresh; /* snd_cwnd size threshold for + uint32_t snd_ssthresh; /* snd_cwnd size threshold for * for slow start exponential to * linear switch */ @@ -206,8 +206,8 @@ struct tcpcb { tcp_seq t_rtseq; /* sequence number being timed */ u_int t_starttime; /* time connection was established */ - u_int t_fbyte_in; /* ticks time when first byte queued in */ - u_int t_fbyte_out; /* ticks time when first byte queued out */ + u_int t_fbyte_in; /* ticks time first byte queued in */ + u_int t_fbyte_out; /* ticks time first byte queued out */ u_int t_pmtud_saved_maxseg; /* pre-blackhole MSS */ int t_blackhole_enter; /* when to enter blackhole detection */ @@ -217,10 +217,10 @@ struct tcpcb { u_int t_rttbest; /* best rtt we've seen */ int t_softerror; /* possible error not yet reported */ - uint32_t max_sndwnd; /* largest window peer has offered */ + uint32_t max_sndwnd; /* largest window peer has offered */ /* Cache line 5 */ - uint32_t snd_cwnd_prev; /* cwnd prior to retransmit */ - uint32_t snd_ssthresh_prev; /* ssthresh prior to retransmit */ + uint32_t snd_cwnd_prev; /* cwnd prior to retransmit */ + uint32_t snd_ssthresh_prev; /* ssthresh prior to retransmit */ tcp_seq snd_recover_prev; /* snd_recover prior to retransmit */ int t_sndzerowin; /* zero-window updates sent */ u_long t_rttupdated; /* number of times rtt sampled */ @@ -241,7 +241,7 @@ struct tcpcb { struct cc_var *ccv; /* congestion control specific vars */ struct osd *osd; /* storage for Khelp module data */ int t_bytes_acked; /* # bytes acked during current RTT */ - u_int t_maxunacktime; + u_int t_maxunacktime; u_int t_keepinit; /* time to establish connection */ u_int t_keepidle; /* time before keepalive probes begin */ u_int t_keepintvl; /* interval between keepalives */ @@ -262,18 +262,18 @@ struct tcpcb { tcp_seq gput_seq; /* Outbound measurement seq */ tcp_seq gput_ack; /* Inbound measurement ack */ int32_t t_stats_gput_prev; /* XXXLAS: Prev gput measurement */ - uint32_t t_maxpeakrate; /* max peak rate set by user, in bytes/s */ + uint32_t t_maxpeakrate; /* max peak rate set by user, bytes/s */ uint32_t t_sndtlppack; /* tail loss probe packets sent */ uint64_t t_sndtlpbyte; /* total tail loss probe bytes sent */ uint64_t t_sndbytes; /* total bytes sent */ uint64_t t_snd_rxt_bytes; /* total bytes retransmitted */ - uint32_t t_dsack_bytes; /* Total number of dsack bytes we have received */ - uint32_t t_dsack_tlp_bytes; /* Total number of dsack bytes we have received for TLPs sent */ - uint32_t t_dsack_pack; /* Total dsack packets we have recieved */ - - uint8_t t_tfo_client_cookie_len; /* TCP Fast Open client cookie length */ + uint32_t t_dsack_bytes; /* dsack bytes received */ + uint32_t t_dsack_tlp_bytes; /* dsack bytes received for TLPs sent */ + uint32_t t_dsack_pack; /* dsack packets we have eceived */ + /* TCP Fast Open */ + uint8_t t_tfo_client_cookie_len; /* TFO client cookie length */ uint32_t t_end_info_status; /* Status flag of end info */ - unsigned int *t_tfo_pending; /* TCP Fast Open server pending counter */ + unsigned int *t_tfo_pending; /* TFO server pending counter */ union { uint8_t client[TCP_FASTOPEN_MAX_COOKIE_LEN]; uint64_t server;