]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: reuse tc bpf prologue for sk skb progs
authorDaniel Borkmann <daniel@iogearbox.net>
Thu, 17 Aug 2017 15:22:37 +0000 (17:22 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Aug 2017 17:25:19 +0000 (10:25 -0700)
commiteee8ac66afc0b18e81fb1bd78697f18f0a5c22ab
treefac249e34e4080b24edcacba128b5ae4a5a0cdd3
parent79f031bb70dc2280c530b9d6275c6ff9749bfe30
bpf: reuse tc bpf prologue for sk skb progs

Given both program types are effecitvely doing the same in the
prologue, just reuse the one that we had for tc and only adapt
to the corresponding drop verdict value. That way, we don't need
to have the duplicate from 33e1fc4c639b ("bpf: add access to sock
fields and pkt data from sk_skb programs") to maintain.

Reported-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/filter.c