Commit 70e88c75 authored by Alexei Starovoitov's avatar Alexei Starovoitov

selftests/bpf: fix bpf_flow.c build

fix the following build error:
clang -I. -I./include/uapi -I../../../include/uapi -idirafter /usr/local/include -idirafter /data/users/ast/llvm/bld/lib/clang/7.0.0/include -idirafter /usr/include -Wno-compare-distinct-pointer-types \
	 -O2 -target bpf -emit-llvm -c bpf_flow.c -o - |      \
llc -march=bpf -mcpu=generic  -filetype=obj -o /data/users/ast/bpf-next/tools/testing/selftests/bpf/bpf_flow.o
LLVM ERROR: 'dissect' label emitted multiple times to assembly file
make: *** [/data/users/ast/bpf-next/tools/testing/selftests/bpf/bpf_flow.o] Error 1

Fixes: 9c98b13c ("flow_dissector: implements eBPF parser")
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 4a9f42c9
...@@ -117,7 +117,7 @@ static __always_inline int parse_eth_proto(struct __sk_buff *skb, __be16 proto) ...@@ -117,7 +117,7 @@ static __always_inline int parse_eth_proto(struct __sk_buff *skb, __be16 proto)
} }
SEC("dissect") SEC("dissect")
int dissect(struct __sk_buff *skb) int _dissect(struct __sk_buff *skb)
{ {
if (!skb->vlan_present) if (!skb->vlan_present)
return parse_eth_proto(skb, skb->protocol); return parse_eth_proto(skb, skb->protocol);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment