Skip to content

Commit

Permalink
selftests/bpf: fix bpf_flow.c build
Browse files Browse the repository at this point in the history
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: 9c98b13 ("flow_dissector: implements eBPF parser")
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
  • Loading branch information
Alexei Starovoitov committed Sep 14, 2018
1 parent 4a9f42c commit 70e88c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/bpf/bpf_flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ static __always_inline int parse_eth_proto(struct __sk_buff *skb, __be16 proto)
}

SEC("dissect")
int dissect(struct __sk_buff *skb)
int _dissect(struct __sk_buff *skb)
{
if (!skb->vlan_present)
return parse_eth_proto(skb, skb->protocol);
Expand Down

0 comments on commit 70e88c7

Please sign in to comment.