From patchwork Thu Jul 8 16:40:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 1502513 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.136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: 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=U2sVyd8L; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 ozlabs.org (Postfix) with ESMTPS id 4GLMV1321Tz9sWc for ; Fri, 9 Jul 2021 02:40:25 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 8B45660BF1; Thu, 8 Jul 2021 16:40:23 +0000 (UTC) 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 GQ4u5Zxhctdo; Thu, 8 Jul 2021 16:40:22 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id C94B060AB3; Thu, 8 Jul 2021 16:40:21 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 9E450C001A; Thu, 8 Jul 2021 16:40:21 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id A917FC000E for ; Thu, 8 Jul 2021 16:40:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id A60D783C4B for ; Thu, 8 Jul 2021 16:40:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp1.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com 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 IPFg6qvLr3UJ for ; Thu, 8 Jul 2021 16:40:19 +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 [170.10.133.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id 9855783C48 for ; Thu, 8 Jul 2021 16:40:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625762418; 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=BoUudcDPeSF0PFR+gpZL3bvoXRdocQUFSccolzWgv5U=; b=U2sVyd8LpDMbiNvezEuhVGW/jOMqdHkqtC/YIB37FUrlBfDcPCiyORxZtkhyMuqsIKWjQK qJDvCOk3MxEITB2gikkkhj6WN99eVCWzNHJfE0qoxbW5jD/1krZePw//5/P2MAUV60Y7W0 6HRLt28r3HirKPkjML3bHzLjVUGfNxg= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-394-TapDOd7jNaasAaquUiEl0w-1; Thu, 08 Jul 2021 12:40:16 -0400 X-MC-Unique: TapDOd7jNaasAaquUiEl0w-1 Received: by mail-ej1-f69.google.com with SMTP id p5-20020a17090653c5b02903db1cfa514dso2084314ejo.13 for ; Thu, 08 Jul 2021 09:40:16 -0700 (PDT) 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:mime-version :content-transfer-encoding; bh=BoUudcDPeSF0PFR+gpZL3bvoXRdocQUFSccolzWgv5U=; b=fhyieLLRse7nEgoMkWwfMUD2PooYObP3jOyTxhjKKbD41PrJN3+z6KgoESSZYVGG0y NP4Trr9St2B1N2i2bw8lk3bHQkkGyhfCTHMKuIIfRQmkQfB0ivRqKA4vI2lrfiPFfgiS 9ATsUkxjXnQW48hLmZ4x8xQXYfcmzpPiLP8+PzoEYYm7h0iTCsNndA0g1epyALD8riAt /N18f3wH0beXLn2AxMEVVvSbFAqLBOTJUqnDVLU8KPmfqF4pWZ+KM+uhiMTD4YdB79p5 Hn6J9W1N6u66r0HOSp2s46l1gJNMFyCklvtUQc5Diilo+tlwzzwxOBezc53YmdghBxIG Fh4Q== X-Gm-Message-State: AOAM530EPKUsmnIwfzpTgao2nuxo3F3w0Mh56kaTVgEPxzQRvNB7H6h0 jdMX4r3gP6iLtZZB7kgXX/A5JOLfTzGC278Kf1W6uOMqOGzci9Ir57PMhkJ/95Ef5j6D1v3trmQ 046AA8t5/EPKu73L/lsyr4K8Ngrx/bAdBo6zJAgD4Ck/wnNMoY+C2uNh1VGSVKvxctiqkASrHPW o= X-Received: by 2002:a05:6402:692:: with SMTP id f18mr18001553edy.327.1625762415603; Thu, 08 Jul 2021 09:40:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKxoAKbhQnzdnBuaN+y83oXpnQRgydHLArDoUqtUU4QNn+q7zNvOGaLy9J1EPIZ+pj73DMxg== X-Received: by 2002:a05:6402:692:: with SMTP id f18mr18001537edy.327.1625762415407; Thu, 08 Jul 2021 09:40:15 -0700 (PDT) Received: from lore-desk.redhat.com (net-93-71-3-244.cust.vodafonedsl.it. [93.71.3.244]) by smtp.gmail.com with ESMTPSA id ee25sm1568103edb.6.2021.07.08.09.40.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 09:40:15 -0700 (PDT) From: Lorenzo Bianconi To: dev@openvswitch.org Date: Thu, 8 Jul 2021 18:40:01 +0200 Message-Id: X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lorenzo.bianconi@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: dceara@redhat.com Subject: [ovs-dev] [PATCH v6 ovn 0/4] respin CoPP series 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" This series respin CoPP support introduced here [0] by Dumitru rebasing on top of ovn master branch and adding some missing meters (e.g. bfd or acl reject). The main goal of this series is to continue the discussion about the proposed approach and to align on CMS APIs. For the moment DDLog is not supported yet and it will be added in a subsequent series. Related bz: https://bugzilla.redhat.com/show_bug.cgi?id=1947913 https://bugzilla.redhat.com/show_bug.cgi?id=1946610 Changes since v5: - rebased on top of ovn master Changes since v4: - cosmetics - rebased on top of ovn master Changes since v3: - fix DDlog compilation errors - rebased on top of ovn master Changes since v2: - add sbctl checks in tests/ovn-northd.at unit tests - remove letfovers in utilities/ovn-nbctl.8.xml Changes since v1: - merge patch 3/5 and 4/5 - cosmetics - improve naming conventions - add more unit-tests/system-tests - remove duplicated flow - remove some leftover entries in ovn-nbctl.8.xml - add metering for sctp abort packets Changes since RFC: - drop per-port metering - add unit/system tests - add reject action metering Dumitru Ceara (4): ovn-controller: Add support for Logical_Flow control meters ovn-northd: Add support for CoPP. ovn-northd: Add CoPP policies for flows that punt packets to ovn-controller. NEWS: Add CoPP support. NEWS | 1 + controller/lflow.c | 40 ++- controller/ofctrl.c | 56 ++-- controller/ofctrl.h | 21 +- controller/physical.c | 9 +- include/ovn/actions.h | 3 +- lib/actions.c | 116 +++----- lib/automake.mk | 2 + lib/copp.c | 143 ++++++++++ lib/copp.h | 59 ++++ northd/ovn-northd.c | 567 ++++++++++++++++++++++++-------------- northd/ovn_northd.dl | 2 + ovn-nb.ovsschema | 16 +- ovn-nb.xml | 81 ++++++ ovn-sb.ovsschema | 4 +- ovn-sb.xml | 6 + tests/atlocal.in | 3 + tests/ovn-controller.at | 52 ++++ tests/ovn-northd.at | 96 +++++++ tests/ovn.at | 9 +- tests/system-ovn.at | 138 ++++++++++ utilities/ovn-nbctl.8.xml | 75 +++++ utilities/ovn-nbctl.c | 178 ++++++++++++ 23 files changed, 1364 insertions(+), 313 deletions(-) create mode 100644 lib/copp.c create mode 100644 lib/copp.h