{"id":817700,"url":"http://patchwork.ozlabs.org/api/covers/817700/?format=json","web_url":"http://patchwork.ozlabs.org/project/netdev/cover/cover.1506114055.git.pabeni@redhat.com/","project":{"id":7,"url":"http://patchwork.ozlabs.org/api/projects/7/?format=json","name":"Linux network development","link_name":"netdev","list_id":"netdev.vger.kernel.org","list_email":"netdev@vger.kernel.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<cover.1506114055.git.pabeni@redhat.com>","list_archive_url":null,"date":"2017-09-22T21:06:24","name":"[RFC,00/11] udp: full early demux for unconnected sockets","submitter":{"id":67312,"url":"http://patchwork.ozlabs.org/api/people/67312/?format=json","name":"Paolo Abeni","email":"pabeni@redhat.com"},"mbox":"http://patchwork.ozlabs.org/project/netdev/cover/cover.1506114055.git.pabeni@redhat.com/mbox/","series":[{"id":4709,"url":"http://patchwork.ozlabs.org/api/series/4709/?format=json","web_url":"http://patchwork.ozlabs.org/project/netdev/list/?series=4709","date":"2017-09-22T21:06:24","name":"udp: full early demux for unconnected sockets","version":1,"mbox":"http://patchwork.ozlabs.org/series/4709/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/covers/817700/comments/","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ext-mx06.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx06.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=pabeni@redhat.com"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xzQys22Hjz9sP1\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 23 Sep 2017 07:07:01 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752701AbdIVVG6 (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 22 Sep 2017 17:06:58 -0400","from mx1.redhat.com ([209.132.183.28]:33858 \"EHLO mx1.redhat.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1752115AbdIVVG4 (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tFri, 22 Sep 2017 17:06:56 -0400","from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id ECB163680A;\n\tFri, 22 Sep 2017 21:06:55 +0000 (UTC)","from dhcppc0.redhat.com (ovpn-116-39.ams2.redhat.com\n\t[10.36.116.39])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id E138A5D6A2;\n\tFri, 22 Sep 2017 21:06:53 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com ECB163680A","From":"Paolo Abeni <pabeni@redhat.com>","To":"netdev@vger.kernel.org","Cc":"\"David S. Miller\" <davem@davemloft.net>,\n\tPablo Neira Ayuso <pablo@netfilter.org>, Florian Westphal <fw@strlen.de>,\n\tEric Dumazet <edumazet@google.com>,\n\tHannes Frederic Sowa <hannes@stressinduktion.org>","Subject":"[RFC PATCH 00/11] udp: full early demux for unconnected sockets","Date":"Fri, 22 Sep 2017 23:06:24 +0200","Message-Id":"<cover.1506114055.git.pabeni@redhat.com>","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.15","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.30]);\n\tFri, 22 Sep 2017 21:06:56 +0000 (UTC)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"},"content":"This series refactor the UDP early demux code so that:\n\n* full socket lookup is performed for unicast packets\n* a sk is grabbed even for unconnected socket match\n* a dst cache is used even in such scenario\n\nTo perform this tasks a couple of facilities are added:\n\n* noref socket references, scoped inside the current RCU section, to be\n  explicitly cleared before leaving such section\n* a dst cache inside the inet and inet6 local addresses tables, caching the\n  related local dst entry\n\nThe measured performance gain under small packet UDP flood is as follow:\n\ningress NIC\tvanilla\t\tpatched\t\tdelta\nrx queues\t(kpps)\t\t(kpps)\t\t(%)\n[ipv4]\n1\t\t2177\t\t2414\t\t10\n2\t\t2527\t\t2892\t\t14\n3\t\t3050\t\t3733\t\t22\n4\t\t3918\t\t4643\t\t18\n5\t\t5074\t\t5699\t\t12\n6\t\t5654\t\t6869\t\t21\n\n[ipv6]\n1\t\t2002\t\t2821\t\t40\n2\t\t2087\t\t3148\t\t50\n3\t\t2583\t\t4008\t\t55\n4\t\t3072\t\t4963\t\t61\n5\t\t3719\t\t5992\t\t61\n6\t\t4314\t\t6910\t\t60\n\nThe number of user space process in use is equal to the number of\nNIC rx queue; when multiple user space processes the SO_REUSEPORT \noptions is used, as described below:\n\nethtool  -L em2 combined $n\nMASK=1\nfor I in `seq 0 $((n - 1))`; do\n        udp_sink  --reuse-port --recvfrom --count 1000000000 --port 9 $1 &\n        taskset -p $((MASK << ($I + $n) )) $!\ndone\n\nPaolo Abeni (11):\n  net: add support for noref skb->sk\n  net: allow early demux to fetch noref socket\n  udp: do not touch socket refcount in early demux\n  net: add simple socket-like dst cache helpers\n  udp: perform full socket lookup in early demux\n  ip/route: factor out helper for local route creation\n  ipv6/addrconf: add an helper for inet6 address lookup\n  net: implement local route cache inside ifaddr\n  route: add ipv4/6 helpers to do partial route lookup vs local dst\n  IP: early demux can return an error code\n  udp: dst lookup in early demux for unconnected sockets\n\n include/linux/inetdevice.h       |   4 ++\n include/linux/skbuff.h           |  31 +++++++++++\n include/linux/udp.h              |   2 +\n include/net/addrconf.h           |   3 ++\n include/net/dst.h                |  20 +++++++\n include/net/if_inet6.h           |   4 ++\n include/net/ip6_route.h          |   1 +\n include/net/protocol.h           |   4 +-\n include/net/route.h              |   4 ++\n include/net/tcp.h                |   2 +-\n include/net/udp.h                |   2 +-\n net/core/dst.c                   |  12 +++++\n net/core/sock.c                  |   7 +++\n net/ipv4/devinet.c               |  29 ++++++++++-\n net/ipv4/ip_input.c              |  33 ++++++++----\n net/ipv4/netfilter/nf_dup_ipv4.c |   3 ++\n net/ipv4/route.c                 |  73 +++++++++++++++++++++++---\n net/ipv4/tcp_ipv4.c              |   9 ++--\n net/ipv4/udp.c                   |  95 +++++++++++++++-------------------\n net/ipv6/addrconf.c              | 109 +++++++++++++++++++++++++++------------\n net/ipv6/ip6_input.c             |   4 ++\n net/ipv6/netfilter/nf_dup_ipv6.c |   3 ++\n net/ipv6/route.c                 |  13 +++++\n net/ipv6/udp.c                   |  72 ++++++++++----------------\n net/netfilter/nf_queue.c         |   3 ++\n 25 files changed, 383 insertions(+), 159 deletions(-)"}