libbpf: failed to load program 'vxlan_get_tunnel_src'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Here is my step to run bpf selftest on Ubuntu 20.04.2 LTS

git clone https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git
cd bpf-next; cp /boot/config-5.10.0-051000-generic .config; yes "" |
make oldconfig; make bzImage; make modules; cd
tools/testing/selftests/bpf/; make

then below, am I missing something in kernel config to cause "libbpf:
failed to load program 'vxlan_get_tunnel_src'"

./test_progs -a tunnel

Failed to load bpf_testmod.ko into the kernel: -8

WARNING! Selftests relying on bpf_testmod.ko will be skipped.

serial_test_tunnel:PASS:pthread_create 0 nsec

config_device:PASS:ip netns add at_ns0 0 nsec

config_device:PASS:ip link add veth0 type veth peer name veth1 0 nsec

config_device:PASS:ip link set veth0 netns at_ns0 0 nsec

config_device:PASS:ip addr add 172.16.1.200/24 dev veth1 0 nsec

config_device:PASS:ip addr add 172.16.1.20/24 dev veth1 0 nsec

config_device:PASS:ip link set dev veth1 up mtu 1500 0 nsec

config_device:PASS:ip netns exec at_ns0 ip addr add 172.16.1.100/24
dev veth0 0 nsec

config_device:PASS:ip netns exec at_ns0 ip link set dev veth0 up mtu 1500 0 nsec

add_vxlan_tunnel:PASS:ip netns exec at_ns0 ip link add dev vxlan00
type vxlan external gbp dstport 4789 0 nsec

add_vxlan_tunnel:PASS:ip netns exec at_ns0 ip link set dev vxlan00
address 52:54:00:d9:01:00 up 0 nsec

add_vxlan_tunnel:PASS:ip netns exec at_ns0 ip addr add dev vxlan00
10.1.1.100/24 0 nsec

add_vxlan_tunnel:PASS:ip netns exec at_ns0 ip neigh add 10.1.1.200
lladdr 52:54:00:d9:02:00 dev vxlan00 0 nsec

add_vxlan_tunnel:PASS:ip link add dev vxlan11 type vxlan external gbp
dstport 4789 0 nsec

add_vxlan_tunnel:PASS:ip link set dev vxlan11 address
52:54:00:d9:02:00 up 0 nsec

add_vxlan_tunnel:PASS:ip addr add dev vxlan11 10.1.1.200/24 0 nsec

add_vxlan_tunnel:PASS:ip neigh add 10.1.1.100 lladdr 52:54:00:d9:01:00
dev vxlan11 0 nsec

test_vxlan_tunnel:PASS:add vxlan tunnel 0 nsec

libbpf: prog 'vxlan_get_tunnel_src': BPF program load failed: Invalid argument

libbpf: prog 'vxlan_get_tunnel_src': -- BEGIN PROG LOAD LOG --

; int vxlan_get_tunnel_src(struct __sk_buff *skb)

0: (bf) r7 = r1

1: (b4) w1 = 0

; __u32 index = 0;

2: (63) *(u32 *)(r10 -60) = r1

last_idx 2 first_idx 0

regs=2 stack=0 before 1: (b4) w1 = 0

3: (bf) r2 = r10

;

4: (07) r2 += -60

; local_ip = bpf_map_lookup_elem(&local_ip_map, &index);

5: (18) r1 = 0xffff8ec4dfed6400

7: (85) call bpf_map_lookup_elem#1

8: (bf) r6 = r0

; if (!local_ip) {

9: (55) if r6 != 0x0 goto pc+5


from 9 to 15: R0_w=map_value(id=0,off=0,ks=4,vs=4,imm=0)
R6_w=map_value(id=0,off=0,ks=4,vs=4,imm=0) R7_w=ctx(id=0,off=0,imm=0)
R10=fp0 fp-64=mmmm????

; log_err(ret);

15: (bf) r2 = r10

; ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0);

16: (07) r2 += -48

17: (bf) r1 = r7

18: (b4) w3 = 44

19: (b7) r4 = 0

20: (85) call bpf_skb_get_tunnel_key#20

