From patchwork Wed Apr 6 14:10:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Adri=C3=A1n_Moreno?= X-Patchwork-Id: 1613967 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=bLYv1Tls; dkim-atps=neutral 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4KYRJ82tB4z9sFq for ; Thu, 7 Apr 2022 00:11:02 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id E1BA160EB2; Wed, 6 Apr 2022 14:11:00 +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 Q-Wx59Us3L5A; Wed, 6 Apr 2022 14:11:00 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp3.osuosl.org (Postfix) with ESMTPS id 0AF4260B17; Wed, 6 Apr 2022 14:10:58 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id B63A3C002C; Wed, 6 Apr 2022 14:10:58 +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 129D7C0012 for ; Wed, 6 Apr 2022 14:10:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id E7A81832C2 for ; Wed, 6 Apr 2022 14:10:56 +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 Es3Gi7XKdINJ for ; Wed, 6 Apr 2022 14:10:56 +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 34B3F83104 for ; Wed, 6 Apr 2022 14:10:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649254255; 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=ExJPriCRTNTxx8VbvnskmOlB5sdk/E6SJesUECn8Iu8=; b=bLYv1TlsR6SShrdR4J7eqPCi8PAVJQkOdWmkQjG2bI1xI2BEaLPlLkqeah3+nJFOPH+RGs XhU0YWX6psgHweH6DAOLC9pW8XEaTb2QOsQ/Ss3AXuVDt1XaAOIH4ta1a+FCYAiUSgtvSS 5slCTUs4Ck5i3BZHTuZFFVOh3OI9gT4= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-606-UabUJlT5Mum2unv4JXZgpw-1; Wed, 06 Apr 2022 10:10:54 -0400 X-MC-Unique: UabUJlT5Mum2unv4JXZgpw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D195D3820556 for ; Wed, 6 Apr 2022 14:10:53 +0000 (UTC) Received: from amorenoz.users.ipa.redhat.com (unknown [10.39.193.152]) by smtp.corp.redhat.com (Postfix) with ESMTP id EAB36515A42; Wed, 6 Apr 2022 14:10:52 +0000 (UTC) From: Adrian Moreno To: dev@openvswitch.org Date: Wed, 6 Apr 2022 16:10:38 +0200 Message-Id: <20220406141041.2336574-1-amorenoz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=amorenoz@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: dceara@redhat.com Subject: [ovs-dev] [PATCH ovn 0/3] Use newest OVS version to fix Undefined Behavior 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" A series has been recently introduced in OVS that has two main benefits: - Undefined Behavior in iterator loops is removed. This enforces some restrictions on how this macros can be used, namely: * User-provided iterator variable is set to NULL after the loop ends normally * In _SAFE version of the loop, it's not always safe to use the 'next' variable. When it would point to the list's head, it is instead set to NULL by the iteration macros. - _SAFE version of the iterator macros now do not require the user to provide a 'next' variable leading to cleaner and less error prone code. This series bumps ovs to the latest HEAD in master branch and adapts the code accordingly. Adrian Moreno (3): treewide: bump ovs and fix problematic loops parallel-hmap: rewrite iterator using multivar helpers treewide: remove next variable in _SAFE loops controller-vtep/binding.c | 4 +- controller-vtep/gateway.c | 4 +- controller-vtep/vtep.c | 4 +- controller/binding.c | 21 +++--- controller/encaps.c | 4 +- controller/if-status.c | 17 ++--- controller/lflow-cache.c | 3 +- controller/lflow-conj-ids.c | 18 +++-- controller/lflow.c | 36 +++++----- controller/ofctrl-seqno.c | 4 +- controller/ofctrl.c | 84 +++++++++++----------- controller/ovn-controller.c | 20 +++--- controller/patch.c | 4 +- controller/physical.c | 4 +- controller/pinctrl.c | 69 +++++++++--------- controller/vif-plug.c | 8 +-- ic/ovn-ic.c | 12 ++-- lib/actions.c | 2 +- lib/expr.c | 51 +++++++------ lib/extend-table.c | 20 +++--- lib/extend-table.h | 4 +- lib/ovn-parallel-hmap.h | 10 +-- lib/ovn-util.c | 2 +- lib/vif-plug-provider.c | 8 +-- northd/northd.c | 139 +++++++++++++++++------------------- northd/ovn-northd-ddlog.c | 4 +- northd/ovn-northd.c | 16 ++--- ovs | 2 +- utilities/ovn-ic-nbctl.c | 4 +- utilities/ovn-ic-sbctl.c | 4 +- utilities/ovn-nbctl.c | 14 ++-- utilities/ovn-sbctl.c | 4 +- utilities/ovn-trace.c | 12 ++-- 33 files changed, 299 insertions(+), 313 deletions(-)