Cover Letter Detail
Show a cover letter.
GET /api/covers/925063/?format=api
{ "id": 925063, "url": "http://patchwork.ozlabs.org/api/covers/925063/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/cover/20180604120601.18123-1-bjorn.topel@gmail.com/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20180604120601.18123-1-bjorn.topel@gmail.com>", "list_archive_url": null, "date": "2018-06-04T12:05:50", "name": "[bpf-next,00/11] AF_XDP: introducing zero-copy support", "submitter": { "id": 70569, "url": "http://patchwork.ozlabs.org/api/people/70569/?format=api", "name": "Björn Töpel", "email": "bjorn.topel@gmail.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/cover/20180604120601.18123-1-bjorn.topel@gmail.com/mbox/", "series": [ { "id": 48416, "url": "http://patchwork.ozlabs.org/api/series/48416/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=48416", "date": "2018-06-04T12:05:50", "name": "AF_XDP: introducing zero-copy support", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/48416/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/covers/925063/comments/", "headers": { "Return-Path": "<intel-wired-lan-bounces@osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.136; helo=silver.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=gmail.com" ], "Received": [ "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 40zyrv1VSgz9s08\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 5 Jun 2018 01:04:30 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 705C22DF3A;\n\tMon, 4 Jun 2018 15:04:29 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id qjCEbUSFVRWZ; Mon, 4 Jun 2018 15:04:27 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 7231B25D64;\n\tMon, 4 Jun 2018 15:04:27 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id CF2901BFFD0\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 4 Jun 2018 12:06:14 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id CA31385F94\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 4 Jun 2018 12:06:14 +0000 (UTC)", "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id HJwXOEvrVCHr for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 4 Jun 2018 12:06:13 +0000 (UTC)", "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 8ABBD85F7F\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 4 Jun 2018 12:06:13 +0000 (UTC)", "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t04 Jun 2018 05:06:13 -0700", "from btopel-mobl1.isw.intel.com (HELO\n\tbtopel-mobl1.hil-pdxphhh.sea.wayport.net) ([10.103.211.148])\n\tby fmsmga004.fm.intel.com with ESMTP; 04 Jun 2018 05:06:07 -0700" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.49,476,1520924400\"; d=\"scan'208\";a=\"60197125\"", "From": "=?utf-8?b?QmrDtnJuIFTDtnBlbA==?= <bjorn.topel@gmail.com>", "To": "bjorn.topel@gmail.com, magnus.karlsson@intel.com,\n\tmagnus.karlsson@gmail.com, alexander.h.duyck@intel.com,\n\talexander.duyck@gmail.com, ast@fb.com, brouer@redhat.com,\n\tdaniel@iogearbox.net, netdev@vger.kernel.org, mykyta.iziumtsev@linaro.org", "Date": "Mon, 4 Jun 2018 14:05:50 +0200", "Message-Id": "<20180604120601.18123-1-bjorn.topel@gmail.com>", "X-Mailer": "git-send-email 2.14.1", "MIME-Version": "1.0", "X-Mailman-Approved-At": "Mon, 04 Jun 2018 15:04:25 +0000", "Subject": "[Intel-wired-lan] [PATCH bpf-next 00/11] AF_XDP: introducing\n\tzero-copy support", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.24", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "Cc": "francois.ozog@linaro.org, willemdebruijn.kernel@gmail.com, mst@redhat.com,\n\tilias.apalodimas@linaro.org, michael.lundkvist@ericsson.com,\n\tbrian.brooks@linaro.org, intel-wired-lan@lists.osuosl.org, \n\tqi.z.zhang@intel.com, michael.chan@broadcom.com, =?utf-8?b?QmrDtnJu?=\n\t=?utf-8?q?_T=C3=B6pel?= <bjorn.topel@intel.com>, andy@greyhouse.net", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "From: Björn Töpel <bjorn.topel@intel.com>\n\nThis patch serie introduces zerocopy (ZC) support for\nAF_XDP. Programs using AF_XDP sockets will now receive RX packets\nwithout any copies and can also transmit packets without incurring any\ncopies. No modifications to the application are needed, but the NIC\ndriver needs to be modified to support ZC. If ZC is not supported by\nthe driver, the modes introduced in the AF_XDP patch will be\nused. Using ZC in our micro benchmarks results in significantly\nimproved performance as can be seen in the performance section later\nin this cover letter.\n\nNote that for an untrusted application, HW packet steering to a\nspecific queue pair (the one associated with the application) is a\nrequirement when using ZC, as the application would otherwise be able\nto see other user space processes' packets. If the HW cannot support\nthe required packet steering you need to use the XDP_SKB mode or the\nXDP_DRV mode without ZC turned on. The XSKMAP introduced in the AF_XDP\npatch set can be used to do load balancing in that case.\n\nFor benchmarking, you can use the xdpsock application from the AF_XDP\npatch set without any modifications. Say that you would like your UDP\ntraffic from port 4242 to end up in queue 16, that we will enable\nAF_XDP on. Here, we use ethtool for this:\n\n ethtool -N p3p2 rx-flow-hash udp4 fn\n ethtool -N p3p2 flow-type udp4 src-port 4242 dst-port 4242 \\\n action 16\n\nRunning the rxdrop benchmark in XDP_DRV mode with zerocopy can then be\ndone using:\n\n samples/bpf/xdpsock -i p3p2 -q 16 -r -N\n\nWe have run some benchmarks on a dual socket system with two Broadwell\nE5 2660 @ 2.0 GHz with hyperthreading turned off. Each socket has 14\ncores which gives a total of 28, but only two cores are used in these\nexperiments. One for TR/RX and one for the user space application. The\nmemory is DDR4 @ 2133 MT/s (1067 MHz) and the size of each DIMM is\n8192MB and with 8 of those DIMMs in the system we have 64 GB of total\nmemory. The compiler used is gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0. The\nNIC is Intel I40E 40Gbit/s using the i40e driver.\n\nBelow are the results in Mpps of the I40E NIC benchmark runs for 64\nand 1500 byte packets, generated by a commercial packet generator HW\noutputing packets at full 40 Gbit/s line rate. The results are without\nretpoline so that we can compare against previous numbers. \n\nAF_XDP performance 64 byte packets. Results from the AF_XDP V3 patch\nset are also reported for ease of reference. The numbers within\nparantheses are from the RFC V1 ZC patch set.\nBenchmark XDP_SKB XDP_DRV XDP_DRV with zerocopy\nrxdrop 2.9* 9.6* 21.1(21.5)\ntxpush 2.6* - 22.0(21.6)\nl2fwd 1.9* 2.5* 15.3(15.0)\n\nAF_XDP performance 1500 byte packets:\nBenchmark XDP_SKB XDP_DRV XDP_DRV with zerocopy\nrxdrop 2.1* 3.3* 3.3(3.3)\nl2fwd 1.4* 1.8* 3.1(3.1)\n\n* From AF_XDP V3 patch set and cover letter.\n\nSo why do we not get higher values for RX similar to the 34 Mpps we\nhad in AF_PACKET V4? We made an experiment running the rxdrop\nbenchmark without using the xdp_do_redirect/flush infrastructure nor\nusing an XDP program (all traffic on a queue goes to one\nsocket). Instead the driver acts directly on the AF_XDP socket. With\nthis we got 36.9 Mpps, a significant improvement without any change to\nthe uapi. So not forcing users to have an XDP program if they do not\nneed it, might be a good idea. This measurement is actually higher\nthan what we got with AF_PACKET V4.\n\nXDP performance on our system as a base line:\n\n64 byte packets:\nXDP stats CPU pps issue-pps\nXDP-RX CPU 16 32.3M 0\n\n1500 byte packets:\nXDP stats CPU pps issue-pps\nXDP-RX CPU 16 3.3M 0\n\nThe structure of the patch set is as follows:\n\nPatches 1-3: Plumbing for AF_XDP ZC support\nPatches 4-5: AF_XDP ZC for RX\nPatches 6-7: AF_XDP ZC for TX\nPatch 8-10: ZC support for i40e.\nPatch 11: Use the bind flags in sample application to force TX skb\n path when -S is providedd on the command line.\n\nThis patch set is based on the new uapi introduced in \"AF_XDP: bug\nfixes and descriptor changes\". You need to apply that patch set\nfirst, before applying this one.\n\nWe based this patch set on bpf-next commit bd3a08aaa9a3 (\"bpf:\nflowlabel in bpf_fib_lookup should be flowinfo\")\n\nComments:\n\n* Implementing dynamic creation and deletion of queues in the i40e\n driver would facilitate the coexistence of xdp_redirect and af_xdp.\n\nThanks: Björn and Magnus\n\nBjörn Töpel (8):\n xsk: moved struct xdp_umem definition\n xsk: introduce xdp_umem_page\n net: xdp: added bpf_netdev_command XDP_{QUERY,SETUP}_XSK_UMEM\n xdp: add MEM_TYPE_ZERO_COPY\n xsk: add zero-copy support for Rx\n i40e: added queue pair disable/enable functions\n i40e: implement AF_XDP zero-copy support for Rx\n samples/bpf: xdpsock: use skb Tx path for XDP_SKB\n\nMagnus Karlsson (3):\n net: added netdevice operation for Tx\n xsk: wire upp Tx zero-copy functions\n i40e: implement AF_XDP zero-copy support for Tx\n\n drivers/net/ethernet/intel/i40e/Makefile | 3 +-\n drivers/net/ethernet/intel/i40e/i40e.h | 23 +\n drivers/net/ethernet/intel/i40e/i40e_main.c | 287 +++++++++++-\n drivers/net/ethernet/intel/i40e/i40e_txrx.c | 256 ++++-------\n drivers/net/ethernet/intel/i40e/i40e_txrx.h | 151 ++++++-\n drivers/net/ethernet/intel/i40e/i40e_xsk.c | 677 ++++++++++++++++++++++++++++\n drivers/net/ethernet/intel/i40e/i40e_xsk.h | 19 +\n include/linux/netdevice.h | 10 +\n include/net/xdp.h | 10 +\n include/net/xdp_sock.h | 77 +++-\n include/uapi/linux/if_xdp.h | 4 +-\n net/core/xdp.c | 19 +-\n net/xdp/xdp_umem.c | 118 ++++-\n net/xdp/xdp_umem.h | 32 +-\n net/xdp/xsk.c | 166 +++++--\n net/xdp/xsk_queue.h | 35 +-\n samples/bpf/xdpsock_user.c | 5 +\n 17 files changed, 1657 insertions(+), 235 deletions(-)\n create mode 100644 drivers/net/ethernet/intel/i40e/i40e_xsk.c\n create mode 100644 drivers/net/ethernet/intel/i40e/i40e_xsk.h" }