All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yaniv Agman <yanivagman@gmail.com>
To: memxor@gmail.com
Cc: andrii@kernel.org, ast@kernel.org, bpf@vger.kernel.org,
	daniel@iogearbox.net, netdev@vger.kernel.org, toke@redhat.com
Subject: Re: [PATCH bpf-next 0/3] Fixes for TC-BPF series
Date: Mon, 14 Jun 2021 12:32:07 +0300	[thread overview]
Message-ID: <CAMy7=ZUXRJni3uUVWkWFu8Dkc5XCVsM54i_iLDwHQ5Y0Z3inJw@mail.gmail.com> (raw)

Hi Kartikeya,

I recently started experimenting with the new tc-bpf API (which is
great, many thanks!) and I wanted to share a potential problem I
found.
I'm using this "Fixes for TC-BPF series" thread to write about it, but
it is not directly related to this patch set.

According to the API summary given in
https://lore.kernel.org/bpf/20210512103451.989420-3-memxor@gmail.com/,
"It is advised that if the qdisc is operated on by many programs,
then the program at least check that there are no other existing
filters before deleting the clsact qdisc."
In the example given, one should:

/* set opts as NULL, as we're not really interested in
* getting any info for a particular filter, but just
* detecting its presence.
*/
r = bpf_tc_query(&hook, NULL);

However, following in this summary, where bpf_tc_query is described,
it is written that the opts argument cannot be NULL.
And indeed, when I tried to use the example above, an error (EINVAL)
was returned (as expected?)

Am I missing something?

Yaniv

             reply	other threads:[~2021-06-14  9:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-14  9:32 Yaniv Agman [this message]
2021-06-14 10:18 ` [PATCH bpf-next 0/3] Fixes for TC-BPF series Kumar Kartikeya Dwivedi
2021-06-14 11:08   ` Yaniv Agman
  -- strict thread matches above, loose matches on Subject: below --
2021-06-12  2:34 Kumar Kartikeya Dwivedi

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='CAMy7=ZUXRJni3uUVWkWFu8Dkc5XCVsM54i_iLDwHQ5Y0Z3inJw@mail.gmail.com' \
    --to=yanivagman@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=memxor@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=toke@redhat.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 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.