From patchwork Mon Oct 18 12:13:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Gray X-Patchwork-Id: 1542567 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=aBTNi3fH; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HXwls4WCXz9sPf for ; Mon, 18 Oct 2021 23:14:17 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id D5DAB4040B; Mon, 18 Oct 2021 12:14:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PShsspskbbJO; Mon, 18 Oct 2021 12:14:14 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTPS id B9432403E9; Mon, 18 Oct 2021 12:14:13 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 964A3C0011; Mon, 18 Oct 2021 12:14:13 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id CF685C000D for ; Mon, 18 Oct 2021 12:14:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id AFAFD403F2 for ; Mon, 18 Oct 2021 12:14:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5MErOBqGhXt1 for ; Mon, 18 Oct 2021 12:14:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id 6B75B403E9 for ; Mon, 18 Oct 2021 12:14:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634559249; 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=T3OqzvzARxVMuqkkWBkOXb1/6mzTv/3XXSkOt/vk8OM=; b=aBTNi3fHM077IfHHbkhnlu8lvEtZQuBpteq2xTL/uaIhQSgWgRyDsQ1nBUrXGIvW92ARBe gKHeK69E+NUR/q2XBMaaBFOBS8UR0IbtE0JOhTKG7DOtHmgdnAsxRM2lr/1H96DBie0UU3 1+41b4MR2NqpAItwZuzvf/q3fn19iDw= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-513-UmVyua4WMTG8GxgxpzGP2A-1; Mon, 18 Oct 2021 08:14:08 -0400 X-MC-Unique: UmVyua4WMTG8GxgxpzGP2A-1 Received: by mail-wr1-f70.google.com with SMTP id a15-20020a056000188f00b00161068d8461so8813400wri.11 for ; Mon, 18 Oct 2021 05:14:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=yP9tSQirGSR0ZCMGP75gpkxIzw2HXW81m7QVUVchyuc=; b=6CtRNuuhIDrkittiThkgIo+jSVcz2iYx8bN9DqqmWHXbB4tiWOoEBBuhIZCpQDpjnl 9bIHF6vQvXtdDwDc4TuuyzjU0rOKWqFuW2CSljzlorpf/Rk1OfJLN2ocb5O6o552mLyW JMbWKRNVOJTStbU73R9vDm0VG03/K5rmWR5y8veJ9ogrsLDqRQ4tBSm8bq6qwotDlaG8 j8ym93O/RTLYJfNnUQvKkxyN+02l3KuJNlpHHrnoVYS3Tmn4qp+BTqlxlynPwabxDWh/ o5ZuMzVX3Tro9CxE5QzE+YAH1X1O3sUPacHB2LeJZ8F8Ni8LA5NUqFaj0S3U6RFwzQle 8fRA== X-Gm-Message-State: AOAM530DU3NK6LEeSMnp1RnqvmL0hUQgCNlB++iq8R4ME7zDxNlqkpmG FLVnaskSkjTMIUQr5o8PCfhHr+opdjTHSHC0iVE37eSM70qd5H/HReUV07ugUi9q7p3ekmCaj57 SlF8Rv60UUpQKzTUYkME4DlZC2gQTGPwH472wKhJTSC02oufDBuJvBVbXS5RExgFFA8aB X-Received: by 2002:a1c:a747:: with SMTP id q68mr44492571wme.139.1634559246694; Mon, 18 Oct 2021 05:14:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTP5HHf21SLwRE/pXqvFZRTLFp+aKLD25wdBGiTKf9eqCxEfEtRPsM1cF0KUEZBjl7ml4Hgw== X-Received: by 2002:a1c:a747:: with SMTP id q68mr44492548wme.139.1634559246452; Mon, 18 Oct 2021 05:14:06 -0700 (PDT) Received: from wsfd-netdev91.ntdv.lab.eng.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id s13sm18429034wmc.47.2021.10.18.05.14.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Oct 2021 05:14:05 -0700 (PDT) From: Mark Gray To: dev@openvswitch.org Date: Mon, 18 Oct 2021 08:13:56 -0400 Message-Id: <20211018121403.842185-1-mark.d.gray@redhat.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mark.d.gray@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn v3 0/7] northd: Introduce incremental processing framework 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" Add the 'inc-proc-eng' framework to northd. This does *not* add any incremental processing at this stage but provides the framework to do so. Even in this base configuration, we see an advantage as northd no longer processes the databases if it has been woken only to handle, for example, a unixctl command. This can be seen below $ ovn-appctl -t ovn-northd stopwatch/reset $ for i in {1..10}; do ovn-appctl -t ovn-northd stopwatch/show >/dev/null; done $ ovn-appctl -t ovn-northd stopwatch/show ovnnb_db_run Statistics for 'ovnnb_db_run' Total samples: 0 Maximum: 0 msec Minimum: 0 msec 95th percentile: 0.000000 msec Short term average: 0.000000 msec Long term average: 0.000000 msec Hopefully this starting point will allow others to discuss or contribute changes to incrementally process some aspects of northd. We an also decide if it is worth progressing with this in general. Thanks, v2: Rebase v3: Fix compile error in 2/7 picked up by 0-day robot Mark Gray (7): inc-proc-eng: Allow definition of engine_node with global scope northd: Introduce incremental processing for northd northd: Add n_nat_entries field to 'struct ovn_datapath' northd: Rename struct northd_context northd: Introduce struct northd_data northd: Add lflow node en_lflow: Generate logical flows controller/ovn-controller.c | 2 +- lib/inc-proc-eng.h | 24 ++- northd/automake.mk | 6 + northd/en-lflow.c | 54 ++++++ northd/en-lflow.h | 16 ++ northd/en-northd.c | 65 +++++++ northd/en-northd.h | 21 ++ northd/inc-proc-northd.c | 257 +++++++++++++++++++++++++ northd/inc-proc-northd.h | 15 ++ northd/northd.c | 368 +++++++++++++++++++----------------- northd/northd.h | 36 +++- northd/ovn-northd.c | 237 +++++++++++++---------- 12 files changed, 812 insertions(+), 289 deletions(-) create mode 100644 northd/en-lflow.c create mode 100644 northd/en-lflow.h create mode 100644 northd/en-northd.c create mode 100644 northd/en-northd.h create mode 100644 northd/inc-proc-northd.c create mode 100644 northd/inc-proc-northd.h