diff options
| author | David S. Miller <davem@davemloft.net> | 2016-09-21 06:32:19 +0300 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2016-09-21 06:32:19 +0300 |
| commit | 1d9423ae0dbcdbfb914e9e516ed44379f0189555 (patch) | |
| tree | fd9fcc0ecbd856e2fd2c186d3b841e19feda90b4 /include/uapi | |
| parent | cf714ac147e08bc13cd6bc79f2b090da905398ef (diff) | |
| parent | 7d95b0ab5bbe2dc9bf3fd99c27e80ced5bfa8acf (diff) | |
| download | linux-1d9423ae0dbcdbfb914e9e516ed44379f0189555.tar.xz | |
Merge branch 'bpf-direct-packet-access-improvements'
Daniel Borkmann says:
====================
BPF direct packet access improvements
This set adds write support to the currently available read support
for {cls,act}_bpf programs. First one is a fix for affected commit
sitting in net-next and prerequisite for the second one, last patch
adds a number of test cases against the verifier. For details, please
see individual patches.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi')
| -rw-r--r-- | include/uapi/linux/bpf.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index f896dfac4ac0..e07432b9f8b8 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -398,6 +398,27 @@ enum bpf_func_id { */ BPF_FUNC_skb_change_tail, + /** + * bpf_skb_pull_data(skb, len) + * The helper will pull in non-linear data in case the + * skb is non-linear and not all of len are part of the + * linear section. Only needed for read/write with direct + * packet access. + * @skb: pointer to skb + * @len: len to make read/writeable + * Return: 0 on success or negative error + */ + BPF_FUNC_skb_pull_data, + + /** + * bpf_csum_update(skb, csum) + * Adds csum into skb->csum in case of CHECKSUM_COMPLETE. + * @skb: pointer to skb + * @csum: csum to add + * Return: csum on success or negative error + */ + BPF_FUNC_csum_update, + __BPF_FUNC_MAX_ID, }; |
