From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id B8A665A0272 for ; Sat, 4 Nov 2023 07:11:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1699078279; bh=fM3eeW+zoAD3SS45P1x36pnXPQX8LKVWe8X67pTcaH0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Va+gu0YaO3s4qZ0VUj7DOkP2L+eOrEFmVaAqHE4GIOGoPNscy14pXkZQodV+608T9 z63uuknaQ7IHzMJjMOwHXFOQxOidzikRV+AnESADQ7btfqiCcKGPVKZd9B5p6ZJVp4 YymYhR3qA3Z71xwYQXr3GgdSFS7AcPe9Prwv27kU= Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4SMnLH4lSPz4xWh; Sat, 4 Nov 2023 17:11:19 +1100 (AEDT) Date: Sat, 4 Nov 2023 16:56:37 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH 03/11] tcp_splice: Don't handle EPOLL_CTL_DEL as part of tcp_splice_epoll_ctl() Message-ID: References: <20231012015114.2612066-1-david@gibson.dropbear.id.au> <20231012015114.2612066-4-david@gibson.dropbear.id.au> <20231103172053.22f07d27@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="odgNsx+yTlZQxcsp" Content-Disposition: inline In-Reply-To: <20231103172053.22f07d27@elisabeth> Message-ID-Hash: AQXKFBFHP4TNGGOLHIETCNB4O6OW5L2E X-Message-ID-Hash: AQXKFBFHP4TNGGOLHIETCNB4O6OW5L2E 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: --odgNsx+yTlZQxcsp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 03, 2023 at 05:20:53PM +0100, Stefano Brivio wrote: > On Thu, 12 Oct 2023 12:51:06 +1100 > David Gibson wrote: >=20 > > tcp_splice_epoll_ctl() removes both sockets from the epoll set if called > > when conn->flags & CLOSING. This will always happen immediately after > > setting that flag, since conn_flag_do() makes the call itself. That's = also > > the _only_ time it can happen: we perform the EPOLL_CTL_DEL without > > clearing the conn->in_epoll flag, meaning that any further calls to > > tcp_splice_epoll_ctl() would attempt EPOLL_CTL_MOD, which would necessa= rily > > fail since the fds are no longer in the epoll. > >=20 > > The EPOLL_CTL_DEL path in tcp_splice_epoll_ctl() has essentially zero > > overlap with anything else the function does, so just move them to be > > open coded in conn_flag_do(). > >=20 > > Caveat: this does require kernel 2.6.9 or later, in order to pass NULL = as > > the event structure for epoll_ctl(). I _think_ we already require newer > > kernels than that for other features. >=20 > Yes, we do, we need at least 3.13 for unprivileged user namespaces. Thanks, message updated accordingly. --=20 David Gibson | 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 --odgNsx+yTlZQxcsp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmVF3P4ACgkQzQJF27ox 2GfL4w/7B5YzTzUt365fDcNj0dQ60JGVnyRCwwpXfpLkszLtckKxEXscKdHOVWPN jAAUgDMxcwTx3DUaSKh+kSOVsI9n6EathfbQJ+0Cf6eJ71ji6mIKz1Aa2wDMjqPD ev2XIenYvmU0NomqBiIgszVioq9ljpLP6vEZfctCGu5Vu1CYCFOSbAj/TA7AUxPW IyaVIFh7J1U9JHgPbij2ofubuDYSTrqFH5nSJv7qM7v3xggP7QStoq/ijgouiYfv 4T6leNskkTKVgXmwREH2ojojBdx5g+rLEQNV5wRulX5kXRpFNzHVCt6LzyE6wzOx logWM57cvnoSp6vdAh0EQ+hzW943k1IbaTDLEpDFsUKKbgiGzGwXJDKsoky01ik6 xOyUkVlJqY56zANNFlxYo/2R03MTq/AVdo3AGjhAwvFYTCPaQVsHmblbop4Cpg8f 92U5CWJBM+6khz9d0xqe8+XBcROmwcYX1B0DVswWXjdG65+dZhTHMCMe5SFfkrS6 6bqMpQy49aK2GxtghtmWVzLxgyebxqRt4dY9KMLv4F7+iEtxWjdEAy5Nq3RZ6uR4 DAEGXPQ7QfHfxPXOhzB93uW5tUFfbSxe9K5n7JFrzbNdhfwzc8nQigQNbS6Pb/BI ZO/8Ew6NNhn61dLihAcCZYpP0jSq/GTPy01k4QrLs6RDMPrwzmQ= =76TP -----END PGP SIGNATURE----- --odgNsx+yTlZQxcsp--