xdp-newbies.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Elerion <elerion1000@gmail.com>, xdp-newbies@vger.kernel.org
Subject: Re: Error loading xdp program that worked with bpf_load
Date: Wed, 10 Jun 2020 23:06:10 +0200	[thread overview]
Message-ID: <87imfy7hrx.fsf@toke.dk> (raw)
In-Reply-To: <CAMDScmnpbPgs+mB_aMY16aXLMMWBgfu0sqna06MH8RPoGpw7_Q@mail.gmail.com>

Elerion <elerion1000@gmail.com> writes:

> I used this to load my xdp program
> https://github.com/torvalds/linux/blob/master/samples/bpf/bpf_load.c
> but it doesn't seem to work on new style maps so I am using libbpf
> bpf_object__open now.
>
> But now it shows this
>
> libbpf: Error loading BTF: Invalid argument(22)
> libbpf: magic: 0xeb9f
> version: 1
> flags: 0x0
> hdr_len: 24
> type_off: 0
> type_len: 2088
> str_off: 2088
> str_len: 11234
> btf_total_size: 13346
> [1] STRUCT (anon) size=32 vlen=4
>         type type_id=2 bits_offset=0
>         max_entries type_id=6 bits_offset=64
>         key type_id=8 bits_offset=128
>         value type_id=12 bits_offset=192
> [2] PTR (anon) type_id=4
> [3] INT int size=4 bits_offset=0 nr_bits=32 encoding=SIGNED
> more type information....
> libbpf: Error loading .BTF into kernel: -22.
>
> How do I fix this?

Usually the last line of type information (which it looks like you
snipped above?) contains the error, although sometimes it can be hard to
spot because it looks like part of the type...

-Toke

  reply	other threads:[~2020-06-10 21:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-10 21:01 Error loading xdp program that worked with bpf_load Elerion
2020-06-10 21:06 ` Toke Høiland-Jørgensen [this message]
2020-06-10 21:08   ` Elerion
2020-06-10 21:37     ` Toke Høiland-Jørgensen
2020-06-10 21:44       ` Elerion
2020-06-10 21:50       ` Elerion
2020-06-11 10:59         ` Jesper Dangaard Brouer
2020-06-11 16:34           ` Andrii Nakryiko
2020-06-11 16:39             ` [iovisor-dev] " Alexei Starovoitov
2020-06-11 20:40             ` Elerion
2020-06-11 20:46               ` Andrii Nakryiko
2020-06-11 21:11                 ` Elerion

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=87imfy7hrx.fsf@toke.dk \
    --to=toke@redhat.com \
    --cc=elerion1000@gmail.com \
    --cc=xdp-newbies@vger.kernel.org \
    /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).