last_idx 20 first_idx 0

regs=8 stack=0 before 19: (b7) r4 = 0

regs=8 stack=0 before 18: (b4) w3 = 44

; if (ret < 0) {

21: (66) if w0 s> 0xffffffff goto pc+6


from 21 to 28: R0=inv(id=0,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647)
R6=map_value(id=0,off=0,ks=4,vs=4,imm=0) R7=ctx(id=0,off=0,imm=0)
R10=fp0 fp-8=????mmmm fp-16=mmmmmmmm fp-24=mmmmmmmm fp-32=mmmmmmmm
fp-40=mmmmmmmm fp-48=mmmmmmmm fp-64=mmmm????

; log_err(ret);

28: (bf) r2 = r10

; ret = bpf_skb_get_tunnel_opt(skb, &md, sizeof(md));

29: (07) r2 += -56

30: (bf) r1 = r7

31: (b4) w3 = 4

32: (85) call bpf_skb_get_tunnel_opt#29

last_idx 32 first_idx 21

regs=8 stack=0 before 31: (b4) w3 = 4

33: (bf) r7 = r0

; if (ret < 0) {

34: (66) if w7 s> 0xffffffff goto pc+5


from 34 to 40: R0_w=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647)
R6=map_value(id=0,off=0,ks=4,vs=4,imm=0)
R7_w=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647) R10=fp0
fp-8=????mmmm fp-16=mmmmmmmm fp-24=mmmmmmmm fp-32=mmmmmmmm
fp-40=mmmmmmmm fp-48=mmmmmmmm fp-56=????mmmm fp-64=mmmm????

; log_err(ret);

40: (61) r1 = *(u32 *)(r10 -56)

; if (key.local_ipv4 != *local_ip || md.gbp != 0x800FF) {

41: (61) r3 = *(u32 *)(r6 +0)

 R0_w=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647)
R1_w=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R6=map_value(id=0,off=0,ks=4,vs=4,imm=0)
R7_w=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647) R10=fp0
fp-8=????mmmm fp-16=mmmmmmmm fp-24=mmmmmmmm fp-32=mmmmmmmm
fp-40=mmmmmmmm fp-48=mmmmmmmm fp-56=????mmmm fp-64=mmmm????

; if (key.local_ipv4 != *local_ip || md.gbp != 0x800FF) {

42: (61) r2 = *(u32 *)(r10 -20)

; if (key.local_ipv4 != *local_ip || md.gbp != 0x800FF) {

43: (5e) if w2 != w3 goto pc+2

 R0_w=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647)
R1_w=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R2_w=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R3_w=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R6=map_value(id=0,off=0,ks=4,vs=4,imm=0)
R7_w=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647) R10=fp0
fp-8=????mmmm fp-16=mmmmmmmm fp-24=mmmmmmmm fp-32=mmmmmmmm
fp-40=mmmmmmmm fp-48=mmmmmmmm fp-56=????mmmm fp-64=mmmm????

44: (b4) w0 = 0

45: (16) if w1 == 0x800ff goto pc+25

 R0=inv0 R1=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R2=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R3=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R6=map_value(id=0,off=0,ks=4,vs=4,imm=0)
R7=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647) R10=fp0
fp-8=????mmmm fp-16=mmmmmmmm fp-24=mmmmmmmm fp-32=mmmmmmmm
fp-40=mmmmmmmm fp-48=mmmmmmmm fp-56=????mmmm fp-64=mmmm????

