From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Viyv/vj/; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id 2453F5A004E for ; Tue, 20 Jan 2026 21:25:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1768940701; 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=lNKj/Y7CBLqrAKV1p0yqYv44f4X6ndJKIR97F5CYiYI=; b=Viyv/vj/qs6FJ6krqYrzU1nZjV8vU/SI//PwWEXKRJg82lcH82m9m++utBQxrxTEJaZeLC NVqIx80BGcEs+mCefGVdBx00LUfg/19lg9jqjVfCC5GMim3qg/RlrXizDzExxNVh/XrzE/ 20NPNk91xhpqUgge/8yc3SbAb8H+ViM= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-215-77t6XajZOQy5sTYqublvug-1; Tue, 20 Jan 2026 15:24:59 -0500 X-MC-Unique: 77t6XajZOQy5sTYqublvug-1 X-Mimecast-MFC-AGG-ID: 77t6XajZOQy5sTYqublvug_1768940698 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-432db1a9589so3749023f8f.0 for ; Tue, 20 Jan 2026 12:24:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768940698; x=1769545498; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lNKj/Y7CBLqrAKV1p0yqYv44f4X6ndJKIR97F5CYiYI=; b=aW11v0LPazsG7/XJiMhc0fu48w2wBGDtBK53favwjRLU+2RNi3Zbq9mXbxq4tSNLNk 9nnCvV7WTVzTieRg8FsT+O0uW2PfZejgPRoryRIFd4o7/wW2h6zl09VbzE9dtTgeX2jr u970b5jwVNMJZiKRpVFdiowsVqUK+oVQxlx13YxLASSNxA5PfqPJlr8MNrg38HC+hTEu Mja7QWjwwuoR5QLhnvpuWqQbgoZrDhuc0kZ5Ka9GkHraLqmIwZuYkDYCZRdTVnaAX5Hp 9mbWIPXE3uwmBHJA7bWWdfDkI2GSK7Int3U6hkm1lrOuAh0pY6YQyrFBcLQk8oTaw1Hx PveA== X-Gm-Message-State: AOJu0YxRET5u1U75PIGGNazepllbcHFAk/TYuLQiAUOKUYLAS1eIhChR FzETM4rJNdauAhfSR7nU1jKXHnVc3kSNc3IoQLqp8tg5v2vwyfY/vbqOlSyFm/0e1uCz9wufYt8 B/662S/XsEJLQ6e6DhB0hsWQKnQHMp0GYFXB5WcxZion7DZhd5sN08g== X-Gm-Gg: AY/fxX6ZwTC4hZ8AsoirgfRAXJADUaRwOV1zBqVtTXycSG69RW0ihpe3/1NZeSpPnWb RLc5/igY7l4LIgKsCzbUPi9E4ivBbem+9vPFFDCZwWFdAiL9hwjzNuzeF+ZacYziikwQXfjlHZU 0ArThBbJtEFoWAqGI2ApssAv/mUlr/Eo67uGNUQCgaf9CM93rF0udm/DPij1UEd3w0slgPhIxYR 7vDrAWPdp2ynH78KfaSfLFNaI8sBgOAmpGCQbsHA28I3w21sUnXb0VYrzCQjMGsxPyphZvz+4TF SJfmDH0YcfWlR7LfT3osBkTfXfPREGpvdaZZD+SrPwPb99P/SXEYvF5ZCzaqlfqOu72fQ5RjW7N fLE3mv76jGlFk5Y/ByoXM X-Received: by 2002:a05:600c:3f10:b0:480:1a22:fce8 with SMTP id 5b1f17b1804b1-4803e7f0dd9mr40654655e9.26.1768940697691; Tue, 20 Jan 2026 12:24:57 -0800 (PST) X-Received: by 2002:a05:600c:3f10:b0:480:1a22:fce8 with SMTP id 5b1f17b1804b1-4803e7f0dd9mr40654255e9.26.1768940697149; Tue, 20 Jan 2026 12:24:57 -0800 (PST) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43569921df9sm31895680f8f.3.2026.01.20.12.24.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jan 2026 12:24:56 -0800 (PST) Date: Tue, 20 Jan 2026 21:24:55 +0100 From: Stefano Brivio To: Laurent Vivier Subject: Re: [PATCH v2 0/3] Register TCP flows with epoll at creation time Message-ID: <20260120212455.6bef5d65@elisabeth> In-Reply-To: <20260119161915.4014677-1-lvivier@redhat.com> References: <20260119161915.4014677-1-lvivier@redhat.com> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: k9ogbkRea3IGA57kNDVsmWMcJQaK9FMBdOz84XZroeE_1768940698 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: YXAFG6NZNAZQ5BIFV62JBZD3DMVBTSH7 X-Message-ID-Hash: YXAFG6NZNAZQ5BIFV62JBZD3DMVBTSH7 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, David Gibson 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: On Mon, 19 Jan 2026 17:19:12 +0100 Laurent Vivier wrote: > This series simplifies epoll registration by moving it to flow creation > time rather than deferring it to the first event update. By registering > sockets with epoll immediately (using events=0), the epoll control > functions can always use EPOLL_CTL_MOD, eliminating the need to track > whether a flow is already registered. > > Patch 1 registers both splice sockets with epoll in tcp_splice_connect() > before initiating the connection, allowing tcp_splice_epoll_ctl() to > always use EPOLL_CTL_MOD. > > Patch 2 does the same for regular TCP connections in tcp_conn_from_tap(), > tcp_tap_conn_from_sock(), and tcp_flow_migrate_target(), simplifying > tcp_epoll_ctl() by removing the ADD/MOD conditional logic. > > Patch 3 removes EPOLLFD_ID_INVALID and related infrastructure now that > all flows are registered at creation: flow_in_epoll(), flow_epollid_clear(), > and the defensive checks in flow_epollfd(). Applied. -- Stefano