summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2018-11-09 09:16:32 +0100
committerDaniel Borkmann <daniel@iogearbox.net>2018-11-09 09:16:33 +0100
commit185067a86a789e490ab4e1bb97b97fb3e2c40066 (patch)
treed89f4a220e92ba787649adc101d2e7861791539d /include
parentbce6a14996f991e570d973179b5ff57544efaa9a (diff)
parentcf599f50311dd4a5d3b5fc427beb9303dfa6be4b (diff)
downloadcachepc-linux-185067a86a789e490ab4e1bb97b97fb3e2c40066.tar.gz
cachepc-linux-185067a86a789e490ab4e1bb97b97fb3e2c40066.zip
Merge branch 'bpf-max-pkt-offset'
Jiong Wang says: ==================== The maximum packet offset accessed by one BPF program is useful information. Because sometimes there could be packet split and it is possible for some reasons (for example performance) we want to reject the BPF program if the maximum packet size would trigger such split. Normally, MTU value is treated as the maximum packet size, but one BPF program does not always access the whole packet, it could only access the head portion of the data. We could let verifier calculate the maximum packet offset ever used and record it inside prog auxiliar information structure as a new field "max_pkt_offset". ==================== Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/bpf.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 33014ae73103..b6a296e01f6a 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -293,6 +293,7 @@ struct bpf_prog_aux {
atomic_t refcnt;
u32 used_map_cnt;
u32 max_ctx_offset;
+ u32 max_pkt_offset;
u32 stack_depth;
u32 id;
u32 func_cnt;