From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Fastabend Subject: [bpf-next PATCH v2 0/4] bpf, sockmap BPF_F_INGRESS support Date: Tue, 27 Mar 2018 10:23:06 -0700 Message-ID: <20180327172042.11354.81872.stgit@john-Precision-Tower-5810> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, davem@davemloft.net To: ast@kernel.org, daniel@iogearbox.net Return-path: Received: from [75.106.27.153] ([75.106.27.153]:43298 "EHLO john-Precision-Tower-5810" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751025AbeC0RXM (ORCPT ); Tue, 27 Mar 2018 13:23:12 -0400 Sender: netdev-owner@vger.kernel.org List-ID: This series adds the BPF_F_INGRESS flag support to the redirect APIs. Bringing the sockmap API in-line with the cls_bpf redirect APIs. We add it to both variants of sockmap programs, the first patch adds support for tx ulp hooks and the third patch adds support for the recv skb hooks. Patches two and four add tests for the corresponding ingress redirect hooks. Follow on patches can address busy polling support, but next series from me will move the sockmap sample program into selftests. v2: added static to function definition caught by kbuild bot --- John Fastabend (4): bpf: sockmap redirect ingress support bpf: sockmap, add BPF_F_INGRESS tests bpf: sockmap, BPF_F_INGRESS flag for BPF_SK_SKB_STREAM_VERDICT: bpf: sockmap, more BPF_SK_SKB_STREAM_VERDICT tests include/linux/filter.h | 2 include/net/sock.h | 1 kernel/bpf/sockmap.c | 290 ++++++++++++++++++++++++++++++++++++--- net/core/filter.c | 4 - net/ipv4/tcp.c | 10 + samples/sockmap/sockmap_kern.c | 62 +++++++- samples/sockmap/sockmap_test.sh | 40 +++++ samples/sockmap/sockmap_user.c | 58 ++++++++ 8 files changed, 430 insertions(+), 37 deletions(-)