public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: passt-dev@passt.top, Stefano Brivio <sbrivio@redhat.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH v2 2/6] flow: Indent flow details messages
Date: Wed, 17 Jun 2026 13:11:18 +1000	[thread overview]
Message-ID: <20260617031122.2086827-3-david@gibson.dropbear.id.au> (raw)
In-Reply-To: <20260617031122.2086827-1-david@gibson.dropbear.id.au>

flow_log__() has the option to append an extra log message with address
details of the flow, to give more context to errors or warnings.  Add an
indent to this part of the message, to emphasise that it's additional
information related to a nearby message, rather than a message in its own
right.

Suggested-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
 flow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/flow.c b/flow.c
index e71f3de7..2f1530b5 100644
--- a/flow.c
+++ b/flow.c
@@ -310,7 +310,7 @@ void flow_log__(const struct flow_common *f, int pri, bool perror, bool details,
 
 		if (state >= FLOW_STATE_TGT) {
 			flow_log__(f, pri, false, false, state,
-"%s [%s]:%hu -> [%s]:%hu => %s [%s]:%hu -> [%s]:%hu",
+"    %s [%s]:%hu -> [%s]:%hu => %s [%s]:%hu -> [%s]:%hu",
 				  pif_name(f->pif[INISIDE]),
 				  inany_ntop(&ini->eaddr, estr0, sizeof(estr0)),
 				  ini->eport,
@@ -323,7 +323,7 @@ void flow_log__(const struct flow_common *f, int pri, bool perror, bool details,
 				  tgt->eport);
 		} else if (state >= FLOW_STATE_INI) {
 			flow_log__(f, pri, false, false, state,
-				  "%s [%s]:%hu -> [%s]:%hu => ?",
+				  "    %s [%s]:%hu -> [%s]:%hu => ?",
 				  pif_name(f->pif[INISIDE]),
 				  inany_ntop(&ini->eaddr, estr0, sizeof(estr0)),
 				  ini->eport,
-- 
2.54.0


  parent reply	other threads:[~2026-06-17  3:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-17  3:11 [PATCH v2 0/6] Improvements to flow specific logging David Gibson
2026-06-17  3:11 ` [PATCH v2 1/6] flow: Regularise flow specific logging helpers David Gibson
2026-06-17  3:11 ` David Gibson [this message]
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

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=20260617031122.2086827-3-david@gibson.dropbear.id.au \
    --to=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    --cc=sbrivio@redhat.com \
    /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).