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=Ggs910Nj; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 408945A004E for ; Fri, 09 Jan 2026 00:09:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202512; t=1767913740; bh=hy3XbPA4fyIFX0t6d4bqLgQ5RH0harZnr11tI5gciSg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ggs910NjYxz2au7RC9bmtumFSpyhC112b8/anPWzGfDZ2BiOXlicv7onFYkzNREXF zf7y4sGn0/KhJP2WIZ+IPYEXZjc5RtzzpCbWgGlLC0QZRi241O9ne6676PwwcUEymu K5SzNFYzWXqB7INsGFchAVuVDONfq0iaH3oD4grxfU2GsvI9RlMxR2Y5K5v3VXY/HG y1DFOBNg3+YA83K2zsaqEhUfm4pr7lOV58vtVzLofmE8vQ8s08JrgDrl/BqhTSsR4R m1P/uKMblCHDi6oben/ZAHnfXbPCQ369RWrt+hzOC37wHJNr7V4fUSwWU+RLGx2K4b 8iB3gOpGNotzg== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4dnLF83SX8z4wR9; Fri, 09 Jan 2026 10:09:00 +1100 (AEDT) Date: Fri, 9 Jan 2026 10:08:46 +1100 From: David Gibson To: Laurent Vivier Subject: Re: [PATCH] tcp: remove timer update in tcp_epoll_ctl() Message-ID: References: <20260108122241.859728-1-lvivier@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="n2cXE2Rc/EXhqQG3" Content-Disposition: inline In-Reply-To: <20260108122241.859728-1-lvivier@redhat.com> Message-ID-Hash: L7RKSJKHIX7AD2Q4DFO2ZM5ZL25IDMLP X-Message-ID-Hash: L7RKSJKHIX7AD2Q4DFO2ZM5ZL25IDMLP 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: --n2cXE2Rc/EXhqQG3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 08, 2026 at 01:22:41PM +0100, Laurent Vivier wrote: > Timer update in tcp_epoll_ctl() has been added by > bb708111833e ("treewide: Packet abstraction with mandatory boundary che= cks") > because epoll_ref stores "conn - tc" that can change in tcp_table_compact= (). >=20 > But since > e2e8219f13b8 ("flow, tcp: Consolidate flow pointer<->index helpers") > we use FLOW_IDX() and since > 8981a720aac4 ("flow: Avoid moving flow entries to compact table") > flow table doesn't use a compaction procedure so FLOW_IDX() never changes. >=20 > Updating the timer event is now a no-op, remove it from tcp_epoll_ctl(). >=20 > Fixes: 8981a720aac4 ("flow: Avoid moving flow entries to compact table") > Signed-off-by: Laurent Vivier Nice catch. Reviewed-by: David Gibson > --- > tcp.c | 12 ------------ > 1 file changed, 12 deletions(-) >=20 > diff --git a/tcp.c b/tcp.c > index e7fa85f346b2..5141cdc7e839 100644 > --- a/tcp.c > +++ b/tcp.c > @@ -552,18 +552,6 @@ static int tcp_epoll_ctl(const struct ctx *c, struct= tcp_tap_conn *conn) > =20 > flow_epollid_set(&conn->f, EPOLLFD_ID_DEFAULT); > =20 > - if (conn->timer !=3D -1) { > - union epoll_ref ref_t =3D { .type =3D EPOLL_TYPE_TCP_TIMER, > - .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 }; > - > - if (epoll_ctl(flow_epollfd(&conn->f), EPOLL_CTL_MOD, > - conn->timer, &ev_t)) > - return -errno; > - } > - > return 0; > } > =20 > --=20 > 2.52.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 --n2cXE2Rc/EXhqQG3 Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmlgOPoACgkQzQJF27ox 2Geo/Q//YqajtdDYYWOEJvZ3mDqxw7heybLwqhuYBq54a6WCLK+SOoKufuX0p8oJ bOEFk2R1ccJ0ytTmVfX8pFZmRjFVzvcSTCM0mpH0Zpq/4NSrbpQmmG8BoVKe7rP5 KNRWsKiMPDcHJbDYuZvXlCdWq2Ooi+65getDATMtgjPwdn2xQN9T4brajozOmlS0 xsPvTJdSbbU0zUIDZeX7TyR5P38IIDckA2Igp5vWrj5TAH2UKSmGY+2Gy4Uwr/eX uiWqiF81dcyvU/tWbQDYgDQS8ieX+Ezr6DA30bM5aYtZTkCmx9wau1Q+IHrwSmPt ytHsHhHczI0zCQFr+Kq4afU5gvhngQQTe78/nNeMuJowFGdAyT9+joDGPlW+UrZT WB1Yel5CEgJg8PIKZ5W/oD2vgWCcpJMXa8oonhKdNkkkdTb/mAA/Y7BiNIFmEiBF L1O/vKIBJ2HtRMKw7TSpTGCvM5ixZsAxEHoKV0uou+MZkHac3N0PQi9WYFPJ4JO6 NT4j4RoBIyQebNY/wuu7s6tcyTDUmiCEKsgbfhZi2zFOMHzCAq75dZqC57Yqp95i G5BopIm1jxBCFRNResel0uMa7UYun7G9SOOPzGp/MJTHhQxJSJdUbwr+YDE6HkwC FZjmCDSIh9Troe41UZpMApli1W6asnoWvVzhco77Jzb0MhOLe50= =8GCC -----END PGP SIGNATURE----- --n2cXE2Rc/EXhqQG3--