diff options
author | David S. Miller <davem@davemloft.net> | 2015-10-03 05:02:50 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-03 05:02:50 -0700 |
commit | f8e1100afc4f362e94c2d4a3231f16c77beb6d1b (patch) | |
tree | 4e7003c31ee7623c1119a4fd21fac007766e9259 /include | |
parent | bd8762bec95ed81d5b81390ff23c5f83345cb536 (diff) | |
parent | 754f1e6a36c9b42525de223ee1ba628dcafbad41 (diff) | |
download | lwn-f8e1100afc4f362e94c2d4a3231f16c77beb6d1b.tar.gz lwn-f8e1100afc4f362e94c2d4a3231f16c77beb6d1b.zip |
Merge branch 'bpf-updates'
Daniel Borkmann says:
====================
BPF updates
Some minor updates to {cls,act}_bpf to retrieve routing realms
and to make skb->priority writable.
Thanks!
v1 -> v2:
- Dropped preclassify patch for now from the series as the
rest is pretty much independent of it
- Rest unchanged, only rebased and already posted Acked-by's kept
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/filter.h | 7 | ||||
-rw-r--r-- | include/uapi/linux/bpf.h | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h index fa2cab985e57..3d5fd24b321b 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h @@ -326,8 +326,11 @@ struct bpf_binary_header { struct bpf_prog { u16 pages; /* Number of allocated pages */ - bool jited; /* Is our filter JIT'ed? */ - bool gpl_compatible; /* Is our filter GPL compatible? */ + kmemcheck_bitfield_begin(meta); + u16 jited:1, /* Is our filter JIT'ed? */ + gpl_compatible:1, /* Is filter GPL compatible? */ + dst_needed:1; /* Do we need dst entry? */ + kmemcheck_bitfield_end(meta); u32 len; /* Number of filter blocks */ enum bpf_prog_type type; /* Type of BPF program */ struct bpf_prog_aux *aux; /* Auxiliary fields */ diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 4ec0b5488294..564f1f091991 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -280,6 +280,13 @@ enum bpf_func_id { * Return: TC_ACT_REDIRECT */ BPF_FUNC_redirect, + + /** + * bpf_get_route_realm(skb) - retrieve a dst's tclassid + * @skb: pointer to skb + * Return: realm if != 0 + */ + BPF_FUNC_get_route_realm, __BPF_FUNC_MAX_ID, }; |