]> 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)
commit44c27ecb9777cbf4e2efc4745b33818e41b52579
treefac249e34e4080b24edcacba128b5ae4a5a0cdd3
parent1f9aec94cc396383cb21aeea16f7d5809f54d71d
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 01d9f07e9781 ("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