From patchwork Thu Jun 3 22:50:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 1487484 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=QqUVdFFi; 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 4Fx1N11jgnz9s5R for ; Fri, 4 Jun 2021 08:51:11 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id C87C8608BD; Thu, 3 Jun 2021 22:51:07 +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 dWXXl1GDL3vJ; Thu, 3 Jun 2021 22:51:06 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTP id 067AE60657; Thu, 3 Jun 2021 22:51:05 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id D9824C000D; Thu, 3 Jun 2021 22:51:05 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id C8A66C0001 for ; Thu, 3 Jun 2021 22:51:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id A97EA83DEF for ; Thu, 3 Jun 2021 22:51:04 +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 BBm1D9ORoMAc for ; Thu, 3 Jun 2021 22:51:01 +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 C906783DED for ; Thu, 3 Jun 2021 22:51:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622760660; 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=8IUIU2x8+7a/bG4dNFfiFMY3DjNicFX9zmqQstOWOJQ=; b=QqUVdFFiPIHmQLsdPV923p+ZTDHuqLaREC5c5DOu+ZHT/O6G6W/Q6QzB40WvgIamkcBG4q yAtV54SG+/ONY4NE+aTahWq1WtN+MQsHAXECLXQimqw/ID4QHykOkl9NM7CYD6PJ251lPU oBCpf0BgzLQAZnJ8N8vImLj6OXwL6Sk= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-196-XJ96ntg4N9KkjdiGTiKJbg-1; Thu, 03 Jun 2021 18:50:56 -0400 X-MC-Unique: XJ96ntg4N9KkjdiGTiKJbg-1 Received: by mail-wm1-f69.google.com with SMTP id r1-20020a05600c35c1b029018ec2043223so1930369wmq.7 for ; Thu, 03 Jun 2021 15:50:56 -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=8IUIU2x8+7a/bG4dNFfiFMY3DjNicFX9zmqQstOWOJQ=; b=KHIFTJHYdG0GWiUcrO25PaTedb85/U5XB7VaABh4QNHSgxgXQdWpGa24hOyIdVJPgr t6ilmETnMBD9MNl3c1O05EGKN8EqnWgztvJwp0V4GNGKHmczY87QbufRdLVnUgFZmo+n H11YwBfBf5YDFry9zLgjbHy2YlYWms9qFO2af6fu84bM1nah80ncMN2w05Vg7sZCypDY a9awDzN7AXWvN76WbgrYyFDdZlXJ//TyGn6yELkejquPil5MusZa7AuE1PcrlncSFNGC t4TTpwJAL/f/sV2HMzEh7w470c/OGN0kkYWddKYYwF2uwaAQLU39J22jWp+OVTUt45ia L+rw== X-Gm-Message-State: AOAM531/HY7+1WSf1PbsZGnKJd60xwgxGqHY4z7Q8H5VhZvf96xSv1/N aNeOyO5TlTtJ8JbFhNqw+U3Il6z6FoFDrXCNa/8d7Zx4V438tzMjkmci6pQwQyndpwMnBKBklcm BsZ3DBdpzt5h1ZSWu59cwdT6CfdKZQ+JNXP45NJFBav2JHNOa8NyYgaIlSMmBkjzAMHlRZeprnq w= X-Received: by 2002:a1c:cc17:: with SMTP id h23mr591388wmb.129.1622760655485; Thu, 03 Jun 2021 15:50:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJya1F4o/KS0jOtpkjzVVg669Ju8Y8SPaqkzpMgT9MHzpOpDaptct6KOfVybqHCtodWbi9L65A== X-Received: by 2002:a1c:cc17:: with SMTP id h23mr591374wmb.129.1622760655196; Thu, 03 Jun 2021 15:50:55 -0700 (PDT) Received: from lore-desk.redhat.com (net-93-71-117-34.cust.vodafonedsl.it. [93.71.117.34]) by smtp.gmail.com with ESMTPSA id f6sm5521900wru.72.2021.06.03.15.50.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Jun 2021 15:50:54 -0700 (PDT) From: Lorenzo Bianconi To: dev@openvswitch.org Date: Fri, 4 Jun 2021 00:50:45 +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 v3 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 no ddlog support has been added. Related bz: https://bugzilla.redhat.com/show_bug.cgi?id=1947913 https://bugzilla.redhat.com/show_bug.cgi?id=1946610 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 [0] https://patchwork.ozlabs.org/project/openvswitch/list/?series=140778&state=* 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 | 55 ++-- controller/ofctrl.h | 21 +- controller/physical.c | 7 +- 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 | 535 ++++++++++++++++++++++++-------------- ovn-nb.ovsschema | 16 +- ovn-nb.xml | 81 ++++++ ovn-sb.ovsschema | 6 +- ovn-sb.xml | 6 + tests/atlocal.in | 3 + tests/ovn-controller.at | 48 ++++ tests/ovn-northd.at | 92 +++++++ tests/ovn.at | 4 +- tests/system-ovn.at | 135 ++++++++++ utilities/ovn-nbctl.8.xml | 75 ++++++ utilities/ovn-nbctl.c | 178 +++++++++++++ 22 files changed, 1327 insertions(+), 299 deletions(-) create mode 100644 lib/copp.c create mode 100644 lib/copp.h