; bpf_printk("vxlan key %d local ip 0x%x remote ip 0x%x gbp 0x%x\n",

46: (7b) *(u64 *)(r10 -88) = r2

47: (7b) *(u64 *)(r10 -72) = r1

48: (61) r1 = *(u32 *)(r10 -48)

49: (7b) *(u64 *)(r10 -96) = r1

50: (61) r1 = *(u32 *)(r10 -44)

51: (7b) *(u64 *)(r10 -80) = r1

52: (bf) r3 = r10

53: (07) r3 += -96

54: (18) r1 = 0xffffabaec02c82af

56: (b4) w2 = 52

57: (b4) w4 = 32

58: (85) call unknown#177

invalid func unknown#177

processed 64 insns (limit 1000000) max_states_per_insn 1 total_states
5 peak_states 5 mark_read 2

-- END PROG LOAD LOG --

libbpf: failed to load program 'vxlan_get_tunnel_src'

libbpf: failed to load object 'test_tunnel_kern'

libbpf: failed to load BPF skeleton 'test_tunnel_kern': -22

test_vxlan_tunnel:FAIL:test_tunnel_kern__open_and_load unexpected error: -22

#198/1     tunnel/vxlan_tunnel:FAIL

add_ip6vxlan_tunnel:PASS:ip netns exec at_ns0 ip -6 addr add ::11/96
dev veth0 0 nsec

add_ip6vxlan_tunnel:PASS:ip netns exec at_ns0 ip link set dev veth0 up 0 nsec

add_ip6vxlan_tunnel:PASS:ip -6 addr add ::22/96 dev veth1 0 nsec

add_ip6vxlan_tunnel:PASS:ip -6 addr add ::bb/96 dev veth1 0 nsec

add_ip6vxlan_tunnel:PASS:ip link set dev veth1 up 0 nsec

add_ip6vxlan_tunnel:PASS:ip netns exec at_ns0 ip link add dev
ip6vxlan00 type vxlan external dstport 4789 0 nsec

add_ip6vxlan_tunnel:PASS:ip netns exec at_ns0 ip addr add dev
ip6vxlan00 10.1.1.100/24 0 nsec

add_ip6vxlan_tunnel:PASS:ip netns exec at_ns0 ip link set dev
ip6vxlan00 address 52:54:00:d9:01:00 up 0 nsec

add_ip6vxlan_tunnel:PASS:ip link add dev ip6vxlan11 type vxlan
external dstport 4789 0 nsec

add_ip6vxlan_tunnel:PASS:ip addr add dev ip6vxlan11 10.1.1.200/24 0 nsec

add_ip6vxlan_tunnel:PASS:ip link set dev ip6vxlan11 address
52:54:00:d9:02:00 up 0 nsec

test_ip6vxlan_tunnel:PASS:add_ip6vxlan_tunnel 0 nsec

libbpf: prog 'vxlan_get_tunnel_src': BPF program load failed: Invalid argument

libbpf: prog 'vxlan_get_tunnel_src': -- BEGIN PROG LOAD LOG --

; int vxlan_get_tunnel_src(struct __sk_buff *skb)

0: (bf) r7 = r1

1: (b4) w1 = 0

; __u32 index = 0;

2: (63) *(u32 *)(r10 -60) = r1

last_idx 2 first_idx 0

regs=2 stack=0 before 1: (b4) w1 = 0

3: (bf) r2 = r10

;

4: (07) r2 += -60

; local_ip = bpf_map_lookup_elem(&local_ip_map, &index);

5: (18) r1 = 0xffff8ec4de898600

7: (85) call bpf_map_lookup_elem#1

8: (bf) r6 = r0

; if (!local_ip) {

9: (55) if r6 != 0x0 goto pc+5


from 9 to 15: R0_w=map_value(id=0,off=0,ks=4,vs=4,imm=0)
R6_w=map_value(id=0,off=0,ks=4,vs=4,imm=0) R7_w=ctx(id=0,off=0,imm=0)
R10=fp0 fp-64=mmmm????

; log_err(ret);

15: (bf) r2 = r10

; ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0);

16: (07) r2 += -48

17: (bf) r1 = r7

18: (b4) w3 = 44

19: (b7) r4 = 0

20: (85) call bpf_skb_get_tunnel_key#20

last_idx 20 first_idx 0

regs=8 stack=0 before 19: (b7) r4 = 0

regs=8 stack=0 before 18: (b4) w3 = 44

; if (ret < 0) {

21: (66) if w0 s> 0xffffffff goto pc+6


from 21 to 28: R0=inv(id=0,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647)
R6=map_value(id=0,off=0,ks=4,vs=4,imm=0) R7=ctx(id=0,off=0,imm=0)
R10=fp0 fp-8=????mmmm fp-16=mmmmmmmm fp-24=mmmmmmmm fp-32=mmmmmmmm
fp-40=mmmmmmmm fp-48=mmmmmmmm fp-64=mmmm????

; log_err(ret);

28: (bf) r2 = r10

; ret = bpf_skb_get_tunnel_opt(skb, &md, sizeof(md));

29: (07) r2 += -56

30: (bf) r1 = r7

31: (b4) w3 = 4

32: (85) call bpf_skb_get_tunnel_opt#29

last_idx 32 first_idx 21

regs=8 stack=0 before 31: (b4) w3 = 4

33: (bf) r7 = r0

; if (ret < 0) {

34: (66) if w7 s> 0xffffffff goto pc+5


from 34 to 40: R0_w=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647)
R6=map_value(id=0,off=0,ks=4,vs=4,imm=0)
R7_w=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647) R10=fp0
fp-8=????mmmm fp-16=mmmmmmmm fp-24=mmmmmmmm fp-32=mmmmmmmm
fp-40=mmmmmmmm fp-48=mmmmmmmm fp-56=????mmmm fp-64=mmmm????

; log_err(ret);

40: (61) r1 = *(u32 *)(r10 -56)

; if (key.local_ipv4 != *local_ip || md.gbp != 0x800FF) {

41: (61) r3 = *(u32 *)(r6 +0)

 R0_w=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647)
R1_w=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R6=map_value(id=0,off=0,ks=4,vs=4,imm=0)
R7_w=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647) R10=fp0
fp-8=????mmmm fp-16=mmmmmmmm fp-24=mmmmmmmm fp-32=mmmmmmmm
fp-40=mmmmmmmm fp-48=mmmmmmmm fp-56=????mmmm fp-64=mmmm????

