From: Harold Huang <baymaxhuang@gmail.com>
To: xdp-newbies@vger.kernel.org
Subject: Use shared umem in CentOS 8.2(4.18.0-193.el8.x86_64)
Date: Wed, 20 Oct 2021 16:43:08 +0800 [thread overview]
Message-ID: <CAHJXk3b1Hj9Xp_v0gEXf6TB56-P7T=jVQ9_mzTVwhUFSKVJjOg@mail.gmail.com> (raw)
Hi, all
I see in libbpf 0.3 or higher version, xsk_socket__create_shared
function is added to support shared umem. I also want to use shared
umem in CentOS 8.2 with a native kernel 4.18.0-193.el8.x86_64. I have
updated libbpf to v0.4.0, but the samples/bpf/xsk_fwd is existed with
an exception:
libbpf: can't get next link: Invalid argument
The function is existed in bpf_obj_get_next_id where it calls sys_bpf.
The gdb trace is showed as followed:
#0 bpf_obj_get_next_id (start_id=0, next_id=0x7fffffffddc8, cmd=31)
at bpf.c:806
#1 0x0000000000421b4d in bpf_link_get_next_id (start_id=0,
next_id=0x7fffffffddc8) at bpf.c:830
#2 0x000000000042e393 in xsk_link_lookup (ifindex=1, prog_id=0x0,
link_fd=0x7fffffffde1c) at xsk.c:685
#3 0x000000000042e602 in xsk_probe_bpf_link () at xsk.c:740
#4 0x000000000042f0a9 in xsk_socket__create_shared (xsk_ptr=0x724838,
ifname=0x7fffffffe4e0 "peer0", queue_id=0, umem=0x7242d0,
rx=0x724778, tx=0x7247a8, fill=0x7247d8, comp=0x724808,
usr_config=0x650720 <port_params>) at xsk.c:1075
#5 0x0000000000403831 in port_init (params=0x650720 <port_params>) at
samples/bpf/xsk_fwd.c:499
#6 0x00000000004047c0 in main (argc=11, argv=0x7fffffffe1b8) at
samples/bpf/xsk_fwd.c:1012
Is there any way to support shared umem if I only updated the libbpf
with a native kernel version 4.18.0-193.el8.x86_64 in CentOS 8.2?
Thanks
reply other threads:[~2021-10-20 8:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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='CAHJXk3b1Hj9Xp_v0gEXf6TB56-P7T=jVQ9_mzTVwhUFSKVJjOg@mail.gmail.com' \
--to=baymaxhuang@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 read-only IMAP folder(s) and NNTP newsgroup(s).