All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Andrii Nakryiko <andriin@fb.com>
Cc: bpf <bpf@vger.kernel.org>,
	Network Development <netdev@vger.kernel.org>,
	Alexei Starovoitov <ast@fb.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii.nakryiko@gmail.com>,
	Kernel Team <kernel-team@fb.com>,
	Nikita Shirokov <tehnerd@tehnerd.com>,
	Udip Pant <udippant@fb.com>
Subject: Re: [PATCH bpf] libbpf: fix XDP program load regression for old kernels
Date: Thu, 24 Sep 2020 10:34:33 -0700	[thread overview]
Message-ID: <CAADnVQLtxtMOsuBvt0U_UTLVuX-X__AWuih8t-CuGu67GbZJ_w@mail.gmail.com> (raw)
In-Reply-To: <20200924171705.3803628-1-andriin@fb.com>

On Thu, Sep 24, 2020 at 10:18 AM Andrii Nakryiko <andriin@fb.com> wrote:
>
> Fix regression in libbpf, introduced by XDP link change, which causes XDP
> programs to fail to be loaded into kernel due to specified BPF_XDP
> expected_attach_type. While kernel doesn't enforce expected_attach_type for
> BPF_PROG_TYPE_XDP, some old kernels already support XDP program, but they
> don't yet recognize expected_attach_type field in bpf_attr, so setting it to
> non-zero value causes program load to fail.
>
> Luckily, libbpf already has a mechanism to deal with such cases, so just make
> expected_attach_type optional for XDP programs.
>
> Reported-by: Nikita Shirokov <tehnerd@tehnerd.com>
> Reported-by: Udip Pant <udippant@fb.com>
> Fixes: dc8698cac7aa ("libbpf: Add support for BPF XDP link")
> Signed-off-by: Andrii Nakryiko <andriin@fb.com>

Applied. Thanks

Looks like libbpf CI needs to add a few old kernels.

  reply	other threads:[~2020-09-24 17:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24 17:17 [PATCH bpf] libbpf: fix XDP program load regression for old kernels Andrii Nakryiko
2020-09-24 17:34 ` Alexei Starovoitov [this message]
2020-09-24 17:42   ` Andrii Nakryiko

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=CAADnVQLtxtMOsuBvt0U_UTLVuX-X__AWuih8t-CuGu67GbZJ_w@mail.gmail.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=tehnerd@tehnerd.com \
    --cc=udippant@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 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.