; if (key.local_ipv4 != *local_ip || md.gbp != 0x800FF) {

42: (61) r2 = *(u32 *)(r10 -20)

; if (key.local_ipv4 != *local_ip || md.gbp != 0x800FF) {

43: (5e) if w2 != w3 goto pc+2

 R0_w=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647)
R1_w=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R2_w=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R3_w=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R6=map_value(id=0,off=0,ks=4,vs=4,imm=0)
R7_w=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647) R10=fp0
fp-8=????mmmm fp-16=mmmmmmmm fp-24=mmmmmmmm fp-32=mmmmmmmm
fp-40=mmmmmmmm fp-48=mmmmmmmm fp-56=????mmmm fp-64=mmmm????

44: (b4) w0 = 0

45: (16) if w1 == 0x800ff goto pc+25

 R0=inv0 R1=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R2=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R3=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R6=map_value(id=0,off=0,ks=4,vs=4,imm=0)
R7=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647) R10=fp0
fp-8=????mmmm fp-16=mmmmmmmm fp-24=mmmmmmmm fp-32=mmmmmmmm
fp-40=mmmmmmmm fp-48=mmmmmmmm fp-56=????mmmm fp-64=mmmm????

; bpf_printk("vxlan key %d local ip 0x%x remote ip 0x%x gbp 0x%x\n",

46: (7b) *(u64 *)(r10 -88) = r2

47: (7b) *(u64 *)(r10 -72) = r1

48: (61) r1 = *(u32 *)(r10 -48)

49: (7b) *(u64 *)(r10 -96) = r1

50: (61) r1 = *(u32 *)(r10 -44)

51: (7b) *(u64 *)(r10 -80) = r1

52: (bf) r3 = r10

53: (07) r3 += -96

54: (18) r1 = 0xffffabaec02c82af

56: (b4) w2 = 52

57: (b4) w4 = 32

58: (85) call unknown#177

invalid func unknown#177

processed 64 insns (limit 1000000) max_states_per_insn 1 total_states
5 peak_states 5 mark_read 2

-- END PROG LOAD LOG --

libbpf: failed to load program 'vxlan_get_tunnel_src'

libbpf: failed to load object 'test_tunnel_kern'

libbpf: failed to load BPF skeleton 'test_tunnel_kern': -22

test_ip6vxlan_tunnel:FAIL:test_tunnel_kern__open_and_load unexpected error: -22

serial_test_tunnel:PASS:pthread_join 0 nsec

#198/2     tunnel/ip6vxlan_tunnel:FAIL

#198       tunnel:FAIL


All error logs:

serial_test_tunnel:PASS:pthread_create 0 nsec

config_device:PASS:ip netns add at_ns0 0 nsec

config_device:PASS:ip link add veth0 type veth peer name veth1 0 nsec

config_device:PASS:ip link set veth0 netns at_ns0 0 nsec

config_device:PASS:ip addr add 172.16.1.200/24 dev veth1 0 nsec

config_device:PASS:ip addr add 172.16.1.20/24 dev veth1 0 nsec

config_device:PASS:ip link set dev veth1 up mtu 1500 0 nsec

config_device:PASS:ip netns exec at_ns0 ip addr add 172.16.1.100/24
dev veth0 0 nsec

config_device:PASS:ip netns exec at_ns0 ip link set dev veth0 up mtu 1500 0 nsec

add_vxlan_tunnel:PASS:ip netns exec at_ns0 ip link add dev vxlan00
type vxlan external gbp dstport 4789 0 nsec

add_vxlan_tunnel:PASS:ip netns exec at_ns0 ip link set dev vxlan00
address 52:54:00:d9:01:00 up 0 nsec

add_vxlan_tunnel:PASS:ip netns exec at_ns0 ip addr add dev vxlan00
10.1.1.100/24 0 nsec

add_vxlan_tunnel:PASS:ip netns exec at_ns0 ip neigh add 10.1.1.200
lladdr 52:54:00:d9:02:00 dev vxlan00 0 nsec

add_vxlan_tunnel:PASS:ip link add dev vxlan11 type vxlan external gbp
dstport 4789 0 nsec

add_vxlan_tunnel:PASS:ip link set dev vxlan11 address
52:54:00:d9:02:00 up 0 nsec

add_vxlan_tunnel:PASS:ip addr add dev vxlan11 10.1.1.200/24 0 nsec

add_vxlan_tunnel:PASS:ip neigh add 10.1.1.100 lladdr 52:54:00:d9:01:00
dev vxlan11 0 nsec

test_vxlan_tunnel:PASS:add vxlan tunnel 0 nsec

libbpf: prog 'vxlan_get_tunnel_src': BPF program load failed: Invalid argument

libbpf: prog 'vxlan_get_tunnel_src': -- BEGIN PROG LOAD LOG --

; int vxlan_get_tunnel_src(struct __sk_buff *skb)

0: (bf) r7 = r1

1: (b4) w1 = 0

; __u32 index = 0;

2: (63) *(u32 *)(r10 -60) = r1

last_idx 2 first_idx 0

regs=2 stack=0 before 1: (b4) w1 = 0

3: (bf) r2 = r10

;

4: (07) r2 += -60

; local_ip = bpf_map_lookup_elem(&local_ip_map, &index);

5: (18) r1 = 0xffff8ec4dfed6400

7: (85) call bpf_map_lookup_elem#1

8: (bf) r6 = r0

; if (!local_ip) {

9: (55) if r6 != 0x0 goto pc+5


from 9 to 15: R0_w=map_value(id=0,off=0,ks=4,vs=4,imm=0)
R6_w=map_value(id=0,off=0,ks=4,vs=4,imm=0) R7_w=ctx(id=0,off=0,imm=0)
R10=fp0 fp-64=mmmm????

; log_err(ret);

15: (bf) r2 = r10

; ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0);

16: (07) r2 += -48

17: (bf) r1 = r7

18: (b4) w3 = 44

19: (b7) r4 = 0

20: (85) call bpf_skb_get_tunnel_key#20

last_idx 20 first_idx 0

regs=8 stack=0 before 19: (b7) r4 = 0

regs=8 stack=0 before 18: (b4) w3 = 44

; if (ret < 0) {

21: (66) if w0 s> 0xffffffff goto pc+6


from 21 to 28: R0=inv(id=0,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647)
R6=map_value(id=0,off=0,ks=4,vs=4,imm=0) R7=ctx(id=0,off=0,imm=0)
R10=fp0 fp-8=????mmmm fp-16=mmmmmmmm fp-24=mmmmmmmm fp-32=mmmmmmmm
fp-40=mmmmmmmm fp-48=mmmmmmmm fp-64=mmmm????

; log_err(ret);

28: (bf) r2 = r10

; ret = bpf_skb_get_tunnel_opt(skb, &md, sizeof(md));

29: (07) r2 += -56

30: (bf) r1 = r7

31: (b4) w3 = 4

32: (85) call bpf_skb_get_tunnel_opt#29

last_idx 32 first_idx 21

regs=8 stack=0 before 31: (b4) w3 = 4

33: (bf) r7 = r0

; if (ret < 0) {

34: (66) if w7 s> 0xffffffff goto pc+5


from 34 to 40: R0_w=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647)
R6=map_value(id=0,off=0,ks=4,vs=4,imm=0)
R7_w=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647) R10=fp0
fp-8=????mmmm fp-16=mmmmmmmm fp-24=mmmmmmmm fp-32=mmmmmmmm
fp-40=mmmmmmmm fp-48=mmmmmmmm fp-56=????mmmm fp-64=mmmm????

; log_err(ret);

40: (61) r1 = *(u32 *)(r10 -56)

; if (key.local_ipv4 != *local_ip || md.gbp != 0x800FF) {

41: (61) r3 = *(u32 *)(r6 +0)

 R0_w=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647)
R1_w=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R6=map_value(id=0,off=0,ks=4,vs=4,imm=0)
R7_w=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647) R10=fp0
fp-8=????mmmm fp-16=mmmmmmmm fp-24=mmmmmmmm fp-32=mmmmmmmm
fp-40=mmmmmmmm fp-48=mmmmmmmm fp-56=????mmmm fp-64=mmmm????

