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=maakVJxP; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 6675B5A065B for ; Sat, 20 Dec 2025 10:39:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202512; t=1766223567; bh=YlusOyoIjI2AhVqsAZ5MpoOk1Od+6xoKAPUO0fKVNDM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=maakVJxPYJJM7oRf4RxH4c9ZurmRkJ6fZqlP9IyaJ//mXoTofB5utf+00x0Jd+0p8 xjmm/Ct9nZofeAb7U15ckzHL+UIOttc/PQquY0trvnT/SjxTRDGeV0k2N9Qb1fJAKn bIQI3zqe2ja+YKvdkOwTZQqUsG7aMGubFsYloNTVaXFtzfkZErYK578XPRQuZ7uQ6E gQolkJ6927fbO/c1SLXbH/UWC0VsCNU9ms1ATq2ymZhQf0ltuEubmbYTzO8swciT5H LfI9MHl2m+CtnvgVWdfV6uPmWznZq3pgF+wQVQMvAlYXrfhBojeA8yl31TuavTkFBn GuKp5t06D5sJA== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4dYK9q4wcgz4wGs; Sat, 20 Dec 2025 20:39:27 +1100 (AEDT) Date: Sat, 20 Dec 2025 18:40:12 +1100 From: David Gibson To: Laurent Vivier Subject: Re: [PATCH 1/7] tcp: Update EPOLL_TYPE_TCP_TIMER fd Message-ID: References: <20251219164518.930012-1-lvivier@redhat.com> <20251219164518.930012-2-lvivier@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gzYAlvHIJLQdAGoS" Content-Disposition: inline In-Reply-To: <20251219164518.930012-2-lvivier@redhat.com> Message-ID-Hash: BNUA4OLWOURKHBL6XY6OQHHJJC4GU5TH X-Message-ID-Hash: BNUA4OLWOURKHBL6XY6OQHHJJC4GU5TH 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: --gzYAlvHIJLQdAGoS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 19, 2025 at 05:45:12PM +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 --gzYAlvHIJLQdAGoS Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmlGUqcACgkQzQJF27ox 2GdtFxAAlFbbak8T6yNVOtu21ZSat5+pbPrGVBmcINugqvmvqy7bpD44E0HWqLq7 A2VjlRUxhTxFpiIQj63RTjuZX8x4hdnT0Sl3aBzltuTLYjDYb0veoVjKwvhx7xCY mnOz2Txz2I/cJFr7yLr8MJNnWmn6+3q+MH5JmfRzCPVnGe0f6hdgWqgRk7uA3Pya cslxjQ9rTp3mlYdJ3d5D33yR1c7r5hLY2UgBlQPDcWLfBfIStH/V0fFTvM6soOuo TaaksWNHkUCx5FVw9RBHvNFa6We58hMbJ2khnKk6w1VnHdghowXrbQn9uwmOgaZG Jcx+fDedw4HOvuLr/7e2PswNzvYtx+7DEGkC/LcrntATdkIYoPhUiRrqCEbAQ/hj 2VT1Fw6+J6ClwWKabtadQcnwhDZkwLCkWg+Wt1IzKQjVbYkhylHuDpI5nL43li5Z 7M+46xMPih/XQ9Bd01I775bC8MZmXTAdeydzCs9PtyPAm2rxZiERqJqjB7/KjURR b/y8iDF3DESZvlOgf0TKv1dpabLUuyISq6i1r3mvzneVHWZ9vP7O0/q5M9+enbC9 p3wFoStgXI7tFI5Mukt5wq0T61D90JXakeq4akYrOoccUUTMbl48q9SKpa46CTbA ID3PsPbzlxu/OpGi5/u8zlFagZ0dw5bvg1KaS8tqCwNQk0VDRu4= =b0DQ -----END PGP SIGNATURE----- --gzYAlvHIJLQdAGoS--