On Mon, Jul 23, 2018 at 02:21:05PM -0400, Andrew Wang wrote:
> Hi
> 
> I am writing a bpf program for packet processing and have loaded my ingress
> function at BPF.XDP.
> 
> I'm updating the destination IPv6 address and want to update the TCP
> checksum, but when I try to call the helper functions "bpf_csum_diff" or
> "bpf_l4_csum_replace", I get a "unknown func <function name>". Are these
> functions not available for XDP program types?

XDP programs cannot use bpf_l4_csum_replace, but they can use
bpf_csum_diff since commit 205c380 ("bpf: add csum_diff helper to xdp as
well") which landed in v4.16-rc1.

> 
> Is there a way to tell what helper functions are available to what program
> types?

The list of helpers available to XDP programs is defined in function
xdp_func_proto in file net/core/filter.c of the Linux source code.
You might also want to check out pull request #1881 [1], which will
document helpers available to each program type in file kernel-versions.md
of bcc [2].

1 - https://github.com/iovisor/bcc/pull/1881
2 - https://github.com/iovisor/bcc/blob/master/docs/kernel-versions.md

> 
> Thanks
> Andrew

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#1393): https://lists.iovisor.org/g/iovisor-dev/message/1393
Mute This Topic: https://lists.iovisor.org/mt/23795612/21656
Group Owner: [email protected]
Unsubscribe: https://lists.iovisor.org/g/iovisor-dev/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to