From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Fastabend Subject: Re: [PATCH net-next 2/2] bpf: reuse tc bpf prologue for sk skb progs Date: Thu, 17 Aug 2017 09:05:05 -0700 Message-ID: <5995BEB1.8020509@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: ast@fb.com, netdev@vger.kernel.org To: Daniel Borkmann , davem@davemloft.net Return-path: Received: from mail-pg0-f68.google.com ([74.125.83.68]:38084 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750857AbdHQQFP (ORCPT ); Thu, 17 Aug 2017 12:05:15 -0400 Received: by mail-pg0-f68.google.com with SMTP id 123so10527806pga.5 for ; Thu, 17 Aug 2017 09:05:15 -0700 (PDT) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: 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 > Signed-off-by: Daniel Borkmann > --- > net/core/filter.c | 47 ++++++++++------------------------------------- > 1 file changed, 10 insertions(+), 37 deletions(-) > Nice clean-up, Thanks. Acked-by: John Fastabend