From patchwork Fri Jul 1 13:34:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Valerio X-Patchwork-Id: 1651201 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=RQXJdVj/; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LZGQm5Lb0z9s09 for ; Fri, 1 Jul 2022 23:34:56 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 71D9D846B5; Fri, 1 Jul 2022 13:34:54 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 71D9D846B5 Authentication-Results: smtp1.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=RQXJdVj/ X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bo_24Uz8gTtG; Fri, 1 Jul 2022 13:34:53 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 9AC5684505; Fri, 1 Jul 2022 13:34:52 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 9AC5684505 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 61DC3C0035; Fri, 1 Jul 2022 13:34:52 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 51B95C002D for ; Fri, 1 Jul 2022 13:34:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 2B81F60BF5 for ; Fri, 1 Jul 2022 13:34:51 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 2B81F60BF5 Authentication-Results: smtp3.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=RQXJdVj/ X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7IvcD7DTzlDf for ; Fri, 1 Jul 2022 13:34:50 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org BD4E760BC4 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id BD4E760BC4 for ; Fri, 1 Jul 2022 13:34:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656682488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZIoi7X5FlicG7VYWTgwxZHpavsc8kw4x7aV489bVhUQ=; b=RQXJdVj/s0818vcFvlc9xSszoMsM050PunY4+dAL+gtUzorTg5XyZpMiSQS3I915e+5Xrn fvaEJxryod+42j5Vca5eW+xSPB/1Gt4QxpH7geJV98JipIvGFgbgKH5+FB6bJCKUXk6bIL kt+0XCFBd+A5S97K6BD35+C04iegGRE= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-219-2qW3JzhsPBWQ-b51RuC4aw-1; Fri, 01 Jul 2022 09:34:47 -0400 X-MC-Unique: 2qW3JzhsPBWQ-b51RuC4aw-1 Received: by mail-wm1-f72.google.com with SMTP id be12-20020a05600c1e8c00b0039c506b52a4so2493816wmb.1 for ; Fri, 01 Jul 2022 06:34:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:from:to:cc:date:message-id:user-agent :mime-version:content-transfer-encoding; bh=ZIoi7X5FlicG7VYWTgwxZHpavsc8kw4x7aV489bVhUQ=; b=JizcQr5439AgfjEnEzpXk0MX8W0QTx3yCW9h8NE/pXuwXYYcEWFPt17bEwqCY9IOWM 2B37ApK0oPYatDXv6d7G1ApB104f7KeGN9XKS1n2SGmpn8vs4BD4nssxA9yOOsKcUbNS ziU/OGZUsr2jo1p7Rf+8i/uKCniMYb4DaN1emN/0G7Ivoh8Pd01nbyWKlR6bfx8TM/vc ElpdX19MTuJgh48X7XxhYeYocKsHbgL0CLNfRVh5gp3yBpPgSTVo8nhPEBHm3J6LN2Yg iFrEJcY50DeK0iDLD5B1/rirlrfDxd4uooKDXwB9HLaVioKXnBVEbAEMYG4/RwSZcoZL 7zsw== X-Gm-Message-State: AJIora/2POxGE06toxt8LjCAvyt7CEELem/WJhRuVziAOHQarN+Yn8H3 y45CKm/aY992aO/vo9djaHmkOna9OreYsSnM1/uEunFq2a3/1wS7571OF7E7m7olDShJDYh5jdZ aCWq+melX9n1peHi6SY6TvR6d/18FhFZFk/uUU/cnT4Gnmn/oRdFRoB/fKBUx9BWi X-Received: by 2002:a5d:6045:0:b0:21b:9397:41aa with SMTP id j5-20020a5d6045000000b0021b939741aamr13961865wrt.713.1656682486239; Fri, 01 Jul 2022 06:34:46 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v9AmKLfswFU5Vq/NYwoN87F1n9YDttYayO23IfDa59uAbZzxhRW4Ziqhhb4+ETbGfiq3WeVA== X-Received: by 2002:a5d:6045:0:b0:21b:9397:41aa with SMTP id j5-20020a5d6045000000b0021b939741aamr13961839wrt.713.1656682485977; Fri, 01 Jul 2022 06:34:45 -0700 (PDT) Received: from localhost (net-5-95-131-226.cust.vodafonedsl.it. [5.95.131.226]) by smtp.gmail.com with ESMTPSA id t8-20020a7bc3c8000000b003a050a391e8sm10325825wmj.38.2022.07.01.06.34.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 06:34:45 -0700 (PDT) From: Paolo Valerio To: dev@openvswitch.org Date: Fri, 01 Jul 2022 15:34:29 +0200 Message-ID: <165668246947.1967719.4502709837520339365.stgit@fed.void> User-Agent: StGit/1.1 MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pvalerio@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: i.maximets@ovn.org Subject: [ovs-dev] [PATCH v4 0/6] conntrack: Introduce buckets and reduce contention. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" There are two main logical changes that the series tries to introduce. The first one is the reintroduction of buckets, the second one is the removal of the expiration lists. The first two patches are a prereq and were picked (untouched) from this series (by Gaetan): https://patchwork.ozlabs.org/project/openvswitch/list/?series=249027&state=* The third patch is a follow up of the following (with comments addressed): https://patchwork.ozlabs.org/project/openvswitch/patch/20201129033255.64647-2-hepeng.0320@bytedance.com/ The fourth patch introduces the buckets and removes the expiration lists. The buckets got reintroduced as cmaps instead of hmaps, trying to narrow down the critical sections as well. Further details can be found in the description of the patches. Gaetan Rivet (3): conntrack: Use a cmap to store zone limits conntrack-tp: Use a cmap to store timeout policies conntrack: Use an atomic conn expiration value Paolo Valerio (2): conntrack: Split single cmap to multiple buckets. conntrack: Make ovs-appctl dpctl/ct-bkts work with multiple buckets Peng He (1): conntrack: Replaces nat_conn introducing key directionality. lib/conntrack-private.h | 60 ++- lib/conntrack-tp.c | 102 ++--- lib/conntrack.c | 994 ++++++++++++++++++++++------------------ lib/conntrack.h | 4 +- lib/dpif-netdev.c | 5 +- tests/system-traffic.at | 5 +- 6 files changed, 639 insertions(+), 531 deletions(-)