From patchwork Tue Nov 3 22:18:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Flaviof X-Patchwork-Id: 1393499 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=flaviof.com Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CQkhL6b8Wz9sPB for ; Wed, 4 Nov 2020 09:18:42 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8174A864DA; Tue, 3 Nov 2020 22:18:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dBetevVw-67D; Tue, 3 Nov 2020 22:18:41 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id EEE1786442; Tue, 3 Nov 2020 22:18:40 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id D4ED6C0889; Tue, 3 Nov 2020 22:18:40 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id A5267C0051 for ; Tue, 3 Nov 2020 22:18:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id A14498644F for ; Tue, 3 Nov 2020 22:18:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4ZLSpv8cjzsl for ; Tue, 3 Nov 2020 22:18:39 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 0814E86442 for ; Tue, 3 Nov 2020 22:18:39 +0000 (UTC) Received: by mail-qk1-f180.google.com with SMTP id b18so16853420qkc.9 for ; Tue, 03 Nov 2020 14:18:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id :senderwebaddress; bh=vCQqxyl3Hk5vctNtK4Y201nP1cP1Dh4+dDWzAV1XLgQ=; b=L6tSCbkhTL56R+s91KnBaDS2ww/3DjUCW4NqH0FylRy7GTK3FQ15KiV9fYLPWxxRw1 9MnZk9Z3fFvNmfnfposaCQk6S1aHLWsL0nqwiJOtxfO60OBJJsofIviyB7gPYR6SeIKh 7MqB2vxs3S5sL2ip3Ht8cBWCPkKurJIZ0Pq3yBAH7toouqyLMbJCXrTVM7KMTgV/jqiK 1Ctlyp/agnXOkd3E73VLmtMZzxag+xLQ5zwP8OwjRdSxd0wLBGWes7Z9+9WqjK7Uan21 5o6LEAvXdhffISyRUca0Cx8sEA5wjbujZh581ct5benX0JF2pNcv77MBo9eIOrmAGHw+ bF5Q== X-Gm-Message-State: AOAM533VuusEk5ybrOvNe14SvM5N0AQitR9LkwBdHWt5Pf59/zWqtwS0 5om12OfB8nUZnFRTBhFkKb2oqP+V2U6AEg== X-Google-Smtp-Source: ABdhPJwgpi27BIFGa1CrzxUKOeQuRKCnEuKBsu+dTJX8pRx1zOS1lgFSpzziaPOthLyo6c+msv6RuQ== X-Received: by 2002:a05:620a:2144:: with SMTP id m4mr22105539qkm.269.1604441917784; Tue, 03 Nov 2020 14:18:37 -0800 (PST) Received: from c8vm.redhat.com (pool-173-76-170-96.bstnma.fios.verizon.net. [173.76.170.96]) by smtp.gmail.com with ESMTPSA id k134sm140423qke.111.2020.11.03.14.18.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2020 14:18:36 -0800 (PST) From: Flavio Fernandes To: dev@openvswitch.org Date: Tue, 3 Nov 2020 22:18:33 +0000 Message-Id: <20201103221834.25541-1-flavio@flaviof.com> X-Mailer: git-send-email 2.18.4 SenderWebAddress: http://flaviof.com/ Subject: [ovs-dev] [PATCH v3 ovn 0/1] northd: Enhance the implementation of ACL log meters. 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: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Using meters is a great way to keep the ovn-controllers from getting overwhelmed with ACL log events. Since multiple ACL rows with logging enabled can refer to the same meter name, I ran a little experiment to better understand how that behaves [1]. From that experiment, we see that a 'noisy' ACL match could consume all the events allowed by the meter, shadowing logs for other ACLs that also use the same meter. The thought of maintaining a meter row per ACL at the NB side is a solution, but it could easily become a management burden for the CMS. A much better approach would be to leverage northd to take care of this on behalf of the ACLs. As northd populates SB meter table from NB meter table, a new logic checks if the meter is configured as 'shared'. Such config is kept as a new option in nb_global. Shared meters result in additional rows in the SB that have the same attributes of the original (aka template) meter except for its name has the ACL UUID appended to it. Last but not least, northd takes care of using the corresponding meter name as the action in the logging of the ACL. [1]: https://github.com/flavio-fernandes/ovsdbapp_playground/blob/acl_meter_issue/scripts/acl_meter.sh Flavio Fernandes (1): northd: Enhance the implementation of ACL log meters. northd/ovn-northd.c | 201 ++++++++++++++++++++++++++++++++------------ ovn-nb.xml | 14 +++ tests/ovn-northd.at | 92 ++++++++++++++++++++ 3 files changed, 255 insertions(+), 52 deletions(-)