Cover Letter Detail
Show a cover letter.
GET /api/covers/1525710/?format=api
{ "id": 1525710, "url": "http://patchwork.ozlabs.org/api/covers/1525710/?format=api", "web_url": "http://patchwork.ozlabs.org/project/openvswitch/cover/cover.1631094144.git.grive@u256.net/", "project": { "id": 47, "url": "http://patchwork.ozlabs.org/api/projects/47/?format=api", "name": "Open vSwitch", "link_name": "openvswitch", "list_id": "ovs-dev.openvswitch.org", "list_email": "ovs-dev@openvswitch.org", "web_url": "http://openvswitch.org/", "scm_url": "git@github.com:openvswitch/ovs.git", "webscm_url": "https://github.com/openvswitch/ovs", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<cover.1631094144.git.grive@u256.net>", "list_archive_url": null, "date": "2021-09-08T09:47:24", "name": "[ovs-dev,v5,00/27] dpif-netdev: Parallel offload processing", "submitter": { "id": 78795, "url": "http://patchwork.ozlabs.org/api/people/78795/?format=api", "name": "Gaetan Rivet", "email": "grive@u256.net" }, "mbox": "http://patchwork.ozlabs.org/project/openvswitch/cover/cover.1631094144.git.grive@u256.net/mbox/", "series": [ { "id": 261424, "url": "http://patchwork.ozlabs.org/api/series/261424/?format=api", "web_url": "http://patchwork.ozlabs.org/project/openvswitch/list/?series=261424", "date": "2021-09-08T09:47:24", "name": "dpif-netdev: Parallel offload processing", "version": 5, "mbox": "http://patchwork.ozlabs.org/series/261424/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/covers/1525710/comments/", "headers": { "Return-Path": "<ovs-dev-bounces@openvswitch.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "ovs-dev@openvswitch.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "ovs-dev@lists.linuxfoundation.org" ], "Authentication-Results": [ "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=u256.net header.i=@u256.net header.a=rsa-sha256\n header.s=fm2 header.b=khJk9kbR;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=messagingengine.com header.i=@messagingengine.com\n header.a=rsa-sha256 header.s=fm3 header.b=mKhRtvih;\n\tdkim-atps=neutral", "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN>)", "smtp4.osuosl.org (amavisd-new);\n dkim=pass (2048-bit key) header.d=u256.net header.b=\"khJk9kbR\";\n dkim=pass (2048-bit key) header.d=messagingengine.com\n header.b=\"mKhRtvih\"" ], "Received": [ "from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 4H4HPm4GGFz9sW8\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 8 Sep 2021 19:48:10 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby smtp2.osuosl.org (Postfix) with ESMTP id BD36C40491;\n\tWed, 8 Sep 2021 09:48:06 +0000 (UTC)", "from smtp2.osuosl.org ([127.0.0.1])\n\tby localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id l_rTd_B5WgNu; Wed, 8 Sep 2021 09:48:05 +0000 (UTC)", "from lists.linuxfoundation.org (lf-lists.osuosl.org\n [IPv6:2605:bc80:3010:104::8cd3:938])\n\tby smtp2.osuosl.org (Postfix) with ESMTPS id 5B1CD4016F;\n\tWed, 8 Sep 2021 09:48:04 +0000 (UTC)", "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id 35A47C0011;\n\tWed, 8 Sep 2021 09:48:04 +0000 (UTC)", "from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 12EE2C000D\n for <ovs-dev@openvswitch.org>; Wed, 8 Sep 2021 09:48:03 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by smtp4.osuosl.org (Postfix) with ESMTP id DC5774051B\n for <ovs-dev@openvswitch.org>; Wed, 8 Sep 2021 09:48:02 +0000 (UTC)", "from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id Z4goE1HSLRcN for <ovs-dev@openvswitch.org>;\n Wed, 8 Sep 2021 09:48:01 +0000 (UTC)", "from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com\n [64.147.123.19])\n by smtp4.osuosl.org (Postfix) with ESMTPS id B726C4046F\n for <ovs-dev@openvswitch.org>; Wed, 8 Sep 2021 09:48:01 +0000 (UTC)", "from compute1.internal (compute1.nyi.internal [10.202.2.41])\n by mailout.west.internal (Postfix) with ESMTP id 0F5E032009A8\n for <ovs-dev@openvswitch.org>; Wed, 8 Sep 2021 05:48:00 -0400 (EDT)", "from mailfrontend2 ([10.202.2.163])\n by compute1.internal (MEProxy); Wed, 08 Sep 2021 05:48:01 -0400", "by mail.messagingengine.com (Postfix) with ESMTPA for\n <ovs-dev@openvswitch.org>; Wed, 8 Sep 2021 05:48:00 -0400 (EDT)" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "from auto-whitelisted by SQLgrey-1.8.0", "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=u256.net; h=from\n :to:subject:date:message-id:mime-version\n :content-transfer-encoding; s=fm2; bh=g5I73ilgAaUFvr/iX4EP0/Asvd\n nT0TOaOy+7spbYCYM=; b=khJk9kbRusF+GjHzjR2h0oPTbWMRzHryqZge4TiG/y\n z0bSmKq6nBdmoOE0Il8PZnv8yYtF+0GZFR/lT1zVJLNxrCtKb7XKamaKx0b1KMUi\n 8Y5T7SyNqJblJFQLSn2A1A2gAVfT0YbgcchVT8FCmXL7TSJK6806t06l1wGvi8F6\n iG4zLgvlpUd4TA14tXXiSJK1GIODhee0i54jVwxs+gQ9ans5/rPY2zXq6muiSpIQ\n 29P8HljUiYuIpE23P2se1g8kfYoO/9aGuNNGEoaOjtWz7+TY3ZoDA0yjjhWkB6ju\n A/l4ALq4apZ1PswtUpwRko+c/gyFnvFlbMoQuqR9A6lA==", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n messagingengine.com; h=content-transfer-encoding:date:from\n :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy\n :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=g5I73ilgAaUFvr/iX\n 4EP0/AsvdnT0TOaOy+7spbYCYM=; b=mKhRtvihZq3/lSaUhIyk3wejIGVsJrolD\n VZzYS2aX5jlUDIuwTy7xm1KxYAg6WQWSMHNFnqMcxwO73tMtceif7qjxG4mMOOWk\n 3mXW8PONSFlq+nruVVPlgKHMmiOvtJ/L5DDYUVN4MALBY1b8BKMR4HFvIXd6DNrf\n FsXYmty+gWAocgsH4q/G7cAyfOs8p9mjYwdi0dIwEdGpgDDH2x7/a4MLLv2iMD5q\n kZrPAKXLWnoJTK2rFmedToumAyK6k+HBeNRERMRL/S4eJv9XqRslN+8VaZnk5HQq\n 6EvioVG8ZT+NhsLWl2l6CTwRwrw8lJ6kAW9j0As7NdJ069AsMa4KA==" ], "X-ME-Sender": "<xms:0IY4YdBYBYRa8dr4Gte-yZAiExCgyeGgqK2UUGBkFYke5aHS70VVOQ>\n <xme:0IY4YbjMx4t31OzVxgvjXvbSBw8Y4XYqW_utPhl4avvH_aBCtkEUOR3wPn5Dx2W_S\n xHibH1yKIjBlC2n1mA>", "X-ME-Received": "\n <xmr:0IY4YYnS_0YYUYVNvWbDeRBuAZYeckT5TWI-h7RLrxHaOgKOlLypcOFD9vuw27mfsCKRAOTMjNp-vJoNQcuh_zT62A>", "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgedvtddrudefjedgudekucetufdoteggodetrfdotf\n fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen\n uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre\n dttdenucfhrhhomhepifgrvghtrghnucftihhvvghtuceoghhrihhvvgesuhdvheeirdhn\n vghtqeenucggtffrrghtthgvrhhnpeeukefhledufeeiueeuheevgeelveeutdefvdetve\n dtudeiudffudfhkeegfeekheenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehl\n uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepghhrihhvvgesuh\n dvheeirdhnvght", "X-ME-Proxy": "<xmx:0IY4YXwmQzsnPNDBqxY6JmiGP0G8xBE3Hnk5qzoNnnQ4X7HefWgzQw>\n <xmx:0IY4YSSPvs5BOOOZSvkmVvYXstSRD_JZyBx2nshtxJnVb56RlMHYsQ>\n <xmx:0IY4Yabm0-nWZqGTnLd87PgORodv61LC7eAgXM-THnmj43IWvWIqDA>\n <xmx:0IY4YZPeQ2t2oMCuv7VA_daXMCjqOiVUnPUPP9jVHjHbSm06FCHuag>", "From": "Gaetan Rivet <grive@u256.net>", "To": "ovs-dev@openvswitch.org", "Date": "Wed, 8 Sep 2021 11:47:24 +0200", "Message-Id": "<cover.1631094144.git.grive@u256.net>", "X-Mailer": "git-send-email 2.31.1", "MIME-Version": "1.0", "Subject": "[ovs-dev] [PATCH v5 00/27] dpif-netdev: Parallel offload processing", "X-BeenThere": "ovs-dev@openvswitch.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "<ovs-dev.openvswitch.org>", "List-Unsubscribe": "<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>", "List-Archive": "<http://mail.openvswitch.org/pipermail/ovs-dev/>", "List-Post": "<mailto:ovs-dev@openvswitch.org>", "List-Help": "<mailto:ovs-dev-request@openvswitch.org?subject=help>", "List-Subscribe": "<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "ovs-dev-bounces@openvswitch.org", "Sender": "\"dev\" <ovs-dev-bounces@openvswitch.org>" }, "content": "This patch series aims to improve the performance of the management\nof hw-offloads in dpif-netdev. In the current version, some setup\nwill experience high memory usage and poor latency between a flow\ndecision and its execution regarding hardware offloading.\n\nThis series starts by measuring key metrics regarding both issues\nThose patches are introduced first to compare the current status\nwith each improvements introduced.\nOffloads enqueued and inserted, as well as the latency\nfrom queue insertion to hardware insertion is measured. A new\ncommand 'ovs-appctl dpctl/offload-stats-show' is introduced\nto show the current measure.\n\nIn my current performance test setup I am measuring an\naverage latency hovering between 1~2 seconds.\nAfter the optimizations, it is reduced to 500~900 ms.\nFinally when using multiple threads and with proper driver\nsupport[1], it is measured in the order of 1 ms.\n\nA few modules are introduced:\n\n * An ID pool with reduced capabilities, simplifying its\n operations and allowing better performances in both\n single and multi-thread setup.\n\n * A lockless queue between PMDs / revalidators and\n offload thread(s). As the number of PMDs increases,\n contention can be high on the shared queue.\n This queue is designed to serve as message queue\n between threads.\n\n * A bounded lockless MPMC ring and some helpers for\n calculating moving averages.\n\n * A moving average module for Cumulative and Exponential\n moving averages.\n\nThe netdev-offload-dpdk module is made thread-safe.\nInternal maps are made per-netdev instead, and locks are\ntaken for shorter critical sections within the module.\n\nCI result: https://github.com/grivet/ovs/actions/runs/554918929\n\n[1]: The rte_flow API was made thread-safe in the 20.11 DPDK\n release. Drivers that do not implement those operations\n concurrently are protected by a lock. Others will\n allow better concurrency, that improve the result\n of this series.\n\nv2:\n\n * Improved the MPSC queue API to simplify usage.\n\n * Moved flush operation from initiator thread to offload\n thread(s). This ensures offload metadata are shared only\n among the offload thread pool.\n\n * Flush operation needs additional thread synchronization.\n The ovs_barrier currently triggers a UAF. Add a unit-test to\n validate its operations and a fix for the UAF.\n\nCI result: https://github.com/grivet/ovs/actions/runs/741430135\n The error comes from a failure to download 'automake' on\n osx, unrelated to any change in this series.\n\nv3:\n\n * Re-ordered commits so fixes are first. No conflict seen currently,\n but it might prevent them if some requested changes to the series\n were to move code in the same parts.\n\n * Modified the reduced quiescing the thread to use ovsrcu_quiesce(),\n and base next_rcu on the current time value (after quiescing happened,\n however long it takes).\n\n * Added Reviewed-by tags to the relevant commits.\n\nCI result: https://github.com/grivet/ovs/actions/runs/782655601\n\nv4:\n\n * Modified the seq-pool to use batches of IDs with a spinlock\n instead of lockless rings.\n\n * The llring structure is removed.\n\n * Due to the length of the changes to the structure, some\n acked-by or reviewed-by were not ported to the id-fpool patch.\n\nCI result: https://github.com/grivet/ovs/actions/runs/921095015\n\nv5:\n\n * Rebase on master.\n Conflicts were seen related to the vxlan-decap and pmd rebalance\n series.\n\n * Fix typo in xchg patch spotted by Maxime Coquelin.\n\n * Added Reviewed-by Maxime Coquelin on 4 patches.\n\nCI result: https://github.com/grivet/ovs/actions/runs/1212804378\n\nGaetan Rivet (27):\n ovs-thread: Fix barrier use-after-free\n dpif-netdev: Rename flow offload thread\n tests: Add ovs-barrier unit test\n netdev: Add flow API uninit function\n netdev-offload-dpdk: Use per-netdev offload metadata\n netdev-offload-dpdk: Implement hw-offload statistics read\n dpctl: Add function to read hardware offload statistics\n dpif-netdev: Rename offload thread structure\n mov-avg: Add a moving average helper structure\n dpif-netdev: Implement hardware offloads stats query\n ovs-atomic: Expose atomic exchange operation\n mpsc-queue: Module for lock-free message passing\n id-fpool: Module for fast ID generation\n netdev-offload: Add multi-thread API\n dpif-netdev: Quiesce offload thread periodically\n dpif-netdev: Postpone flow offload item freeing\n dpif-netdev: Use id-fpool for mark allocation\n dpif-netdev: Introduce tagged union of offload requests\n dpif-netdev: Execute flush from offload thread\n netdev-offload-dpdk: Use per-thread HW offload stats\n netdev-offload-dpdk: Lock rte_flow map access\n netdev-offload-dpdk: Protect concurrent offload destroy/query\n dpif-netdev: Use lockless queue to manage offloads\n dpif-netdev: Make megaflow and mark mappings thread objects\n dpif-netdev: Replace port mutex by rwlock\n dpif-netdev: Use one or more offload threads\n netdev-dpdk: Remove rte-flow API access locks\n\n lib/automake.mk | 5 +\n lib/dpctl.c | 36 ++\n lib/dpif-netdev.c | 734 ++++++++++++++++++++++++--------\n lib/dpif-netlink.c | 1 +\n lib/dpif-provider.h | 7 +\n lib/dpif.c | 8 +\n lib/dpif.h | 9 +\n lib/id-fpool.c | 279 ++++++++++++\n lib/id-fpool.h | 66 +++\n lib/mov-avg.h | 171 ++++++++\n lib/mpsc-queue.c | 251 +++++++++++\n lib/mpsc-queue.h | 190 +++++++++\n lib/netdev-dpdk.c | 6 -\n lib/netdev-offload-dpdk.c | 274 ++++++++++--\n lib/netdev-offload-provider.h | 4 +\n lib/netdev-offload.c | 92 +++-\n lib/netdev-offload.h | 21 +\n lib/ovs-atomic-c++.h | 3 +\n lib/ovs-atomic-clang.h | 5 +\n lib/ovs-atomic-gcc4+.h | 5 +\n lib/ovs-atomic-gcc4.7+.h | 5 +\n lib/ovs-atomic-i586.h | 5 +\n lib/ovs-atomic-locked.h | 9 +\n lib/ovs-atomic-msvc.h | 22 +\n lib/ovs-atomic-pthreads.h | 5 +\n lib/ovs-atomic-x86_64.h | 5 +\n lib/ovs-atomic.h | 8 +-\n lib/ovs-thread.c | 61 ++-\n lib/ovs-thread.h | 6 +-\n tests/automake.mk | 3 +\n tests/library.at | 14 +\n tests/test-barrier.c | 264 ++++++++++++\n tests/test-id-fpool.c | 615 +++++++++++++++++++++++++++\n tests/test-mpsc-queue.c | 772 ++++++++++++++++++++++++++++++++++\n vswitchd/vswitch.xml | 16 +\n 35 files changed, 3749 insertions(+), 228 deletions(-)\n create mode 100644 lib/id-fpool.c\n create mode 100644 lib/id-fpool.h\n create mode 100644 lib/mov-avg.h\n create mode 100644 lib/mpsc-queue.c\n create mode 100644 lib/mpsc-queue.h\n create mode 100644 tests/test-barrier.c\n create mode 100644 tests/test-id-fpool.c\n create mode 100644 tests/test-mpsc-queue.c\n\n--\n2.31.1" }