From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: [PATCH net-next 0/5] tcp: add zero copy receive Date: Mon, 16 Apr 2018 10:33:34 -0700 Message-ID: <20180416173339.6310-1-edumazet@google.com> Cc: netdev , Eric Dumazet , Neal Cardwell , Yuchung Cheng , Soheil Hassas Yeganeh , Eric Dumazet To: "David S . Miller" Return-path: Received: from mail-pg0-f67.google.com ([74.125.83.67]:37000 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753056AbeDPRdo (ORCPT ); Mon, 16 Apr 2018 13:33:44 -0400 Received: by mail-pg0-f67.google.com with SMTP id r14so4135896pgq.4 for ; Mon, 16 Apr 2018 10:33:44 -0700 (PDT) Sender: netdev-owner@vger.kernel.org List-ID: This patch series add mmap() support to TCP sockets for RX zero copy. While tcp_mmap() patch itself is quite small (~100 LOC), optimal support for asynchronous mmap() required better SO_RCVLOWAT behavior, and a test program to demonstrate how mmap() on TCP sockets can be used. Note that mmap() (and associated munmap()) calls are adding more pressure on per-process VM semaphore, so might not show benefit for processus with high number of threads. Eric Dumazet (5): tcp: fix SO_RCVLOWAT and RCVBUF autotuning tcp: fix delayed acks behavior for SO_RCVLOWAT tcp: avoid extra wakeups for SO_RCVLOWAT users tcp: implement mmap() for zero copy receive selftests: net: add tcp_mmap program include/linux/net.h | 1 + include/net/tcp.h | 4 + net/core/sock.c | 5 +- net/ipv4/af_inet.c | 3 +- net/ipv4/tcp.c | 138 ++++++++ net/ipv4/tcp_input.c | 22 +- net/ipv6/af_inet6.c | 3 +- tools/testing/selftests/net/Makefile | 2 + tools/testing/selftests/net/tcp_mmap.c | 437 +++++++++++++++++++++++++ 9 files changed, 608 insertions(+), 7 deletions(-) create mode 100644 tools/testing/selftests/net/tcp_mmap.c -- 2.17.0.484.g0c8726318c-goog