# Re: \[PATCH net-next 2/2\] bpf: reuse tc bpf prologue for sk skb progs

- From: John Fastabend \<john.fastabend@gmail.com\>
- Date: 2017-08-17 16:05:15 
- List: netdev
- Page: https://ratatoskr.run/netdev/2017/08/11063066
- Thread: https://ratatoskr.run/netdev/2017/08/11063060/t.md

```text
On 08/17/2017 08:22 AM, Daniel Borkmann wrote:
> 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 8a31db561566 ("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>
> ---
>  net/core/filter.c | 47 ++++++++++-------------------------------------
>  1 file changed, 10 insertions(+), 37 deletions(-)
> 

Nice clean-up, Thanks.

Acked-by: John Fastabend <john.fastabend@gmail.com>
```
