From patchwork Tue Aug 12 14:56:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ales Musil X-Patchwork-Id: 2122170 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=UZPTGbSD; 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 4c1ZNJ71J1z1xwC for ; Wed, 13 Aug 2025 00:57:03 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id A5211845B7; Tue, 12 Aug 2025 14:57:10 +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 wTnlY2yuY1rj; Tue, 12 Aug 2025 14:57:09 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=2605:bc80:3010:104::8cd3:938; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 4FA5C8408F Authentication-Results: smtp1.osuosl.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=UZPTGbSD Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTPS id 4FA5C8408F; Tue, 12 Aug 2025 14:57:09 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 3EA54C0889; Tue, 12 Aug 2025 14:57:09 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 3B792C02A4 for ; Tue, 12 Aug 2025 14:57:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 26DFA6059F for ; Tue, 12 Aug 2025 14:57:08 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id L4-47su6wVLJ for ; Tue, 12 Aug 2025 14:57:07 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.133.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=amusil@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org 2A81C607C3 Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 2A81C607C3 Authentication-Results: smtp3.osuosl.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=UZPTGbSD Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id 2A81C607C3 for ; Tue, 12 Aug 2025 14:57:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1755010625; 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=HOtH7cTUZcGEP5/YTtk1aoSFjTs99uI74r/zdEIRraU=; b=UZPTGbSDr4nci1aDoks2e43joRv3q4RXJ0Bc9uCVyshaQhhu/L+RSIbAn/MZxIiGjiECtF +1ngPwgqbTfr3qmGRF2RULfozPz6csECa+DI15m9TMmRaI0q7vvvgkOA4VpkgRStzJ7+sM Dwdf5DAtvIyWj4E4+yd5tGwsXL+AKw8= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-518-BL9-L4UVO_uTZXYjFPM40Q-1; Tue, 12 Aug 2025 10:57:02 -0400 X-MC-Unique: BL9-L4UVO_uTZXYjFPM40Q-1 X-Mimecast-MFC-AGG-ID: BL9-L4UVO_uTZXYjFPM40Q_1755010621 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 658DB1800293 for ; Tue, 12 Aug 2025 14:57:01 +0000 (UTC) Received: from amusil.redhat.com (unknown [10.44.32.98]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 18A8830001A1; Tue, 12 Aug 2025 14:56:59 +0000 (UTC) To: dev@openvswitch.org Date: Tue, 12 Aug 2025 16:56:44 +0200 Message-ID: <20250812145658.1528144-1-amusil@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: CmmMdMpixJFZQEUhMPPjG6vGkfeg5zTZ8R5H4ggCwlo_1755010621 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn v3 00/14] Add support for basic EVPN L2. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Ales Musil via dev From: Ales Musil Reply-To: Ales Musil Cc: dceara@redhat.com Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" The series adds support for basic EVPN L2. This is done by allowing users to specify VNI on logical switches. That switch is considered to be connected into the EVPN network. There are some prerequisites that we expect to be configured. The should provide three interfaces in the frr VRF, loopback called lo-$vni, vxlan interface called vxlan-$vni and bridge that will control both of those interfaces, called br-$vni. Those three interfaces are necessary to learn and advertise the remote VTEPs and their FDBs. On top of that user is expected to create OvS tunnel interface that will be used by OVN to send/receive the traffic from EVPN. The series has four key parts, first is the netlink interaction that allows us to learn the neighbors and create a new ones when needed. Second part takes care of learning the remote VTEPs with the physical flow creation that will ensure that the traffic is properly handled in OVN. The third part takes care of learning the remote FDBs that are provided by frr through the vxlan-$vni interface, creating physical flows accordingly to learned FDBs. The last part takes care of exposing OVN LSPs MAC addresses for interfaces connected to the LS with VNI. All of those structures and their processing is happening strictly on each ovn-controller. In other words there is no persistence, all of this is in memory. This shouldn't affect restarts as we are able to construct the data within single engine run so we wouldn't flush the flows. The reason for that is mainly scalability. Storing all those data in SB would lead to duplicates that would be different only in the assigned chassis. If there is a need for better persistence we can consider a local database. Please note that all of those config options are marked as experimental, there is a chance that it might be changed or slightly adjusted. The expectation is the feature would be tested within the 25.09 release and possibly marked as stable in the 26.03 release. There are some things that should be considered for 26.03 that would extend the functionality. For example the current approach allows us to learn only static FDBs. But it would be definitely useful to allow also dynamic FDB learning from incoming ARP as we do normally in OVN pipeline. Ales Musil (8): controller: Add support for remote VTEP learning. controller: Create EVPN tunnel based on new option. controller: Pair remote VTEPs with datapaths. controller: Create physical flows based on EVPN structures. northd: Add an option to specify EVPN vni in logical switches. controller: Create physical flows based on the advertised EVPN FDBs. controller, northd: Add logical flows to use the EVPN static FDBs. controller, northd: Add an option to advertise FDB over EVPN. Dumitru Ceara (6): controller: Support monitoring/updating neighbor entries through Netlink. controller: Watch for (Linux) neighbor changes. controller: Add host-if-monitor to track (Linux) interface indices. controller: Add I-P to monitor host interfaces and synchronize neighbors. multinode.at: Factor configuration of BGP FRR speakers and OVN topology. multinode.at: Add EVPN L2 test. Makefile.am | 5 +- NEWS | 13 + TODO.rst | 10 + controller/automake.mk | 19 +- controller/chassis.c | 37 ++ controller/encaps.c | 115 +++- controller/evpn-binding.c | 416 +++++++++++++ controller/evpn-binding.h | 88 +++ controller/evpn-fdb.c | 151 +++++ controller/evpn-fdb.h | 59 ++ controller/host-if-monitor-stub.c | 43 ++ controller/host-if-monitor.c | 161 +++++ controller/host-if-monitor.h | 30 + controller/lflow.c | 1 + controller/lflow.h | 8 +- controller/neighbor-exchange-netlink.c | 487 ++++++++++++++++ controller/neighbor-exchange-netlink.h | 62 ++ controller/neighbor-exchange-stub.c | 47 ++ controller/neighbor-exchange.c | 249 ++++++++ controller/neighbor-exchange.h | 69 +++ controller/neighbor-table-notify-stub.c | 57 ++ controller/neighbor-table-notify.c | 244 ++++++++ controller/neighbor-table-notify.h | 45 ++ controller/neighbor.c | 275 +++++++++ controller/neighbor.h | 98 ++++ controller/ovn-controller.8.xml | 28 + controller/ovn-controller.c | 745 +++++++++++++++++++++++- controller/physical.c | 339 ++++++++++- controller/physical.h | 12 + controller/test-ovn-netlink.c | 197 +++++++ include/ovn/actions.h | 3 + include/ovn/logical-fields.h | 3 + lib/actions.c | 53 +- lib/logical-fields.c | 5 + lib/ovn-util.c | 24 +- lib/ovn-util.h | 6 + northd/northd.c | 98 +++- northd/northd.h | 6 +- ovn-nb.xml | 61 ++ tests/automake.mk | 16 +- tests/multinode-bgp-macros.at | 370 ++++++++++++ tests/multinode-testsuite.at | 1 + tests/multinode.at | 317 +++++----- tests/ovn-controller.at | 57 ++ tests/ovn-macros.at | 10 +- tests/ovn-northd.at | 59 ++ tests/ovn.at | 21 +- tests/system-common-macros.at | 16 + tests/system-dpdk-testsuite.at | 1 + tests/system-kmod-testsuite.at | 1 + tests/system-ovn-netlink.at | 257 ++++++++ tests/system-ovn.at | 233 ++++++++ tests/system-userspace-testsuite.at | 1 + tests/test-ovn.c | 1 + tests/test-utils.c | 36 ++ tests/test-utils.h | 10 +- utilities/ovn-trace.c | 6 + 57 files changed, 5534 insertions(+), 248 deletions(-) create mode 100644 controller/evpn-binding.c create mode 100644 controller/evpn-binding.h create mode 100644 controller/evpn-fdb.c create mode 100644 controller/evpn-fdb.h create mode 100644 controller/host-if-monitor-stub.c create mode 100644 controller/host-if-monitor.c create mode 100644 controller/host-if-monitor.h create mode 100644 controller/neighbor-exchange-netlink.c create mode 100644 controller/neighbor-exchange-netlink.h create mode 100644 controller/neighbor-exchange-stub.c create mode 100644 controller/neighbor-exchange.c create mode 100644 controller/neighbor-exchange.h create mode 100644 controller/neighbor-table-notify-stub.c create mode 100644 controller/neighbor-table-notify.c create mode 100644 controller/neighbor-table-notify.h create mode 100644 controller/neighbor.c create mode 100644 controller/neighbor.h create mode 100644 controller/test-ovn-netlink.c create mode 100644 tests/multinode-bgp-macros.at create mode 100644 tests/system-ovn-netlink.at Acked-by: Xavier Simonart