From: Martin KaFai Lau <martin.lau@linux.dev>
To: Quentin Deslandes <qde@naccy.de>
Cc: David Ahern <dsahern@gmail.com>,
Martin KaFai Lau <martin.lau@kernel.org>,
kernel-team@meta.com, netdev@vger.kernel.org
Subject: Re: [RFC iproute2 v5 1/3] ss: add support for BPF socket-local storage
Date: Wed, 17 Jan 2024 10:49:27 -0800 [thread overview]
Message-ID: <13b5ab0a-e906-485d-a803-8f6150f8694c@linux.dev> (raw)
In-Reply-To: <20240115164605.377690-2-qde@naccy.de>
On 1/15/24 8:46 AM, Quentin Deslandes wrote:
> +static struct rtattr *bpf_map_opts_alloc_rta(void)
> +{
> + struct rtattr *stgs_rta, *fd_rta;
> + size_t total_size;
> + unsigned int i;
> + void *buf;
> +
> + /* If bpf_map_opts.show_all == true, we will send an empty message to
> + * the kernel, which will return all the socket-local data attached to
> + * a socket, no matter their map ID. */
> + if (bpf_map_opts.show_all) {
> + total_size = RTA_LENGTH(0);
This addressed the issue I saw in v4. Thanks!
The set is already very useful in the current form. Thanks for working on it.
> + } else {
> + total_size = RTA_LENGTH(RTA_LENGTH(sizeof(int)) *
> + bpf_map_opts.nr_maps);
> + }
next prev parent reply other threads:[~2024-01-17 18:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-15 16:46 [RFC iproute2 v5 0/3] ss: pretty-printing BPF socket-local storage Quentin Deslandes
2024-01-15 16:46 ` [RFC iproute2 v5 1/3] ss: add support for " Quentin Deslandes
2024-01-17 18:49 ` Martin KaFai Lau [this message]
2024-01-15 16:46 ` [RFC iproute2 v5 2/3] ss: pretty-print " Quentin Deslandes
2024-01-15 17:11 ` Stephen Hemminger
2024-01-15 16:46 ` [RFC iproute2 v5 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=13b5ab0a-e906-485d-a803-8f6150f8694c@linux.dev \
--to=martin.lau@linux.dev \
--cc=dsahern@gmail.com \
--cc=kernel-team@meta.com \
--cc=martin.lau@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 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).