netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Quentin Deslandes <qde@naccy.de>, netdev@vger.kernel.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	David Ahern <dsahern@gmail.com>,
	Martin KaFai Lau <martin.lau@kernel.org>,
	kernel-team@meta.com
Subject: Re: [RFC iproute2 v6 2/3] ss: pretty-print BPF socket-local storage
Date: Mon, 12 Feb 2024 17:40:00 +0100	[thread overview]
Message-ID: <26fb6ad4-3c06-46e8-a966-b75698fbf3b6@kernel.org> (raw)
In-Reply-To: <b8297ad5-5962-4d9f-acbf-0bb70a3035da@naccy.de>

Hi Quentin,

Thank you for your reply!

On 12/02/2024 16:22, Quentin Deslandes wrote:
> On 2024-01-18 11:49, Matthieu Baerts wrote:

(...)

>> Here, it seems a bit confusing: if I understand correctly, these extra
>> and optional bits are handled first, then back to the previous column
>> you added (COL_SKSTOR) to always iterate over the BPF storages, and
>> maybe print more stuff only if the new option is given, optionally on
>> new lines. Would it not print errors even if we didn't ask to display
>> them, e.g. if the size is different from the expected one?
>> Would it not be simpler to extend the last column?
>> If you do that, you will naturally only fetch and iterate over the BPF
>> storages if it is asked to print something, no?
> 
> Absolutely, I fixed the patches to reflect this: no more COL_SKSTOR, but
> appending to COL_EXT instead. If --oneline is used, the BPF map's content
> will be printed following the content of COL_EXT, on one line. If --oneline is
> not used, then each map is pretty-printed starting on a new line following
> the content of COL_EXT.
> 
> I'll send a v7 very soon :)

Thanks, the v7 looks better! I will let BPF experts to look at this :)

>> To be honest, it looks like there are too many options that can be
>> displayed, and there are probably already enough columns. That's
>> certainly why no other columns have been added for years. I don't know
>> why there was an exception for the "Process" one, but OK.
>> I do think it would be better to have a new "--json" option to structure
>> the output and ease the parsing, than having workarounds to improve the
>> output and ease parsing of some options. But that's a more important task :)
> 
> This was suggested at some point. JSON output would be great, but both
> features are not mutually exclusive :)

Indeed. If the support was already there, it would have maybe eased the
printing bit. We just need someone who is brave enough to add this
feature :)

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.

  reply	other threads:[~2024-02-12 16:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-18  3:15 [RFC iproute2 v6 0/3] ss: pretty-printing BPF socket-local storage Quentin Deslandes
2024-01-18  3:15 ` [RFC iproute2 v6 1/3] ss: add support for " Quentin Deslandes
2024-01-18  3:15 ` [RFC iproute2 v6 2/3] ss: pretty-print " Quentin Deslandes
2024-01-18 10:49   ` Matthieu Baerts
2024-02-12 15:22     ` Quentin Deslandes
2024-02-12 16:40       ` Matthieu Baerts [this message]
2024-01-18  3:15 ` [RFC iproute2 v6 3/3] ss: update man page to document --bpf-maps and --bpf-map-id= Quentin Deslandes

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=26fb6ad4-3c06-46e8-a966-b75698fbf3b6@kernel.org \
    --to=matttbe@kernel.org \
    --cc=dsahern@gmail.com \
    --cc=kernel-team@meta.com \
    --cc=martin.lau@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=qde@naccy.de \
    --cc=stephen@networkplumber.org \
    /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 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 NNTP newsgroup(s).