; if (key.local_ipv4 != *local_ip || md.gbp != 0x800FF) {

42: (61) r2 = *(u32 *)(r10 -20)

; if (key.local_ipv4 != *local_ip || md.gbp != 0x800FF) {

43: (5e) if w2 != w3 goto pc+2

 R0_w=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647)
R1_w=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R2_w=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R3_w=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R6=map_value(id=0,off=0,ks=4,vs=4,imm=0)
R7_w=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647) R10=fp0
fp-8=????mmmm fp-16=mmmmmmmm fp-24=mmmmmmmm fp-32=mmmmmmmm
fp-40=mmmmmmmm fp-48=mmmmmmmm fp-56=????mmmm fp-64=mmmm????

44: (b4) w0 = 0

45: (16) if w1 == 0x800ff goto pc+25

 R0=inv0 R1=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R2=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R3=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R6=map_value(id=0,off=0,ks=4,vs=4,imm=0)
R7=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647) R10=fp0
fp-8=????mmmm fp-16=mmmmmmmm fp-24=mmmmmmmm fp-32=mmmmmmmm
fp-40=mmmmmmmm fp-48=mmmmmmmm fp-56=????mmmm fp-64=mmmm????

; bpf_printk("vxlan key %d local ip 0x%x remote ip 0x%x gbp 0x%x\n",

46: (7b) *(u64 *)(r10 -88) = r2

47: (7b) *(u64 *)(r10 -72) = r1

48: (61) r1 = *(u32 *)(r10 -48)

49: (7b) *(u64 *)(r10 -96) = r1

50: (61) r1 = *(u32 *)(r10 -44)

51: (7b) *(u64 *)(r10 -80) = r1

52: (bf) r3 = r10

53: (07) r3 += -96

54: (18) r1 = 0xffffabaec02c82af

56: (b4) w2 = 52

57: (b4) w4 = 32

58: (85) call unknown#177

invalid func unknown#177

processed 64 insns (limit 1000000) max_states_per_insn 1 total_states
5 peak_states 5 mark_read 2

-- END PROG LOAD LOG --

libbpf: failed to load program 'vxlan_get_tunnel_src'

libbpf: failed to load object 'test_tunnel_kern'

libbpf: failed to load BPF skeleton 'test_tunnel_kern': -22

test_vxlan_tunnel:FAIL:test_tunnel_kern__open_and_load unexpected error: -22

#198/1     tunnel/vxlan_tunnel:FAIL

add_ip6vxlan_tunnel:PASS:ip netns exec at_ns0 ip -6 addr add ::11/96
dev veth0 0 nsec

add_ip6vxlan_tunnel:PASS:ip netns exec at_ns0 ip link set dev veth0 up 0 nsec

add_ip6vxlan_tunnel:PASS:ip -6 addr add ::22/96 dev veth1 0 nsec

add_ip6vxlan_tunnel:PASS:ip -6 addr add ::bb/96 dev veth1 0 nsec

add_ip6vxlan_tunnel:PASS:ip link set dev veth1 up 0 nsec

add_ip6vxlan_tunnel:PASS:ip netns exec at_ns0 ip link add dev
ip6vxlan00 type vxlan external dstport 4789 0 nsec

add_ip6vxlan_tunnel:PASS:ip netns exec at_ns0 ip addr add dev
ip6vxlan00 10.1.1.100/24 0 nsec

add_ip6vxlan_tunnel:PASS:ip netns exec at_ns0 ip link set dev
ip6vxlan00 address 52:54:00:d9:01:00 up 0 nsec

add_ip6vxlan_tunnel:PASS:ip link add dev ip6vxlan11 type vxlan
external dstport 4789 0 nsec

add_ip6vxlan_tunnel:PASS:ip addr add dev ip6vxlan11 10.1.1.200/24 0 nsec

add_ip6vxlan_tunnel:PASS:ip link set dev ip6vxlan11 address
52:54:00:d9:02:00 up 0 nsec

test_ip6vxlan_tunnel:PASS:add_ip6vxlan_tunnel 0 nsec

libbpf: prog 'vxlan_get_tunnel_src': BPF program load failed: Invalid argument

libbpf: prog 'vxlan_get_tunnel_src': -- BEGIN PROG LOAD LOG --

; int vxlan_get_tunnel_src(struct __sk_buff *skb)

0: (bf) r7 = r1

1: (b4) w1 = 0

; __u32 index = 0;

2: (63) *(u32 *)(r10 -60) = r1

last_idx 2 first_idx 0

regs=2 stack=0 before 1: (b4) w1 = 0

3: (bf) r2 = r10

;

4: (07) r2 += -60

; local_ip = bpf_map_lookup_elem(&local_ip_map, &index);

5: (18) r1 = 0xffff8ec4de898600

7: (85) call bpf_map_lookup_elem#1

8: (bf) r6 = r0

; if (!local_ip) {

9: (55) if r6 != 0x0 goto pc+5


from 9 to 15: R0_w=map_value(id=0,off=0,ks=4,vs=4,imm=0)
R6_w=map_value(id=0,off=0,ks=4,vs=4,imm=0) R7_w=ctx(id=0,off=0,imm=0)
R10=fp0 fp-64=mmmm????

; log_err(ret);

15: (bf) r2 = r10

; ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0);

16: (07) r2 += -48

17: (bf) r1 = r7

18: (b4) w3 = 44

19: (b7) r4 = 0

20: (85) call bpf_skb_get_tunnel_key#20

last_idx 20 first_idx 0

regs=8 stack=0 before 19: (b7) r4 = 0

regs=8 stack=0 before 18: (b4) w3 = 44

; if (ret < 0) {

21: (66) if w0 s> 0xffffffff goto pc+6


from 21 to 28: R0=inv(id=0,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647)
R6=map_value(id=0,off=0,ks=4,vs=4,imm=0) R7=ctx(id=0,off=0,imm=0)
R10=fp0 fp-8=????mmmm fp-16=mmmmmmmm fp-24=mmmmmmmm fp-32=mmmmmmmm
fp-40=mmmmmmmm fp-48=mmmmmmmm fp-64=mmmm????

; log_err(ret);

28: (bf) r2 = r10

; ret = bpf_skb_get_tunnel_opt(skb, &md, sizeof(md));

29: (07) r2 += -56

30: (bf) r1 = r7

31: (b4) w3 = 4

32: (85) call bpf_skb_get_tunnel_opt#29

last_idx 32 first_idx 21

regs=8 stack=0 before 31: (b4) w3 = 4

33: (bf) r7 = r0

; if (ret < 0) {

34: (66) if w7 s> 0xffffffff goto pc+5


from 34 to 40: R0_w=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647)
R6=map_value(id=0,off=0,ks=4,vs=4,imm=0)
R7_w=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647) R10=fp0
fp-8=????mmmm fp-16=mmmmmmmm fp-24=mmmmmmmm fp-32=mmmmmmmm
fp-40=mmmmmmmm fp-48=mmmmmmmm fp-56=????mmmm fp-64=mmmm????

; log_err(ret);

40: (61) r1 = *(u32 *)(r10 -56)

; if (key.local_ipv4 != *local_ip || md.gbp != 0x800FF) {

41: (61) r3 = *(u32 *)(r6 +0)

 R0_w=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647)
R1_w=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R6=map_value(id=0,off=0,ks=4,vs=4,imm=0)
R7_w=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647) R10=fp0
fp-8=????mmmm fp-16=mmmmmmmm fp-24=mmmmmmmm fp-32=mmmmmmmm
fp-40=mmmmmmmm fp-48=mmmmmmmm fp-56=????mmmm fp-64=mmmm????

