Cover Letter Detail
Show a cover letter.
GET /api/covers/819579/?format=api
{ "id": 819579, "url": "http://patchwork.ozlabs.org/api/covers/819579/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/cover/150660339205.2808.7084136789768233829.stgit@firesoul/", "project": { "id": 7, "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api", "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": "<150660339205.2808.7084136789768233829.stgit@firesoul>", "list_archive_url": null, "date": "2017-09-28T12:57:02", "name": "[net-next,0/5] New bpf cpumap type for XDP_REDIRECT", "submitter": { "id": 13625, "url": "http://patchwork.ozlabs.org/api/people/13625/?format=api", "name": "Jesper Dangaard Brouer", "email": "brouer@redhat.com" }, "mbox": "http://patchwork.ozlabs.org/project/netdev/cover/150660339205.2808.7084136789768233829.stgit@firesoul/mbox/", "series": [ { "id": 5560, "url": "http://patchwork.ozlabs.org/api/series/5560/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=5560", "date": "2017-09-28T12:57:02", "name": "New bpf cpumap type for XDP_REDIRECT", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/5560/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/covers/819579/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-mx01.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com", "ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=brouer@redhat.com" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y2vq13Kt0z9t66\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 28 Sep 2017 22:57:17 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752957AbdI1M5N (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tThu, 28 Sep 2017 08:57:13 -0400", "from mx1.redhat.com ([209.132.183.28]:53854 \"EHLO mx1.redhat.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1751906AbdI1M5L (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tThu, 28 Sep 2017 08:57:11 -0400", "from smtp.corp.redhat.com\n\t(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])\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 806BFBFF4A;\n\tThu, 28 Sep 2017 12:57:11 +0000 (UTC)", "from firesoul.localdomain (ovpn-200-26.brq.redhat.com\n\t[10.40.200.26])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id D57B78F35E;\n\tThu, 28 Sep 2017 12:57:04 +0000 (UTC)", "from [192.168.5.1] (localhost [IPv6:::1])\n\tby firesoul.localdomain (Postfix) with ESMTP id E29A9300006B0;\n\tThu, 28 Sep 2017 14:57:02 +0200 (CEST)" ], "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com 806BFBFF4A", "Subject": "[net-next PATCH 0/5] New bpf cpumap type for XDP_REDIRECT", "From": "Jesper Dangaard Brouer <brouer@redhat.com>", "To": "netdev@vger.kernel.org", "Cc": "jakub.kicinski@netronome.com, \"Michael S. Tsirkin\" <mst@redhat.com>,\n\tJason Wang <jasowang@redhat.com>, mchan@broadcom.com,\n\tJohn Fastabend <john.fastabend@gmail.com>, peter.waskiewicz.jr@intel.com,\n\tJesper Dangaard Brouer <brouer@redhat.com>,\n\tDaniel Borkmann <borkmann@iogearbox.net>,\n\tAlexei Starovoitov <alexei.starovoitov@gmail.com>,\n\tAndy Gospodarek <andy@greyhouse.net>", "Date": "Thu, 28 Sep 2017 14:57:02 +0200", "Message-ID": "<150660339205.2808.7084136789768233829.stgit@firesoul>", "User-Agent": "StGit/0.17.1-dirty", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "7bit", "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.11", "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.25]);\n\tThu, 28 Sep 2017 12:57:11 +0000 (UTC)", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "Introducing a new way to redirect XDP frames. Notice how no driver\nchanges are necessary given the design of XDP_REDIRECT.\n\nThis redirect map type is called 'cpumap', as it allows redirection\nXDP frames to remote CPUs. The remote CPU will do the SKB allocation\nand start the network stack invocation on that CPU.\n\nThis is a scalability and isolation mechanism, that allow separating\nthe early driver network XDP layer, from the rest of the netstack, and\nassigning dedicated CPUs for this stage. The sysadm control/configure\nthe RX-CPU to NIC-RX queue (as usual) via procfs smp_affinity and how\nmany queues are configured via ethtool --set-channels. Benchmarks\nshow that a single CPU can handle approx 11Mpps. Thus, only assigning\ntwo NIC RX-queues (and two CPUs) is sufficient for handling 10Gbit/s\nwirespeed smallest packet 14.88Mpps. Reducing the number of queues\nhave the advantage that more packets being \"bulk\" available per hard\ninterrupt[1].\n\n[1] https://www.netdevconf.org/2.1/papers/BusyPollingNextGen.pdf\n\nUse-cases:\n\n1. End-host based pre-filtering for DDoS mitigation. This is fast\n enough to allow software to see and filter all packets wirespeed.\n Thus, no packets getting silently dropped by hardware.\n\n2. Given NIC HW unevenly distributes packets across RX queue, this\n mechanism can be used for redistribution load across CPUs. This\n usually happens when HW is unaware of a new protocol. This\n resembles RPS (Receive Packet Steering), just faster, but with more\n responsibility placed on the BPF program for correct steering.\n\n3. Auto-scaling or power saving via only activating the appropriate\n number of remote CPUs for handling the current load. The cpumap\n tracepoints can function as a feedback loop for this purpose.\n\nPatchset based on net-next at:\n commit 14a0d032f4ec (\"Merge branch 'mlxsw-pass-gact'\")\n\n---\n\nJesper Dangaard Brouer (5):\n bpf: introduce new bpf cpu map type BPF_MAP_TYPE_CPUMAP\n bpf: XDP_REDIRECT enable use of cpumap\n bpf: cpumap xdp_buff to skb conversion and allocation\n bpf: cpumap add tracepoints\n samples/bpf: add cpumap sample program xdp_redirect_cpu\n\n\n include/linux/bpf.h | 7 \n include/linux/bpf_types.h | 1 \n include/trace/events/xdp.h | 80 ++++\n include/uapi/linux/bpf.h | 1 \n kernel/bpf/Makefile | 1 \n kernel/bpf/cpumap.c | 671 +++++++++++++++++++++++++++++++++++\n kernel/bpf/syscall.c | 8 \n kernel/bpf/verifier.c | 3 \n net/core/filter.c | 65 +++\n samples/bpf/Makefile | 4 \n samples/bpf/xdp_redirect_cpu_kern.c | 640 +++++++++++++++++++++++++++++++++\n samples/bpf/xdp_redirect_cpu_user.c | 639 +++++++++++++++++++++++++++++++++\n tools/include/uapi/linux/bpf.h | 1 \n 13 files changed, 2109 insertions(+), 12 deletions(-)\n create mode 100644 kernel/bpf/cpumap.c\n create mode 100644 samples/bpf/xdp_redirect_cpu_kern.c\n create mode 100644 samples/bpf/xdp_redirect_cpu_user.c\n\n--" }