From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none 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=RQheiBRV; dkim-atps=neutral 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 220F65A004C for ; Thu, 05 Sep 2024 13:33:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725535992; 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=6MM3ApCjVTQ3XiHjkzwFUubhMgASn9Aj8bG3PbkhmWs=; b=RQheiBRVxPacPWNrHGljkL5uVs9jwziT/o9RVYYf9eZwu/6/VrWImyUEv/THmUppVGAWzw Wk7ISzt+xVoiSyxW5loPSq08TTJtA8Y6gxVOZ+FMP0bNmzZjdk/v83pceAf65k2JEpqX4T Z4DIfbtAyToRc51b1sGrajkRlsCUTGw= Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-456-W5yPFfF8Mv2QayydofwlRw-1; Thu, 05 Sep 2024 07:33:11 -0400 X-MC-Unique: W5yPFfF8Mv2QayydofwlRw-1 Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-2021ab2b5e6so10816825ad.0 for ; Thu, 05 Sep 2024 04:33:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725535989; x=1726140789; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=6MM3ApCjVTQ3XiHjkzwFUubhMgASn9Aj8bG3PbkhmWs=; b=NckVlR1VFvdun089f3ksglNka9lYkLEHccaAwAxMKp3anGBReHPadDmLZXZqsO0tsS 66U1Y1vdCT4nDfRpMIqSwEe/n70ceJ9yQmJizgb1q1rLD2sv9ukCtuLLlI1O5fgcpqn2 ad6CM+g8E/jJIg04LSkTk8qlaxCuHYeF5mZXy3K2cPDUvQl5ItgwMXS7iBsQ+8j5YXls c/161s3nMVaDnRND19OO0fat+oywsrKjVTd7d9X3/00xDqOFZb6hrSCLfFKnGv6p6QmQ cUb60uhtEUxiZB06+KT6faQNM172gHeK2/csY+JGMfrdhz736v3BoZBQsCJJAQWvekxJ VDqw== X-Gm-Message-State: AOJu0YzzqobDrktChFX62vX5Gk/GuWo1HrS74e4ihZ692Ms5ciauv8Lh Bwc4NLWIFLfYfCXdLIU8cshLbU2TDLHhpl9L5uIlk4KPKaxVjjog3ATbBzUn8N1JQZOMK6cgWd9 y/D92MmWRQpykJHd9rTiWz1ymXCPeKY94QXUcY6LLXxECw4YlNPs1hF5PWQ== X-Received: by 2002:a17:902:e550:b0:203:a0b4:3e28 with SMTP id d9443c01a7336-20544514e69mr167206465ad.27.1725535989202; Thu, 05 Sep 2024 04:33:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHHTpjbjXbuh48xV9faQYGV3WSYJw3hd3q9BvzUqgo/0UuB7I4nsZlorL9rzCM8omclSmWYyw== X-Received: by 2002:a17:902:e550:b0:203:a0b4:3e28 with SMTP id d9443c01a7336-20544514e69mr167206175ad.27.1725535988684; Thu, 05 Sep 2024 04:33:08 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-206aea55535sm27011245ad.203.2024.09.05.04.33.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 04:33:08 -0700 (PDT) Date: Thu, 5 Sep 2024 13:33:05 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 0/6] RFC: Clean up tap-side event handling Message-ID: <20240905133305.1d6bcbc4@elisabeth> In-Reply-To: <20240905103238.69431d8f@elisabeth> References: <20240903120235.1688429-1-david@gibson.dropbear.id.au> <20240903212554.036da194@elisabeth> <20240904191922.146bb53e@elisabeth> <20240905103238.69431d8f@elisabeth> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: QEBR5DYU7MIBRTCKUQRG4EGURSUMFO35 X-Message-ID-Hash: QEBR5DYU7MIBRTCKUQRG4EGURSUMFO35 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.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 Thu, 5 Sep 2024 10:32:38 +0200 Stefano Brivio wrote: > On Thu, 5 Sep 2024 10:35:14 +1000 > David Gibson wrote: > > > On Wed, Sep 04, 2024 at 07:19:22PM +0200, Stefano Brivio wrote: > > > On Wed, 4 Sep 2024 13:17:53 +1000 > > > David Gibson wrote: > > > > > > > On Tue, Sep 03, 2024 at 09:25:54PM +0200, Stefano Brivio wrote: > > > > > On Tue, 3 Sep 2024 22:02:29 +1000 > > > > > David Gibson wrote: > > > > > > > > > > > This is a draft patch working towards adding EPOLLOUT handling to the > > > > > > tap code, which could then be used to "unstick" flows which have > > > > > > unsent data from the socket side. For now that's just a stub, but > > > > > > makes what I think are some worthwhile cleanups to the tap side event > > > > > > handling in the meantime. > > > > > > > > > > Except for the issue in 3/6 and nits elsewhere, it all makes sense and > > > > > tap-side EPOLLOUT handling is definitely going to be an improvement. > > > > > > > > > > I wonder if it's the right moment for this kind of series, though, in > > > > > terms of future bisections, as long as we're grappling with > > > > > https://github.com/containers/podman/issues/23686 and > > > > > https://bugs.passt.top/show_bug.cgi?id=94. Assuming, of course, that > > > > > this series doesn't fix anything. > > > > > > > > I don't think this series will fix anything as it stands. It is, > > > > indirectly, aimed at addressing bug 94. I'm struggling to figure out > > > > what to do with bug 94, because I find it almost impossible to reason > > > > about the current event masks in TCP. > > > > > > I don't see at the moment anything indicating TCP issues other than the > > > one you addressed with your tentative debug patch at: > > > > > > https://passt.top/passt/commit/?h=podman23686&id=026fb71d1dde60135d95741552906fd5320384bc > > > > > > Given that, with that patch, we had at least another report of event > > > storms, this time on UDP, that is, the one from: > > > > > > https://github.com/containers/podman/issues/23686#issuecomment-2324945010 > > > > > > I shared this other one on top: > > > > > > https://passt.top/passt/commit/?h=podman23686&id=0c6c20dee5c24bd324834a99f409ad43c50812ae > > > > Ah, nice. > > > > > > I'd really like to simplify > > > > them so it's clearer what's correct and not and I think the most > > > > obvious path to doing so is using EPOLLET all the time. That requires > > > > some sort of kick when the tap is ready to accept more data, hence > > > > this series as a prerequisite. > > > > > > Sure, it's going to be simpler and more robust, but on the other hand > > > we wouldn't notice these kind of issues. > > > > Uh.. I'm confused. In what way would we not notice issues, other than > > the issues not existing which.. would be good, right? > > Right now, we have a condition where we fail to handle EPOLLRDHUP > before an outbound connection is established, see > https://github.com/containers/podman/issues/23686#issuecomment-233023742, Sorry, it's: https://github.com/containers/podman/issues/23686#issuecomment-2330237424 > and we end up in a tight event processing loop. > > I guess what we're missing in tcp_sock_handler() is clear (we should > orderly close the connection), but the tight loop didn't happen on > 2024_06_24.1ee2eca (I'm bisecting right now) and we don't know why it > didn't. > > If we set EPOLLET, we won't see that anymore, because the EPOLLRDHUP > event is reported just once, but that doesn't mean we solved this. -- Stefano