; if (key.local_ipv4 != *local_ip || md.gbp != 0x800FF) {

42: (61) r2 = *(u32 *)(r10 -20)

; if (key.local_ipv4 != *local_ip || md.gbp != 0x800FF) {

43: (5e) if w2 != w3 goto pc+2

 R0_w=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647)
R1_w=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R2_w=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R3_w=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R6=map_value(id=0,off=0,ks=4,vs=4,imm=0)
R7_w=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647) R10=fp0
fp-8=????mmmm fp-16=mmmmmmmm fp-24=mmmmmmmm fp-32=mmmmmmmm
fp-40=mmmmmmmm fp-48=mmmmmmmm fp-56=????mmmm fp-64=mmmm????

44: (b4) w0 = 0

45: (16) if w1 == 0x800ff goto pc+25

 R0=inv0 R1=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R2=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R3=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff))
R6=map_value(id=0,off=0,ks=4,vs=4,imm=0)
R7=inv(id=2,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0;
0xffffffff7fffffff),s32_min_value=0,u32_max_value=2147483647) R10=fp0
fp-8=????mmmm fp-16=mmmmmmmm fp-24=mmmmmmmm fp-32=mmmmmmmm
fp-40=mmmmmmmm fp-48=mmmmmmmm fp-56=????mmmm fp-64=mmmm????

