diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2016-02-20 01:05:24 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-02-22 06:07:10 +0300 |
commit | 21cafc1dc2da999dabc5ed7aa94230454471fcf0 (patch) | |
tree | 90d093b6a8a87b8619ab4a78a6c1174d30d7b58f /net/sched/act_nat.c | |
parent | 7d672345ed295b1356a5d9f7111da1d1d7d65867 (diff) | |
download | linux-21cafc1dc2da999dabc5ed7aa94230454471fcf0.tar.xz |
bpf: remove artificial bpf_skb_{load, store}_bytes buffer limitation
We currently limit bpf_skb_store_bytes() and bpf_skb_load_bytes()
helpers to only store or load a maximum buffer of 16 bytes. Thus,
loading, rewriting and storing headers require several bpf_skb_load_bytes()
and bpf_skb_store_bytes() calls.
Also here we can use a per-cpu scratch buffer instead in order to not
pressure stack space any further. I do suspect that this limit was mainly
set in place for this particular reason. So, ease program development
by removing this limitation and make the scratchpad generic, so it can
be reused.
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/act_nat.c')
0 files changed, 0 insertions, 0 deletions