From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id 59A425A0082 for ; Tue, 14 Feb 2023 17:27:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676392072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NSUg4RqZEcvxzUn9Q9WUlMoJPVi+dEC5ne1azqm/DAs=; b=H4hbZpT6HbCYLEJLWdNRVDKLgnVT5VVNiknauGEIS8+jfi9AX+s/W9tLzJiAFjHJ8CzT2h fC1W6dUilPlvCswgz7aA8uToV3Pa4fHSGc8wZ5OMUt/AHM07/FMWwRXLd3WonVE7rWfMR/ hnk0kJdJP1KMBUCsJS+N1rxn69pHC40= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-516-hr2xULSdPqebcWCv6kleCg-1; Tue, 14 Feb 2023 11:27:49 -0500 X-MC-Unique: hr2xULSdPqebcWCv6kleCg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 041113848C33; Tue, 14 Feb 2023 16:27:49 +0000 (UTC) Received: from maya.cloud.tilaa.com (unknown [10.33.32.3]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D4BB2400D927; Tue, 14 Feb 2023 16:27:48 +0000 (UTC) Date: Tue, 14 Feb 2023 17:27:46 +0100 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH v2 0/5] Cleanups to tcp socket pool handling Message-ID: <20230214172746.7657d125@elisabeth> In-Reply-To: <20230213234823.749379-1-david@gibson.dropbear.id.au> References: <20230213234823.749379-1-david@gibson.dropbear.id.au> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: Q2FCZ66WSX3YIWBII3UW2XFBADL2GSPD X-Message-ID-Hash: Q2FCZ66WSX3YIWBII3UW2XFBADL2GSPD X-MailFrom: sbrivio@redhat.com 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.3 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: On Tue, 14 Feb 2023 10:48:18 +1100 David Gibson wrote: > This is a bit of a diversion from what I'm notionally working on at > the moment. While thinking about what we'd need to use the > IP_TRANSPARENT socket option to broaden the cases where we can > "splice", I noticed some inelegancies in how we handle the pool of > pre-opened sockets in the TCP code, and well, here we are. > > This makes a number of cleanups to the handling of these pools. Most > notably, tcp_splice_connect() now has simpler semantics: it now always > runs in the init namespace, and is always given a pre-opened socket > (which could be in the guest ns). > > Changes since v1: > * Rebased > * Improved wording of some commit messages > > David Gibson (5): > tcp: Make a helper to refill each socket pool > tcp: Split init and ns cases for tcp_sock_refill() > tcp: Move socket pool declarations around > tcp: Split pool lookup from creating new sockets in > tcp_conn_new_sock() > tcp: Improve handling of fallback if socket pool is empty on new > splice Applied too. -- Stefano