mvebu: cannot load XDP
DENG Qingfang
dqfext at gmail.com
Thu Jun 25 14:32:31 EDT 2020
Commit 76f9aa6f4bfd12fba34fc44aef890c48d4fb1024 should backport
support for mvneta XDP, but I can't load it.
# ip link set dev eth0 xdp obj /tmp/bpf.o sec xdp1
RTNETLINK answers: Not supported
strace output:
set_tls(0xb6f5f5d8) = 0
set_tid_address(0xb6f6018c) = 8909
open("/etc/ld-musl-armhf.path", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1
ENOENT (No such file or directory)
open("/lib/libelf.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
open("/usr/local/lib/libelf.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) =
-1 ENOENT (No such file or directory)
open("/usr/lib/libelf.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
fstat64(3, {st_mode=S_IFREG|0755, st_size=77827, ...}) = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\350&\0\0004\0\0\0"...,
936) = 936
mmap2(NULL, 147456, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xb6ec0000
mmap2(0xb6ee2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x12000) = 0xb6ee2000
close(3) = 0
open("/lib/libgcc_s.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=45059, ...}) = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0`E\0\0004\0\0\0"...,
936) = 936
mmap2(NULL, 114688, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xb6ea4000
mmap2(0xb6ebe000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0xa000) = 0xb6ebe000
close(3) = 0
open("/lib/libz.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No
such file or directory)
open("/usr/local/lib/libz.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1
ENOENT (No such file or directory)
open("/usr/lib/libz.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
fstat64(3, {st_mode=S_IFREG|0755, st_size=73731, ...}) = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0@\33\0\0004\0\0\0"...,
936) = 936
mmap2(NULL, 143360, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xb6e81000
mmap2(0xb6ea2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x11000) = 0xb6ea2000
close(3) = 0
mprotect(0xb6ee2000, 4096, PROT_READ) = 0
mprotect(0xb6ebe000, 4096, PROT_READ) = 0
mprotect(0xb6ea2000, 4096, PROT_READ) = 0
mprotect(0x81000, 4096, PROT_READ) = 0
socket(AF_NETLINK, SOCK_RAW|SOCK_CLOEXEC, NETLINK_ROUTE) = 3
setsockopt(3, SOL_SOCKET, SO_SNDBUF, [32768], 4) = 0
setsockopt(3, SOL_SOCKET, SO_RCVBUF, [1048576], 4) = 0
setsockopt(3, SOL_NETLINK, NETLINK_EXT_ACK, [1], 4) = 0
bind(3, {sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, 12) = 0
getsockname(3, {sa_family=AF_NETLINK, nl_pid=8909,
nl_groups=00000000}, [12]) = 0
clock_gettime(CLOCK_REALTIME, {tv_sec=1593109320, tv_nsec=784735572}) = 0
setsockopt(3, SOL_NETLINK, NETLINK_DUMP_STRICT_CHK, [1], 4) = 0
sendto(3, {{len=32, type=RTM_NEWLINK, flags=NLM_F_REQUEST|NLM_F_ACK,
seq=0, pid=0}, {ifi_family=AF_UNSPEC, ifi_type=ARPHRD_NETROM,
ifi_index=0, ifi_flags=0, ifi_change=0}}, 32, 0, NULL, 0) = 32
recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0,
nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=52,
type=NLMSG_ERROR, flags=0, seq=0, pid=8909}, {error=-ENODEV,
msg={{len=32, type=RTM_NEWLINK, flags=NLM_F_REQUEST|NLM_F_ACK, seq=0,
pid=0}, {ifi_family=AF_UNSPEC, ifi_type=ARPHRD_NETROM, ifi_index=0,
ifi_flags=0, ifi_change=0}}}}, iov_len=16384}], msg_iovlen=1,
msg_controllen=0, msg_flags=0}, 0) = 52
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1 RT_2], [], 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[], NULL, 8) = 0
prlimit64(0, RLIMIT_MEMLOCK, {rlim_cur=RLIM64_INFINITY,
rlim_max=RLIM64_INFINITY}, NULL) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
statfs64("/sys/fs/bpf", 88, 0xbe8492c0) = 0
mkdir("/sys/fs/bpf/tc/", 0700) = -1 EEXIST (File exists)
mkdir("/sys/fs/bpf/tc//globals/", 0700) = -1 EEXIST (File exists)
symlink("/sys/fs/bpf/tc/", "/sys/fs/bpf/tc") = -1 EEXIST (File exists)
lstat64("/sys/fs/bpf/tc", {st_mode=S_IFDIR|0700, st_size=0, ...}) = 0
mkdir("/sys/fs/bpf/tc/globals/", 0700) = -1 EEXIST (File exists)
symlink("/sys/fs/bpf/tc/", "/sys/fs/bpf/xdp") = -1 EEXIST (File exists)
lstat64("/sys/fs/bpf/xdp", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
symlink("/sys/fs/bpf/tc/", "/sys/fs/bpf/ip") = -1 EEXIST (File exists)
lstat64("/sys/fs/bpf/ip", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
symlink("/sys/fs/bpf/tc/", "/sys/fs/bpf/ip") = -1 EEXIST (File exists)
lstat64("/sys/fs/bpf/ip", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
symlink("/sys/fs/bpf/tc/", "/sys/fs/bpf/ip") = -1 EEXIST (File exists)
lstat64("/sys/fs/bpf/ip", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
open("/proc/sys/net/core/bpf_jit_enable", O_RDONLY|O_LARGEFILE) = 4
read(4, "1\n", 16) = 2
close(4) = 0
socket(AF_ALG, SOCK_SEQPACKET, 0) = -1 EAFNOSUPPORT (Address
family not supported by protocol)
open("/tmp/bpf.o", O_RDONLY|O_LARGEFILE) = 4
fcntl64(4, F_GETFD) = 0
fstat64(4, {st_mode=S_IFREG|0644, st_size=1120, ...}) = 0
pread64(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\1\0\367\0\1\0\0\0\0\0\0\0\0\0\0\0"...,
64, 0) = 64
fstat64(4, {st_mode=S_IFREG|0644, st_size=1120, ...}) = 0
open("/etc/iproute2/bpf_pinning", O_RDONLY|O_LARGEFILE) = -1 ENOENT
(No such file or directory)
pread64(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
512, 608) = 512
pread64(4, "\0.text\0xdp1\0"..., 96, 512) = 96
pread64(4, "\267\0\0\0\2\0\0\0a\22\4\0\0\0\0\0a\21\0\0\0\0\0\0\277\23\0\0\0\0\0\0"...,
256, 64) = 256
pread64(4, "GPL\0", 4, 320) = 4
pread64(4, "\20\0\0\0\0\0\0\0\1zR\0\10|\v\1\f\0\0\0\30\0\0\0\30\0\0\0\0\0\0\0"...,
48, 328) = 48
pread64(4, "\34\0\0\0\0\0\0\0\1\0\0\0\2\0\0\0", 16, 496) = 16
pread64(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0X\0\0\0\0\0\3\0"...,
120, 376) = 120
bpf(BPF_PROG_LOAD, {prog_type=BPF_PROG_TYPE_XDP, insn_cnt=32,
insns=0xcbcc0, license="GPL", log_level=0, log_size=0, log_buf=NULL,
kern_version=KERNEL_VERSION(0, 0, 0), prog_flags=0, prog_name="",
prog_ifindex=0, expected_attach_type=BPF_CGROUP_INET_INGRESS,
prog_btf_fd=0, func_info_rec_size=0, func_info=NULL, func_info_cnt=0,
line_info_rec_size=0, line_info=NULL, line_info_cnt=0,
attach_btf_id=0, attach_prog_fd=0}, 120) = 5
close(4) = 0
socket(AF_NETLINK, SOCK_RAW|SOCK_CLOEXEC, NETLINK_ROUTE) = 4
setsockopt(4, SOL_SOCKET, SO_SNDBUF, [32768], 4) = 0
setsockopt(4, SOL_SOCKET, SO_RCVBUF, [1048576], 4) = 0
setsockopt(4, SOL_NETLINK, NETLINK_EXT_ACK, [1], 4) = 0
bind(4, {sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, 12) = 0
getsockname(4, {sa_family=AF_NETLINK, nl_pid=-1742782509,
nl_groups=00000000}, [12]) = 0
clock_gettime(CLOCK_REALTIME, {tv_sec=1593109320, tv_nsec=804674444}) = 0
sendmsg(4, {msg_name={sa_family=AF_NETLINK, nl_pid=0,
nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=52,
type=RTM_GETLINK, flags=NLM_F_REQUEST, seq=1593109321, pid=0},
{ifi_family=AF_UNSPEC, ifi_type=ARPHRD_NETROM, ifi_index=0,
ifi_flags=0, ifi_change=0}, [{{nla_len=8, nla_type=IFLA_EXT_MASK}, 9},
{{nla_len=9, nla_type=IFLA_IFNAME}, "eth0"}]}, iov_len=52}],
msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 52
recvmsg(4, {msg_name={sa_family=AF_NETLINK, nl_pid=0,
nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=NULL,
iov_len=0}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_TRUNC},
MSG_PEEK|MSG_TRUNC) = 952
brk(NULL) = 0xb42000
brk(0xb4b000) = 0xb4b000
recvmsg(4, {msg_name={sa_family=AF_NETLINK, nl_pid=0,
nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=952,
type=RTM_NEWLINK, flags=0, seq=1593109321, pid=2552184787},
{ifi_family=AF_UNSPEC, ifi_type=ARPHRD_ETHER,
ifi_index=if_nametoindex("eth0"),
ifi_flags=IFF_UP|IFF_BROADCAST|IFF_RUNNING|IFF_MULTICAST|IFF_LOWER_UP,
ifi_change=0}, [{{nla_len=9, nla_type=IFLA_IFNAME}, "eth0"},
{{nla_len=8, nla_type=IFLA_TXQLEN}, 1024}, {{nla_len=5,
nla_type=IFLA_OPERSTATE}, 6}, {{nla_len=5, nla_type=IFLA_LINKMODE},
0}, {{nla_len=8, nla_type=IFLA_MTU}, 1508}, {{nla_len=8,
nla_type=IFLA_MIN_MTU}, 68}, {{nla_len=8, nla_type=IFLA_MAX_MTU},
9676}, {{nla_len=8, nla_type=IFLA_GROUP}, 0}, {{nla_len=8,
nla_type=IFLA_PROMISCUITY}, 5}, {{nla_len=8,
nla_type=IFLA_NUM_TX_QUEUES}, 8}, {{nla_len=8,
nla_type=IFLA_GSO_MAX_SEGS}, 100}, {{nla_len=8,
nla_type=IFLA_GSO_MAX_SIZE}, 65536}, {{nla_len=8,
nla_type=IFLA_NUM_RX_QUEUES}, 8}, {{nla_len=5, nla_type=IFLA_CARRIER},
1}, {{nla_len=7, nla_type=IFLA_QDISC}, "mq"}, {{nla_len=8,
nla_type=IFLA_CARRIER_CHANGES}, 2}, {{nla_len=5,
nla_type=IFLA_PROTO_DOWN}, 0}, {{nla_len=8,
nla_type=IFLA_CARRIER_UP_COUNT}, 1}, {{nla_len=8,
nla_type=IFLA_CARRIER_DOWN_COUNT}, 1}, {{nla_len=36,
nla_type=IFLA_MAP}, {mem_start=0, mem_end=0, base_addr=0, irq=37,
dma=0, port=0}}, {{nla_len=10, nla_type=IFLA_ADDRESS},
"\x14\x91\x82\x2f\x91\x23"}, {{nla_len=10, nla_type=IFLA_BROADCAST},
"\xff\xff\xff\xff\xff\xff"}, {{nla_len=7,
nla_type=IFLA_PHYS_PORT_NAME}, "p6"}, {{nla_len=196,
nla_type=IFLA_STATS64}, {rx_packets=111678, tx_packets=99993,
rx_bytes=70400081, tx_bytes=53954676, rx_errors=0, tx_errors=0,
rx_dropped=0, tx_dropped=0, multicast=0, collisions=0,
rx_length_errors=0, rx_over_errors=0, rx_crc_errors=0,
rx_frame_errors=0, rx_fifo_errors=0, rx_missed_errors=0,
tx_aborted_errors=0, tx_carrier_errors=0, tx_fifo_errors=0,
tx_heartbeat_errors=0, tx_window_errors=0, rx_compressed=0,
tx_compressed=0, rx_nohandler=0}}, {{nla_len=100,
nla_type=IFLA_STATS}, {rx_packets=111678, tx_packets=99993,
rx_bytes=70400081, tx_bytes=53954676, rx_errors=0, tx_errors=0,
rx_dropped=0, tx_dropped=0, multicast=0, collisions=0,
rx_length_errors=0, rx_over_errors=0, rx_crc_errors=0,
rx_frame_errors=0, rx_fifo_errors=0, rx_missed_errors=0,
tx_aborted_errors=0, tx_carrier_errors=0, tx_fifo_errors=0,
tx_heartbeat_errors=0, tx_window_errors=0, rx_compressed=0,
tx_compressed=0, rx_nohandler=0}}, {{nla_len=8, nla_type=IFLA_NUM_VF},
0}, {{nla_len=12, nla_type=IFLA_XDP}, {{nla_len=5,
nla_type=IFLA_XDP_ATTACHED}, XDP_ATTACHED_NONE}}, {{nla_len=380,
nla_type=IFLA_AF_SPEC}, [{{nla_len=136, nla_type=AF_INET},
{{nla_len=132, nla_type=IFLA_INET_CONF}, [[IPV4_DEVCONF_FORWARDING-1]
= 1, [IPV4_DEVCONF_MC_FORWARDING-1] = 0, [IPV4_DEVCONF_PROXY_ARP-1] =
0, [IPV4_DEVCONF_ACCEPT_REDIRECTS-1] = 1,
[IPV4_DEVCONF_SECURE_REDIRECTS-1] = 1, [IPV4_DEVCONF_SEND_REDIRECTS-1]
= 1, [IPV4_DEVCONF_SHARED_MEDIA-1] = 1, [IPV4_DEVCONF_RP_FILTER-1] =
0, [IPV4_DEVCONF_ACCEPT_SOURCE_ROUTE-1] = 1,
[IPV4_DEVCONF_BOOTP_RELAY-1] = 0, [IPV4_DEVCONF_LOG_MARTIANS-1] = 0,
[IPV4_DEVCONF_TAG-1] = 0, [IPV4_DEVCONF_ARPFILTER-1] = 0,
[IPV4_DEVCONF_MEDIUM_ID-1] = 0, [IPV4_DEVCONF_NOXFRM-1] = 0,
[IPV4_DEVCONF_NOPOLICY-1] = 0, [IPV4_DEVCONF_FORCE_IGMP_VERSION-1] =
0, [IPV4_DEVCONF_ARP_ANNOUNCE-1] = 0, [IPV4_DEVCONF_ARP_IGNORE-1] = 1,
[IPV4_DEVCONF_PROMOTE_SECONDARIES-1] = 0, [IPV4_DEVCONF_ARP_ACCEPT-1]
= 0, [IPV4_DEVCONF_ARP_NOTIFY-1] = 0, [IPV4_DEVCONF_ACCEPT_LOCAL-1] =
0, [IPV4_DEVCONF_SRC_VMARK-1] = 0, [IPV4_DEVCONF_PROXY_ARP_PVLAN-1] =
0, [IPV4_DEVCONF_ROUTE_LOCALNET-1] = 0,
[IPV4_DEVCONF_IGMPV2_UNSOLICITED_REPORT_INTERVAL-1] = 10000,
[IPV4_DEVCONF_IGMPV3_UNSOLICITED_REPORT_INTERVAL-1] = 1000,
[IPV4_DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN-1] = 0,
[IPV4_DEVCONF_DROP_UNICAST_IN_L2_MULTICAST-1] = 0,
[IPV4_DEVCONF_DROP_GRATUITOUS_ARP-1] = 0,
[IPV4_DEVCONF_BC_FORWARDING-1] = 0]}}, {{nla_len=240,
nla_type=AF_INET6}, [{{nla_len=8, nla_type=IFLA_INET6_FLAGS},
IF_READY}, {{nla_len=20, nla_type=IFLA_INET6_CACHEINFO},
{max_reasm_len=65535, tstamp=1947, reachable_time=43030,
retrans_time=1000}}, {{nla_len=208, nla_type=IFLA_INET6_CONF},
[[DEVCONF_FORWARDING] = 1, [DEVCONF_HOPLIMIT] = 64, [DEVCONF_MTU6] =
1508, [DEVCONF_ACCEPT_RA] = 0, [DEVCONF_ACCEPT_REDIRECTS] = 1,
[DEVCONF_AUTOCONF] = 1, [DEVCONF_DAD_TRANSMITS] = 1,
[DEVCONF_RTR_SOLICITS] = -1, [DEVCONF_RTR_SOLICIT_INTERVAL] = 4000,
[DEVCONF_RTR_SOLICIT_DELAY] = 1000, [DEVCONF_USE_TEMPADDR] = 0,
[DEVCONF_TEMP_VALID_LFT] = 604800, [DEVCONF_TEMP_PREFERED_LFT] =
86400, [DEVCONF_REGEN_MAX_RETRY] = 3, [DEVCONF_MAX_DESYNC_FACTOR] =
600, [DEVCONF_MAX_ADDRESSES] = 16, [DEVCONF_FORCE_MLD_VERSION] = 0,
[DEVCONF_ACCEPT_RA_DEFRTR] = 1, [DEVCONF_ACCEPT_RA_PINFO] = 1,
[DEVCONF_ACCEPT_RA_RTR_PREF] = 0, [DEVCONF_RTR_PROBE_INTERVAL] = 0,
[DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN] = 0, [DEVCONF_PROXY_NDP] = 0,
[DEVCONF_OPTIMISTIC_DAD] = 0, [DEVCONF_ACCEPT_SOURCE_ROUTE] = 0,
[DEVCONF_MC_FORWARDING] = 0, [DEVCONF_DISABLE_IPV6] = 0,
[DEVCONF_ACCEPT_DAD] = 1, [DEVCONF_FORCE_TLLAO] = 0,
[DEVCONF_NDISC_NOTIFY] = 0,
[DEVCONF_MLDV1_UNSOLICITED_REPORT_INTERVAL] = 10000,
[DEVCONF_MLDV2_UNSOLICITED_REPORT_INTERVAL] = 1000, ...]}]}]}]},
iov_len=32768}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) =
952
close(4) = 0
sendmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0,
nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=52,
type=RTM_NEWLINK, flags=NLM_F_REQUEST|NLM_F_ACK, seq=1593109321,
pid=0}, {ifi_family=AF_UNSPEC, ifi_type=ARPHRD_NETROM,
ifi_index=if_nametoindex("eth0"), ifi_flags=0, ifi_change=0},
{{nla_len=20, nla_type=IFLA_XDP}, [{{nla_len=8, nla_type=IFLA_XDP_FD},
5}, {{nla_len=8, nla_type=IFLA_XDP_FLAGS},
XDP_FLAGS_UPDATE_IF_NOEXIST}]}}, iov_len=52}], msg_iovlen=1,
msg_controllen=0, msg_flags=0}, 0) = 52
recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0,
nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=NULL,
iov_len=0}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_TRUNC},
MSG_PEEK|MSG_TRUNC) = 132
recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0,
nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=132,
type=NLMSG_ERROR, flags=NLM_F_ACK_TLVS, seq=1593109321, pid=8909},
{error=-EOPNOTSUPP, msg={{len=52, type=RTM_NEWLINK,
flags=NLM_F_REQUEST|NLM_F_ACK, seq=1593109321, pid=0},
{ifi_family=AF_UNSPEC, ifi_type=ARPHRD_NETROM,
ifi_index=if_nametoindex("eth0"), ifi_flags=0, ifi_change=0},
{{nla_len=20, nla_type=IFLA_XDP}, [{{nla_len=8, nla_type=IFLA_XDP_FD},
5}, {{nla_len=8, nla_type=IFLA_XDP_FLAGS},
XDP_FLAGS_UPDATE_IF_NOEXIST}]}}, {{nla_len=60,
nla_type=NLMSGERR_ATTR_MSG}, "mvneta: Hardware Buffer Manageme"...}}},
iov_len=32768}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) =
132
writev(2, [{iov_base="RTNETLINK answers: Not supported"...,
iov_len=33}, {iov_base=NULL, iov_len=0}], 2RTNETLINK answers: Not
supported
) = 33
exit_group(2) = ?
+++ exited with 2 +++
xdpgeneric works fine.
More information about the openwrt-devel
mailing list