; bpf_printk("vxlan key %d local ip 0x%x remote ip 0x%x gbp 0x%x\n",

46: (7b) *(u64 *)(r10 -88) = r2

47: (7b) *(u64 *)(r10 -72) = r1

48: (61) r1 = *(u32 *)(r10 -48)

49: (7b) *(u64 *)(r10 -96) = r1

50: (61) r1 = *(u32 *)(r10 -44)

51: (7b) *(u64 *)(r10 -80) = r1

52: (bf) r3 = r10

53: (07) r3 += -96

54: (18) r1 = 0xffffabaec02c82af

56: (b4) w2 = 52

57: (b4) w4 = 32

58: (85) call unknown#177

invalid func unknown#177

processed 64 insns (limit 1000000) max_states_per_insn 1 total_states
5 peak_states 5 mark_read 2

-- END PROG LOAD LOG --

libbpf: failed to load program 'vxlan_get_tunnel_src'

libbpf: failed to load object 'test_tunnel_kern'

libbpf: failed to load BPF skeleton 'test_tunnel_kern': -22

test_ip6vxlan_tunnel:FAIL:test_tunnel_kern__open_and_load unexpected error: -22

serial_test_tunnel:PASS:pthread_join 0 nsec

#198/2     tunnel/ip6vxlan_tunnel:FAIL

#198       tunnel:FAIL

Summary: 0/0 PASSED, 0 SKIPPED, 1 FAILED



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux