linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "zhudi (E)" <zhudi2@huawei.com>
To: John Fastabend <john.fastabend@gmail.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"ast@kernel.org" <ast@kernel.org>,
	"daniel@iogearbox.net" <daniel@iogearbox.net>,
	"andrii@kernel.org" <andrii@kernel.org>,
	"kafai@fb.com" <kafai@fb.com>,
	"songliubraving@fb.com" <songliubraving@fb.com>,
	"yhs@fb.com" <yhs@fb.com>,
	"kpsingh@kernel.org" <kpsingh@kernel.org>,
	"jakub@cloudflare.com" <jakub@cloudflare.com>
Cc: "bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] bpf: support BPF_PROG_QUERY for progs attached to sockmap
Date: Sat, 23 Oct 2021 06:01:39 +0000	[thread overview]
Message-ID: <53eeb3e084bc4f7b8120516dd87d0517@huawei.com> (raw)

> Di Zhu wrote:
> > Right now there is no way to query whether BPF programs are
> > attached to a sockmap or not.
> >
> > we can use the standard interface in libbpf to query, such as:
> > bpf_prog_query(mapFd, BPF_SK_SKB_STREAM_PARSER, 0, NULL, ...);
> > the mapFd is the fd of sockmap.
> >
> > Signed-off-by: Di Zhu <zhudi2@huawei.com>
> > ---
> 
> LGTM, lets add a small test here as well
> 
>   ./tools/testing/selftests/bpf/prog_tests/sockmap_basic.c
> 
> Looks like we can just copy the sk_lookup.c test case which does
> the query tests for BPF_SK_LOOKUP.

 Thanks for your advice, I will add it in my patch.

> Also I don't think its required for this series, but a bpftool
> patch to query it would be useful as well if its doesn't just
> work with above.
> 
> Thanks!
> John

             reply	other threads:[~2021-10-23  6:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-23  6:01 zhudi (E) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-10-23  6:05 [PATCH] bpf: support BPF_PROG_QUERY for progs attached to sockmap zhudi (E)
2021-10-22 10:33 Di Zhu
2021-10-22 15:25 ` Alexei Starovoitov
2021-10-22 15:46 ` John Fastabend
2021-10-19 12:58 Di Zhu
2021-10-22  0:36 ` Alexei Starovoitov

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=53eeb3e084bc4f7b8120516dd87d0517@huawei.com \
    --to=zhudi2@huawei.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=jakub@cloudflare.com \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.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;
as well as URLs for NNTP newsgroup(s).