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=cNxScWob; 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 AB6B85A0262 for ; Fri, 19 Jun 2026 13:10:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1781867449; 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=G0DTV4L0Rls9noU+pUeXSrce26pPAi1V23gIirqKjQQ=; b=cNxScWob9qmD4/ARgaDvZglfHRAMO662uCvw9exjxURRNQH6fQsoejiyWcs1ZOUyfl+lvc sIQFVTPG5GHGwEXN3m0bzEh25xajrWz2et1FKROj3X77AI+K4R/1KVTRX5SMfBHJjLDyxg 09NBkV9deoTjybIKH2wp2KoECqD2fP4= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-505-64FaFRhdPUORNtqC3bvo2w-1; Fri, 19 Jun 2026 07:10:48 -0400 X-MC-Unique: 64FaFRhdPUORNtqC3bvo2w-1 X-Mimecast-MFC-AGG-ID: 64FaFRhdPUORNtqC3bvo2w_1781867447 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-465874136a7so340275f8f.0 for ; Fri, 19 Jun 2026 04:10:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781867447; x=1782472247; h=date:content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=G0DTV4L0Rls9noU+pUeXSrce26pPAi1V23gIirqKjQQ=; b=eR/wOFjcwAfT5KityXun5og3wA5AbCfYzoglZbFcdqAJIS/qR0wgOQZoh5CUB59eWc 3+uSiUoy+n8Nv9Z2bNtdwtuP2gfcw2z4TSw3DvUApx6AE5uSmkatqMFCaIQ9+nSBg9OA MpionbDt1Rp2Wy4cq+XT+owKyQySDe36nkcFLLltDx+ejtYhbJ1rG+sBmG5UdlJTZJnd MikgqfzHafygD+BM8C/mMFGEq8SxSjmqB1Bo3l1dZUHzh4tCgWPh9p0YmHyWpaRPE3bh IXqo2cWrW/kyr/OPoT3yC/10aXwrltUFSkR0i/DfwzP1PKI0K+QPN/4HYvjX9YF0+jZa TECQ== X-Gm-Message-State: AOJu0Yze3zyrQXDsRo6GfuCTCRXeop6C62MzcnFBir/aUNW3Q2VyzbOL R2CoB5DTPHYcrOmGSDQ9zXzWg51CAgoJ0LSqDkypf0yRxCXq3mqLeIKKwX0m+hHwoyBSMFpWOL4 qcXtAjSL9Ar0BZpHLm9LUOHBKu9ut7q5voDHM0ejbDYDfWfMUZ23b5SKd017ZXg== X-Gm-Gg: AfdE7cm/FMviHDMF2QM13ZLFSF+WiEAo46rKGxempntmc4u4AyKpo6PZhxHQNdNztPz UthqPBp60VsPLcn6wf6CP03Ocj98eBlVbhxZJThj4eRcRrgxiKoH8gpsfoSNQJds1EBzRFrcr+k R/PsFQrfwY5+rOvVJUyzwFoZKb7+h19oSTaDnV7GQmI+9/inVYZBKCMiQwNuMe2egZbLeGZK+e2 G9oshL1Uc2ZekRJVOdFSFx138PVKrX04nL/zNRbACcDTtpCmYA7G5XJeO4FCXpIjeh4ID+Yj2Zv DTqbafaHZQmLoTLGM+RwBPFaSgkNCyO4ye36ZMhOHl+74Q+cCF5wU+m400kSpI7Vrc6m7gVqoZQ kQGVzA41oiW6oxDohEjKh/qTP/GSuM5PU5yHFZMI= X-Received: by 2002:a05:600c:8485:b0:492:3d74:63ea with SMTP id 5b1f17b1804b1-4923f571ad4mr65835235e9.18.1781867446684; Fri, 19 Jun 2026 04:10:46 -0700 (PDT) X-Received: by 2002:a05:600c:8485:b0:492:3d74:63ea with SMTP id 5b1f17b1804b1-4923f571ad4mr65834085e9.18.1781867445932; Fri, 19 Jun 2026 04:10:45 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4923fce9590sm61896975e9.4.2026.06.19.04.10.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jun 2026 04:10:45 -0700 (PDT) From: Stefano Brivio To: David Gibson Subject: Re: [PATCH v2 0/6] Improvements to flow specific logging Message-ID: <20260619131044.30bdf848@elisabeth> In-Reply-To: <20260617031122.2086827-1-david@gibson.dropbear.id.au> References: <20260617031122.2086827-1-david@gibson.dropbear.id.au> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 Date: Fri, 19 Jun 2026 13:10:44 +0200 (CEST) X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: I816Uk4Sk5LuAjhQbQ7IpAFjwhQj6aXR7DSmyGJkeM4_1781867447 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: Y6MUSEZEIRZ4RMLSTJDUKLNA4WCWVNS4 X-Message-ID-Hash: Y6MUSEZEIRZ4RMLSTJDUKLNA4WCWVNS4 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 Wed, 17 Jun 2026 13:11:16 +1000 David Gibson wrote: > While working on podman bug 23739, I found some deficiences in how and > when we report various socket errors related to specific flows. Here > are some preliminary patches to improve that. > > I think patches 1..3 are pretty straightforward and safe. 4/4 I think > is a good idea in principle - promoting the priority of a number of > messages now that we have ratelimiting. However, plumbing 'now' all > the places we need it resuls in a *lot* of churn, so we might want to > postpone or split it up. > > Still, current drafted posted for consideration. > > v2: > * Added patch 2/6 At Stefano's suggestion > * Simplified the errno Handling fix at Stefano's suggestion > * Added patch 6/6 which I noticed while revising 5/6. > * Made a handful of minor corrections based on feedback. > > David Gibson (6): > flow: Regularise flow specific logging helpers > flow: Indent flow details messages > flow: Include flow details with higher priority log messages > flow, udp: Fix errno handling in udp_flow_sock() > flow, treewide: Promote priority of selected flow-linked messages > udp: Improve messages for errors getting errors I was about to apply this without 6/6 because it leads cppcheck (at least my version, but the warning appears obviously correct) to complain that: --- udp.c:583:20: style: Local variable 'uflow' shadows outer variable [shadowVariable] struct udp_flow *uflow = udp_at_sidx(sidx); ^ udp.c:576:19: note: Shadowed declaration struct udp_flow *uflow; ^ udp.c:583:20: note: Shadow variable struct udp_flow *uflow = udp_at_sidx(sidx); ^ --- and Coverity Scan to report this: --- /home/sbrivio/passt/udp.c:727:3: Type: Extra argument to printf format specifier (PRINTF_ARGS) /home/sbrivio/passt/udp.c:727:3: extra_argument: This argument was not used by the format string: "s". /home/sbrivio/passt/flow.c:290:2: printf_function: Calling "vsnprintf" which uses a "printf"-style format string. [Note: The source code implementation of the function has been overridden by a builtin model.] --- but this warning, coming from 1/6 (oops, I didn't spot that myself), reported by clang-tidy, is a bit more fundamental for the whole series: /home/sbrivio/passt/flow.c:281:6: error: function 'flow_log__' is within a recursive call chain [misc-no-recursion,-warnings-as-errors] 281 | void flow_log__(const struct flow_common *f, int pri, bool perror, bool details, | ^ /home/sbrivio/passt/flow.c:281:6: note: example recursive call chain, starting from function 'flow_log__' /home/sbrivio/passt/flow.c:312:4: note: Frame #1: function 'flow_log__' calls function 'flow_log__' here: 312 | flow_log__(f, pri, false, false, state, | ^ /home/sbrivio/passt/flow.c:312:4: note: ... which was the starting point of the recursive call chain; there may be other cycles ...so I didn't proceed for the moment. I guess you meant to call flow_log() there instead, but I'm not sure I should fix it up like that, as I guess you checked some specific stuff with this version which might be broken if I just fix it. -- Stefano