From: Stephen Hemminger <stephen@networkplumber.org>
To: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
Cc: netdev@vger.kernel.org, Quentin Deslandes <qde@naccy.de>
Subject: Re: [PATCH iproute2] ss: show extra info when '--processes' is not used
Date: Mon, 15 Jan 2024 09:07:10 -0800 [thread overview]
Message-ID: <20240115090710.1c57762f@hermes.local> (raw)
In-Reply-To: <20240113-ss-fix-ext-col-disabled-v1-1-cf99a7381dec@kernel.org>
On Sat, 13 Jan 2024 18:10:21 +0100
"Matthieu Baerts (NGI0)" <matttbe@kernel.org> wrote:
> A recent modification broke "extra" options for all protocols showing
> info about the processes when '-p' / '--processes' option was not used
> as well. In other words, all the additional bits displayed at the end or
> at the next line were no longer printed if the user didn't ask to show
> info about processes as well.
>
> The reason is that, the "current_field" pointer never switched to the
> "Ext" column. If the user didn't ask to display the processes, nothing
> happened when trying to print extra bits using the "out()" function,
> because the current field was still pointing to the "Process" one, now
> marked as disabled.
>
> Before the commit mentioned below, it was not an issue not to switch to
> the "Ext" or "Process" columns because they were never marked as
> "disabled".
>
> Here is a quick list of options that were no longer displayed if '-p' /
> '--processes' was not set:
>
> - AF_INET(6):
> -o, --options
> -e, --extended
> --tos
> --cgroup
> --inet-sockopt
> -m, --memory
> -i, --info
>
> - AF_PACKET:
> -e, --extended
>
> - AF_XDP:
> -e, --extended
>
> - AF_UNIX:
> -m, --memory
> -e, --extended
>
> - TIPC:
> --tipcinfo
>
> That was just by quickly reading the code, I probably missed some. But
> this shows that the impact can be quite important for all scripts using
> 'ss' to monitor connections or to report info.
>
> Fixes: 1607bf53 ("ss: prevent "Process" column from being printed unless requested")
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> ---
This needs more review and testing before being merged.
"once burned, twice shy"
next prev parent reply other threads:[~2024-01-15 17:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-13 17:10 [PATCH iproute2] ss: show extra info when '--processes' is not used Matthieu Baerts (NGI0)
2024-01-15 17:07 ` Stephen Hemminger [this message]
2024-01-17 17:20 ` patchwork-bot+netdevbpf
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=20240115090710.1c57762f@hermes.local \
--to=stephen@networkplumber.org \
--cc=matttbe@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=qde@naccy.de \
/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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.