From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Fastabend Subject: [bpf-next PATCH 0/3] sockmap support for msg_peek flag Date: Tue, 16 Oct 2018 11:07:54 -0700 Message-ID: <20181016180424.13607.7932.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 To: ast@kernel.org, daniel@iogearbox.net Return-path: Received: from [184.63.162.180] ([184.63.162.180]:48530 "EHLO john-Precision-Tower-5810" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727433AbeJQB7f (ORCPT ); Tue, 16 Oct 2018 21:59:35 -0400 Sender: netdev-owner@vger.kernel.org List-ID: This adds support for the MSG_PEEK flag when redirecting into an ingress psock sk_msg queue. The first patch adds some base support to the helpers, then the feature, and finally we add an option for the test suite to do a duplicate MSG_PEEK call on every recv to test the feature. With duplicate MSG_PEEK call all tests continue to PASS. --- John Fastabend (3): bpf: skmsg, improve sk_msg_used_element to work in cork context bpf: sockmap, support for msg_peek in sk_msg with redirect ingress bpf: sockmap, add msg_peek tests to test_sockmap include/linux/skmsg.h | 13 +- include/net/tcp.h | 2 net/ipv4/tcp_bpf.c | 42 +++++-- net/tls/tls_sw.c | 3 - tools/testing/selftests/bpf/test_sockmap.c | 167 +++++++++++++++++++--------- 5 files changed, 153 insertions(+), 74 deletions(-)