From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202510 header.b=jMcY7HDF; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id C321A5A0619 for ; Wed, 15 Oct 2025 01:27:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202510; t=1760484469; bh=fsDI8/pl1PEVR54P6RxN83vINtf9Y1Bgd5OkxeccAhg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jMcY7HDFWBHT/4ZfAqZ0HYgHxXt/1rJdzTvtqByf53NLB7gqm/CQe+wGYZYfxD7uu rfLiu/02ufvclo7757BFBe+koI5pSjmWajmUhUxIzFaB1z/nBWOpoulIYYqODpjVDf S12esJ1D+zjp89rdJ5IU4NrwzvdA9PeRod9wtOus9ErR70C+upteXC8q0++hXpudPx IFXYoSG9Mq347zwOYbXm1rg4NyvrGC7juivbiT6GwW1TkDmGiV22qTXq7KUGFE18ke S5duhXP7i52Dj8aK0ldDsOC/GY+O5R8zTjyOHJemcnDkkYYYtefrx8Z6djiv95bztG ozATXb7B1wwKQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4cmVkY5cKKz4w8x; Wed, 15 Oct 2025 10:27:49 +1100 (AEDT) Date: Wed, 15 Oct 2025 09:50:25 +1100 From: David Gibson To: Yumei Huang Subject: Re: [PATCH v3 1/4] tcp: Rename "retrans" to "retries" Message-ID: References: <20251014073836.18150-1-yuhuang@redhat.com> <20251014073836.18150-2-yuhuang@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="P6OqXuW5ZA/Q+9Q7" Content-Disposition: inline In-Reply-To: <20251014073836.18150-2-yuhuang@redhat.com> Message-ID-Hash: JQGZWCKMIKVGYYWSL4JKW4RFLPYFZDCA X-Message-ID-Hash: JQGZWCKMIKVGYYWSL4JKW4RFLPYFZDCA X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top, sbrivio@redhat.com X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --P6OqXuW5ZA/Q+9Q7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 14, 2025 at 03:38:33PM +0800, Yumei Huang wrote: > Rename "retrans" to "retries" so it can be used for SYN retries. >=20 > Signed-off-by: Yumei Huang Reviewed-by: David Gibson Btw, if the patch hasn't changed, you can keep the Reviewed-by line =66rom previous versions of the series. > --- > tcp.c | 12 ++++++------ > tcp_conn.h | 12 ++++++------ > 2 files changed, 12 insertions(+), 12 deletions(-) >=20 > diff --git a/tcp.c b/tcp.c > index 0f9e9b3..2ec4b0c 100644 > --- a/tcp.c > +++ b/tcp.c > @@ -186,7 +186,7 @@ > * - ACK_TIMEOUT: if no ACK segment was received from tap/guest, after s= ending > * data (flag ACK_FROM_TAP_DUE with ESTABLISHED event), re-send data f= rom the > * socket and reset sequence to what was acknowledged. If this persist= s for > - * more than TCP_MAX_RETRANS times in a row, reset the connection > + * more than TCP_MAX_RETRIES times in a row, reset the connection > * > * - FIN_TIMEOUT: if a FIN segment was sent to tap/guest (flag ACK_FROM_= TAP_DUE > * with TAP_FIN_SENT event), and no ACK is received within this time, = reset > @@ -1127,7 +1127,7 @@ static void tcp_update_seqack_from_tap(const struct= ctx *c, > if (SEQ_LT(seq, conn->seq_to_tap)) > conn_flag(c, conn, ACK_FROM_TAP_DUE); > =20 > - conn->retrans =3D 0; > + conn->retries =3D 0; > conn->seq_ack_from_tap =3D seq; > } > } > @@ -2414,7 +2414,7 @@ void tcp_timer_handler(const struct ctx *c, union e= poll_ref ref) > } else if (CONN_HAS(conn, SOCK_FIN_SENT | TAP_FIN_ACKED)) { > flow_dbg(conn, "FIN timeout"); > tcp_rst(c, conn); > - } else if (conn->retrans =3D=3D TCP_MAX_RETRANS) { > + } else if (conn->retries =3D=3D TCP_MAX_RETRIES) { > flow_dbg(conn, "retransmissions count exceeded"); > tcp_rst(c, conn); > } else { > @@ -2423,7 +2423,7 @@ void tcp_timer_handler(const struct ctx *c, union e= poll_ref ref) > if (!conn->wnd_from_tap) > conn->wnd_from_tap =3D 1; /* Zero-window probe */ > =20 > - conn->retrans++; > + conn->retries++; > if (tcp_rewind_seq(c, conn)) > return; > =20 > @@ -3382,7 +3382,7 @@ static int tcp_flow_repair_opt(const struct tcp_tap= _conn *conn, > int tcp_flow_migrate_source(int fd, struct tcp_tap_conn *conn) > { > struct tcp_tap_transfer t =3D { > - .retrans =3D conn->retrans, > + .retries =3D conn->retries, > .ws_from_tap =3D conn->ws_from_tap, > .ws_to_tap =3D conn->ws_to_tap, > .events =3D conn->events, > @@ -3662,7 +3662,7 @@ int tcp_flow_migrate_target(struct ctx *c, int fd) > memcpy(&flow->f.side, &t.side, sizeof(flow->f.side)); > conn =3D FLOW_SET_TYPE(flow, FLOW_TCP, tcp); > =20 > - conn->retrans =3D t.retrans; > + conn->retries =3D t.retries; > conn->ws_from_tap =3D t.ws_from_tap; > conn->ws_to_tap =3D t.ws_to_tap; > conn->events =3D t.events; > diff --git a/tcp_conn.h b/tcp_conn.h > index 38b5c54..e5c8146 100644 > --- a/tcp_conn.h > +++ b/tcp_conn.h > @@ -13,7 +13,7 @@ > * struct tcp_tap_conn - Descriptor for a TCP connection (not spliced) > * @f: Generic flow information > * @in_epoll: Is the connection in the epoll set? > - * @retrans: Number of retransmissions occurred due to ACK_TIMEOUT > + * @retries: Number of retries occurred due to timeouts > * @ws_from_tap: Window scaling factor advertised from tap/guest > * @ws_to_tap: Window scaling factor advertised to tap/guest > * @tap_mss: MSS advertised by tap/guest, rounded to 2 ^ TCP_MSS_BITS > @@ -38,9 +38,9 @@ struct tcp_tap_conn { > =20 > bool in_epoll :1; > =20 > -#define TCP_RETRANS_BITS 3 > - unsigned int retrans :TCP_RETRANS_BITS; > -#define TCP_MAX_RETRANS MAX_FROM_BITS(TCP_RETRANS_BITS) > +#define TCP_RETRIES_BITS 3 > + unsigned int retries :TCP_RETRIES_BITS; > +#define TCP_MAX_RETRIES MAX_FROM_BITS(TCP_RETRIES_BITS) > =20 > #define TCP_WS_BITS 4 /* RFC 7323 */ > #define TCP_WS_MAX 14 > @@ -102,7 +102,7 @@ struct tcp_tap_conn { > * struct tcp_tap_transfer - Migrated TCP data, flow table part, network= order > * @pif: Interfaces for each side of the flow > * @side: Addresses and ports for each side of the flow > - * @retrans: Number of retransmissions occurred due to ACK_TIMEOUT > + * @retries: Number of retries occurred due to timeouts > * @ws_from_tap: Window scaling factor advertised from tap/guest > * @ws_to_tap: Window scaling factor advertised to tap/guest > * @events: Connection events, implying connection states > @@ -122,7 +122,7 @@ struct tcp_tap_transfer { > uint8_t pif[SIDES]; > struct flowside side[SIDES]; > =20 > - uint8_t retrans; > + uint8_t retries; > uint8_t ws_from_tap; > uint8_t ws_to_tap; > uint8_t events; > --=20 > 2.47.0 >=20 --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --P6OqXuW5ZA/Q+9Q7 Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmju06wACgkQzQJF27ox 2GesGhAApCQg91eou5gbg5DLHeGuWjwrMMBHuGytgpScRxme9Ab8RH7JWqVoCO0C Jdk0jfolDQXNcv2ZN6jiYcijlzzjYYckFqW68GCY6/jwf4R4eAokjMzwZNo190rL Zi34Kx1vvVS6FeR7LreArYjUX22PiNBDUyoryH9+VyBhoQcHrkp/K01BYNCmW7XL DfumKu8pC0A7h089CiFgq73t75f0gDYvDJiTZtA5cBuKzjn1D7cevU38D/qJbHLs oCB2Q7vQlIMepoxaeNlk5HBVUwSHrTYsFIbhVXZOZQVVw4/RnDBXxy+W5FNlLgss v2QEm8dYzubQK3P2ox3Va4mBbYcb3xUsB+3gFRZgbP0WUzGHDawMmHa220MbktYk pohh7VS5q/yGSO9N8J/LNFoggGAxITMA/VF3an576+LMdixSNJXQinszcmkqeqzG mz9NyPW9Rl7fdCHCDTXiIw8Myr2TMZ/2L+fFWV8Y4WaIC7zfxpO5X3zjkNePqHiq OO+AAanmlRJzjwCuVFckf36QFeqRTdiIThsuokR2yZ/HfN/rsN35c6VDLyQtY9Xq Fkm3TWsCOrDXlylqbEoKDTOPBuQn+su821MjhCsvXqg99uOlRWEkWT1kcmNkkCWz gn1zGXMr7f/FA4xjis9mhLwIEUGW8TpUCI5ICk8VU2sdlhj2TC8= =ali2 -----END PGP SIGNATURE----- --P6OqXuW5ZA/Q+9Q7--