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=202512 header.b=EzxP2OmF; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id D3D595A0652 for ; Sat, 20 Dec 2025 07:58:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202512; t=1766213927; bh=EsRWiCEbvEIhWpK/LGskQ2xnGQ5MJNXVh8DN8Bw1z/U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EzxP2OmF4kre3mQl449UHwiuUejpAESMIPtWHsjJWMk5S2OotS4TWFHej2d/EgvRt cxCzfkERiCgMXEzBfhjUdlh1u+QSEpXb3QT34umtxGrDKqgPICdZiNbAn2MiKRZLak rhr5ioN1WgTKM+Ja2Jpqs+RUGKAusfijx86A0yzm4NqHN1bTZ61ePlLV3/hvUfTmJP 8/x872PxB1cq+D73S3dNaRG36evlwoXm9YLjRKrtThmj0+geZ3BmseUkFX929lZqms GQiyzjnEnhQkFr/29Pkp6u8lJx9V7guq6nqafoNQCFRcDbtRsiiN3txh0wj3kArN31 Kb3abUROmQpGA== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4dYFcR4Tr8z4wC1; Sat, 20 Dec 2025 17:58:47 +1100 (AEDT) Date: Sat, 20 Dec 2025 16:49:13 +1100 From: David Gibson To: Laurent Vivier Subject: Re: [PATCH v2] tcp: Update EPOLL_TYPE_TCP_TIMER fd Message-ID: References: <20251218145724.2841017-1-lvivier@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="V29Z13eJf5pdaO7K" Content-Disposition: inline In-Reply-To: <20251218145724.2841017-1-lvivier@redhat.com> Message-ID-Hash: NN4AOEYNQXD5QXZGUTBTIHYAENU6NG47 X-Message-ID-Hash: NN4AOEYNQXD5QXZGUTBTIHYAENU6NG47 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 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: --V29Z13eJf5pdaO7K Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 18, 2025 at 03:57:24PM +0100, Laurent Vivier wrote: > For consistency with other epoll events, set the fd field to the file > descriptor actually added by epoll_ctl() (conn->timer), rather than > conn->sock. >=20 > This is a no-op change as ref.fd is not currently used in > tcp_timer_handler(). >=20 > Signed-off-by: Laurent Vivier Reviewed-by: David Gibson > --- > tcp.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/tcp.c b/tcp.c > index b179e3991236..6e6156098c12 100644 > --- a/tcp.c > +++ b/tcp.c > @@ -554,7 +554,7 @@ static int tcp_epoll_ctl(const struct ctx *c, struct = tcp_tap_conn *conn) > =20 > if (conn->timer !=3D -1) { > union epoll_ref ref_t =3D { .type =3D EPOLL_TYPE_TCP_TIMER, > - .fd =3D conn->sock, > + .fd =3D conn->timer, > .flow =3D FLOW_IDX(conn) }; > struct epoll_event ev_t =3D { .data.u64 =3D ref_t.u64, > .events =3D EPOLLIN | EPOLLET }; > @@ -582,7 +582,6 @@ static void tcp_timer_ctl(const struct ctx *c, struct= tcp_tap_conn *conn) > =20 > if (conn->timer =3D=3D -1) { > union epoll_ref ref =3D { .type =3D EPOLL_TYPE_TCP_TIMER, > - .fd =3D conn->sock, > .flow =3D FLOW_IDX(conn) }; > struct epoll_event ev =3D { .data.u64 =3D ref.u64, > .events =3D EPOLLIN | EPOLLET }; > @@ -598,6 +597,7 @@ static void tcp_timer_ctl(const struct ctx *c, struct= tcp_tap_conn *conn) > return; > } > conn->timer =3D fd; > + ref.fd =3D conn->timer; > =20 > if (epoll_ctl(epollfd, EPOLL_CTL_ADD, conn->timer, &ev)) { > flow_dbg_perror(conn, "failed to add timer"); > --=20 > 2.51.1 >=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 --V29Z13eJf5pdaO7K Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmlGOMcACgkQzQJF27ox 2GeNjw//QxPJWF7Q4rT6hgdcF/pGvS7G2/GLqnaGJvikWMJD+FxxuvAlnqPmavod ZUWGp+b2yweE0qS4q+2oH4cg8RYMxLW61Iykl7s8sof+HXkIls8mdSyYZk46di0I H1u3t8Ce6qdGj/xhcuf/OFzmBiFvgXojQfh2yRBSTBnld/87rhW++BpQc1pmkHoU UtOzLyMbyLU54A6f3BhVU4YW/8ddvgP9DsTfQDkoF2MnvUtJoQdGOCF5lHM4+bcN r5RSwN4A+wB+bSS4TXCyFOzWn6qRJLxmGd4BLUdn3VnYzLauMzfXApeCB/AESrMG PCw1ZkqW1ZPUTnsqpfrIl4QWOCi+EnoUhzFiYVAc3OWcyJ7p1nflOaojG5qMdbYm WzZstEs7PNvfLhaj/XR40rcrXpRmeCKsHJIWPdT03L2rdMPOSVFBT35nR5e6x46G zFaU+JldwyPIZMhl4zZTegUg6JVtth7RE1Pk5LuoYgcHLDyvVBkxx14eFllIRkhp DgDgQsgcGfIU+6wC/FQcbyS4sGfL7WyWaWfE082VXswp5gmlaQ8XcNA+XsPbJsCm RyqZgZEolJ8J3avUbVRv0ISoJJqTrzbKp9qSUPVlWoD3oVWGjqBFggbA6Fd26sru NWD0e5V89G3Xj34ty2gvxKmDkoP0RE5QsjqiR2vAfpBXxip3u5o= =tc4l -----END PGP SIGNATURE----- --V29Z13eJf5pdaO7K--