2

I am testing a nat program using ebpf. But the ebpf prog loader throws a error message:

221: (85) call bpf_l4_csum_replace#11
unknown func bpf_l4_csum_replace#11  

What does it mean ? How to solve it ? Thanks.

1 Answer 1

7

A similar message could mean that your kernel does not know the BPF helper you are trying to use, because e.g. your kernel is too old or the helper has been compiled out based on the kernel configuration options. But in those cases, you would not see the name of the function in the verifier logs.

What is probably happening here is that your kernel does support the BPF helper, but the type of the BPF program you are trying to load is not compatible with that helper. For example, if your program is of type socket_filter, you cannot use this helper (see function sk_filter_func_proto() used for the check). If your program was a TC classifier instead, you would be able to use it.

Sign up to request clarification or add additional context in comments.

1 Comment

Yes, you are right. XDP program could not use this function: bpf_l4_csum_replace.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.