public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: passt-dev@passt.top
Subject: Re: [PATCH v2 0/6] Improvements to flow specific logging
Date: Fri, 19 Jun 2026 13:10:44 +0200 (CEST)	[thread overview]
Message-ID: <20260619131044.30bdf848@elisabeth> (raw)
In-Reply-To: <20260617031122.2086827-1-david@gibson.dropbear.id.au>

On Wed, 17 Jun 2026 13:11:16 +1000
David Gibson <david@gibson.dropbear.id.au> 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


      parent reply	other threads:[~2026-06-19 11:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-17  3:11 David Gibson
2026-06-17  3:11 ` [PATCH v2 1/6] flow: Regularise flow specific logging helpers David Gibson
2026-06-17  3:11 ` [PATCH v2 2/6] flow: Indent flow details messages David Gibson
2026-06-17  3:11 ` [PATCH v2 3/6] flow: Include flow details with higher priority log messages David Gibson
2026-06-17  3:11 ` [PATCH v2 4/6] flow, udp: Fix errno handling in udp_flow_sock() David Gibson
2026-06-17  3:11 ` [PATCH v2 5/6] flow, treewide: Promote priority of selected flow-linked messages David Gibson
2026-06-17  5:23   ` Stefano Brivio
2026-06-17  3:11 ` [PATCH v2 6/6] udp: Improve messages for errors getting errors David Gibson
2026-06-19 11:10 ` Stefano Brivio [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260619131044.30bdf848@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).