BPF List
 help / color / mirror / Atom feed
From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: "Jiri Olsa" <jolsa@kernel.org>,
	"Alexei Starovoitov" <ast@kernel.org>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	"Andrii Nakryiko" <andrii@kernel.org>
Cc: <bpf@vger.kernel.org>, "Martin KaFai Lau" <martin.lau@linux.dev>,
	"Eduard Zingerman" <eddyz87@gmail.com>,
	"Song Liu" <songliubraving@fb.com>, "Yonghong Song" <yhs@fb.com>,
	"Quentin Monnet" <qmo@kernel.org>
Subject: Re: [PATCHv3 bpf-next 3/3] bpftool: Add tracing_multi link info output
Date: Mon, 29 Jun 2026 10:28:08 -0700	[thread overview]
Message-ID: <DJLPKY6WJTBD.319506WRJ7EUI@gmail.com> (raw)
In-Reply-To: <20260629143844.862369-4-jolsa@kernel.org>

On Mon Jun 29, 2026 at 7:38 AM PDT, Jiri Olsa wrote:
> +	if (info.type == BPF_LINK_TYPE_TRACING_MULTI && !info.tracing_multi.ids) {
> +		count = info.tracing_multi.count;
> +		if (count) {
> +			ids = calloc(count, sizeof(__u32));
> +			addrs = calloc(count, sizeof(__u64));
> +			cookies = calloc(count, sizeof(__u64));
> +			if (!ids) {
> +				p_err("mem alloc failed");
> +				close(fd);
> +				free(cookies);
> +				free(addrs);
> +				free(ids);
> +				return -ENOMEM;
> +			}
> +			info.tracing_multi.ids = ptr_to_u64(ids);
> +			info.tracing_multi.addrs = ptr_to_u64(addrs);
> +			info.tracing_multi.cookies = ptr_to_u64(cookies);
> +			goto again;
> +		}

The above doesn't look correct.
Please de-llm your code before posting.

pw-bot: cr

  parent reply	other threads:[~2026-06-29 17:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-29 14:38 [PATCHv3 bpf-next 0/3] bpf: tracing_multi link info support Jiri Olsa
2026-06-29 14:38 ` [PATCHv3 bpf-next 1/3] bpf: Add " Jiri Olsa
2026-06-29 14:38 ` [PATCHv3 bpf-next 2/3] selftests/bpf: Add tracing_multi link info tests Jiri Olsa
2026-06-29 14:52   ` sashiko-bot
2026-06-29 14:38 ` [PATCHv3 bpf-next 3/3] bpftool: Add tracing_multi link info output Jiri Olsa
2026-06-29 14:53   ` sashiko-bot
2026-06-29 16:05   ` bot+bpf-ci
2026-06-29 20:51     ` Jiri Olsa
2026-06-29 17:28   ` Alexei Starovoitov [this message]
2026-06-29 20:02     ` Jiri Olsa

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=DJLPKY6WJTBD.319506WRJ7EUI@gmail.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=qmo@kernel.org \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox