From patchwork Tue May 7 06:25:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ales Musil X-Patchwork-Id: 1932226 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=MsMyDGAr; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VYSvF0VWxz20fX for ; Tue, 7 May 2024 16:25:28 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 24DFF8231A; Tue, 7 May 2024 06:25:27 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id OfHMAGoP_ZRv; Tue, 7 May 2024 06:25:26 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 1365B81EED 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=MsMyDGAr Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 1365B81EED; Tue, 7 May 2024 06:25:26 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id D03DBC008E; Tue, 7 May 2024 06:25:25 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 8967FC0037 for ; Tue, 7 May 2024 06:25:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 728C140AE5 for ; Tue, 7 May 2024 06:25:24 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id idoS2gclVrXB for ; Tue, 7 May 2024 06:25:23 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=amusil@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 9A4C940156 Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 9A4C940156 Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=MsMyDGAr Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id 9A4C940156 for ; Tue, 7 May 2024 06:25:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715063122; 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=PRLLiZe+3g4IsS8AmfU5x4jAW6O/Hei8LGUAjwtiqw4=; b=MsMyDGArBkJNZM7yKkQWg9qRJ7kklG1LNjuJI2o3TEAxY7bIBCIwmJ6Lw6sDw7b9PGS5iZ 3qIG8VuI3p+96C6cCiOv8nf83dviHCQhT2vmOHftOSKQhV1jsm2xIYt7goHUdNSwiNP0MZ d+H2prxTQ1MPPw8vU/67ZFf89NvUuDw= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-681-48R4jd8zMeSegwQI2xl-rQ-1; Tue, 07 May 2024 02:25:18 -0400 X-MC-Unique: 48R4jd8zMeSegwQI2xl-rQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9A7A388CE88; Tue, 7 May 2024 06:25:18 +0000 (UTC) Received: from amusil.brq.redhat.com (unknown [10.43.17.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0E018C271B1; Tue, 7 May 2024 06:25:17 +0000 (UTC) From: Ales Musil To: dev@openvswitch.org Date: Tue, 7 May 2024 08:25:13 +0200 Message-ID: <20240507062517.387329-1-amusil@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn v2 0/4] Mac cache handling refactor 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 were two modules in controller mac_cache and mac-learn, both of them did very similar thing with pretty big overlap. The goal of the series is to consolidate and merge both of those modules into single one. That will reduce the duplication and should make it easier for future updates to MAC binding, FDB or packet buffering functionality. There is also fix to properly handle tunnel_key change for LSP, LRP, LR and LS. This was inconsistent and could lead to wrong flows being still present even after the tunnel key change. This is not a huge issue because the tunnel_key is rarelyt changed during runtime. Ales Musil (4): northd, controller: Handle tunnel_key change consistently. controller: Rename mac_cache to to mac-cache. controller: Merge the mac-cache and mac-learn. controller: Use datapath key for the mac cache thresholds. controller/automake.mk | 6 +- controller/binding.c | 13 +- controller/mac-cache.c | 745 ++++++++++++++++++++++++++++++++++++ controller/mac-cache.h | 210 ++++++++++ controller/mac-learn.c | 482 ----------------------- controller/mac-learn.h | 145 ------- controller/mac_cache.c | 547 -------------------------- controller/mac_cache.h | 124 ------ controller/ovn-controller.c | 214 +++++++---- controller/pinctrl.c | 165 ++++---- controller/statctrl.c | 7 +- controller/statctrl.h | 2 +- northd/northd.c | 7 + tests/ovn.at | 56 ++- 14 files changed, 1253 insertions(+), 1470 deletions(-) create mode 100644 controller/mac-cache.c create mode 100644 controller/mac-cache.h delete mode 100644 controller/mac-learn.c delete mode 100644 controller/mac-learn.h delete mode 100644 controller/mac_cache.c delete mode 100644 controller/mac_cache.h