From patchwork Tue Jan 10 22:03:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladislav Odintsov X-Patchwork-Id: 1724357 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=FXOwNVRe; dkim-atps=neutral Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Ns4ZY3BRKz23fY for ; Wed, 11 Jan 2023 09:03:32 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id E3A8D40BA6; Tue, 10 Jan 2023 22:03:30 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org E3A8D40BA6 Authentication-Results: smtp2.osuosl.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=FXOwNVRe X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LBNEEUmlQ5MU; Tue, 10 Jan 2023 22:03:30 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTPS id 1EBE040B9F; Tue, 10 Jan 2023 22:03:29 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 1EBE040B9F Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id EDDF8C0033; Tue, 10 Jan 2023 22:03:28 +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 E07EAC002D for ; Tue, 10 Jan 2023 22:03:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id AEC72605D5 for ; Tue, 10 Jan 2023 22:03:27 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org AEC72605D5 Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=FXOwNVRe 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 0_kQm7UoP39x for ; Tue, 10 Jan 2023 22:03:26 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 6DC8A605BE Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by smtp3.osuosl.org (Postfix) with ESMTPS id 6DC8A605BE for ; Tue, 10 Jan 2023 22:03:26 +0000 (UTC) Received: by mail-lf1-x133.google.com with SMTP id f34so20592272lfv.10 for ; Tue, 10 Jan 2023 14:03:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=AViWufN50u2zM7K++8FDruQuXOxP9b+gO0otXPSDf8I=; b=FXOwNVReJj4szQAdPtawP1tIkNr1HPHtBvqP7p/hoLmOslrgt8yaFlpn7gWaS/9YQY Ul7ZnugWi7Q1p52XAwIhRdwvMBpXW4U+GK6rOwjYaLBVFGQzLMNAY0B1Jh+cUKKctxLP bzS+VgtAYDpcHF8/0ru2M5yRPBTQkJPJvbqMEqimJuJs7DNDXKSSD8VJDmQHjFeMOoao kQtoQGofZ6z4UUT+OYFPvYvetRXDyWA86GQqIdWxC2IDy6FYhgRJNGW3DirVMeki3u7G zAu5Kd1NPUBsIzPWUNNGSqUp8ROie2GGDzmGU5GA2ItdbV4CDTzzJzXUQqgpHla9nWJa wAQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AViWufN50u2zM7K++8FDruQuXOxP9b+gO0otXPSDf8I=; b=dPak2whw48WT0W9YC+9/Q/j6EU028oZ32Xu7yiT8vaRPzXIzSLYyLPkeRLJyUe4Ir3 mSVssTtP84b+Eek/P4txMf/B/zv/zHmZRQ+lbN9++6JcWNVtwMFUWo2lt8t0+7TT6Zkx aVSgk/Fz8ZsMzVDx1UlX8qQRI4tS+Ovj8Mo3akRG8C2n1PkyOpsgFeyIvkE4LN05xXTT iOKXTQfd7CFIIQ3GeL+1ZNSO/R8mva6qIEERiB6WJSLKJpxXiIsRaTuBv7hx3W/+1oQg poxntrTAd9HXJ/mg43N4CNwMBAkRQm1H6MKOBbB/AdkFTtOZMjbyHSnbQhpjTNJyP27N NRsA== X-Gm-Message-State: AFqh2krD5hedWCjttz7THslWoBYugUDMFv0hy/DtAkD4JI8QttDdoF10 w1stz6zdA7/yddG588KQ8GYeoDBcG2Q9lBDk X-Google-Smtp-Source: AMrXdXsWBbgbtNzUZxG7MtcYMvcTnHSlUffPK1NR66cPjSOl5sxR1dKkIntT/4xuWLYt0LKTyfB06g== X-Received: by 2002:a05:6512:3b20:b0:4b5:178f:a14c with SMTP id f32-20020a0565123b2000b004b5178fa14cmr23657805lfv.16.1673388204170; Tue, 10 Jan 2023 14:03:24 -0800 (PST) Received: from ip-10-70-112-12.vpc-1e810be1.internal (c2-178-216-98-9.elastic.cloud.croc.ru. [178.216.98.9]) by smtp.gmail.com with ESMTPSA id bj27-20020a2eaa9b000000b0027fd65e4faesm1445574ljb.108.2023.01.10.14.03.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jan 2023 14:03:23 -0800 (PST) From: Vladislav Odintsov To: dev@openvswitch.org Date: Wed, 11 Jan 2023 01:03:12 +0300 Message-Id: <20230110220313.3525167-1-odivlad@gmail.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Cc: Vladislav Odintsov , Dumitru Ceara Subject: [ovs-dev] [PATCH ovn branch-21.12 1/2] system-ovn: fix CoPP test failures 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" From: Lorenzo Bianconi Meter bucket configuration has been fixed in ovs commit 7d742b509dd7 ("openvswitch: meter: remove rate from the bucket size calculation"). Fix CoPP system test failures due to new ovs datapath behaviour. Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=2073060 Signed-off-by: Lorenzo Bianconi Acked-by: Dumitru Ceara Signed-off-by: Numan Siddique (cherry picked from commit e922c05dbb0c0ca70c98bd0b24833248ff5d458b) Signed-off-by: Vladislav Odintsov --- tests/system-ovn.at | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/system-ovn.at b/tests/system-ovn.at index bdd8790b0..c9c0f3948 100644 --- a/tests/system-ovn.at +++ b/tests/system-ovn.at @@ -6945,10 +6945,10 @@ p = IP(src="192.168.1.2", dst="192.168.1.1") / UDP(dport = 12345) / Raw(b"X"*64) send (p, iface='sw01', loop = 0, verbose = 0, count = 20) EOF -# 1pps + 1 burst size +# 1pps OVS_WAIT_UNTIL([ n_reject=$(grep unreachable reject.pcap | wc -l) - test "${n_reject}" = "2" + test "${n_reject}" = "1" ]) kill $(pidof tcpdump) rm -f reject.pcap @@ -6961,10 +6961,10 @@ p = IP(src="192.168.1.2", dst="192.168.1.1") / UDP(dport = 12345) / Raw(b"X"*64) send (p, iface='sw01', loop = 0, verbose = 0, count = 100) EOF -# 10pps + 1 burst size +# 10pps OVS_WAIT_UNTIL([ n_reject=$(grep unreachable reject.pcap | wc -l) - test "${n_reject}" = "20" + test "${n_reject}" = "10" ]) kill $(pidof tcpdump) @@ -6996,10 +6996,10 @@ p = IP(src="192.168.1.2", dst="172.16.1.100") / TCP(dport = 80, flags="S") / Raw send (p, iface='sw01', loop = 0, verbose = 0, count = 100) EOF -# 1pps + 1 burst size +# 1pps OVS_WAIT_UNTIL([ n_arp=$(grep ARP arp.pcap | wc -l) - test "${n_arp}" = "2" + test "${n_arp}" = "1" ]) kill $(pidof tcpdump) @@ -7015,10 +7015,10 @@ p = IP(src="192.168.1.2", dst="172.16.1.100", ttl=1) / TCP(dport = 8080, flags=" send (p, iface='sw01', loop = 0, verbose = 0, count = 100) EOF -# 1pps + 1 burst size +# 1pps OVS_WAIT_UNTIL([ n_icmp=$(grep ICMP icmp.pcap | wc -l) - test "${n_icmp}" = "2" + test "${n_icmp}" = "1" ]) kill $(pidof tcpdump) @@ -7030,7 +7030,7 @@ bfd: bfd-meter check ovn-nbctl --bfd lr-route-add R1 240.0.0.0/8 172.16.1.50 rp-public printf "%08x" $(ovn-sbctl get bfd . disc) > /tmp/disc -NS_EXEC([server], [tcpdump -l -n -i s1 udp port 3784 -Q in > bfd.pcap &]) +NS_EXEC([server], [tcpdump -l -nn -i s1 udp port 3784 and ip[[29]]==0x90 -Q in > bfd.pcap &]) ip netns exec server scapy -H <<-EOF import binascii f = open("/tmp/disc", "r") @@ -7043,10 +7043,10 @@ f.close() EOF rm /tmp/disc -# 1pps + 1 burst size +# 1pps OVS_WAIT_UNTIL([ - n_tcp_rst=$(grep Final bfd.pcap | wc -l) - test "${n_tcp_rst}" = "2" + n_bfd=$(grep 3784 bfd.pcap | wc -l) + test "${n_bfd}" = "1" ]) kill $(pidof tcpdump) From patchwork Tue Jan 10 22:03:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladislav Odintsov X-Patchwork-Id: 1724358 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=hKWSM62d; dkim-atps=neutral Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Ns4Zc3r0tz23gL for ; Wed, 11 Jan 2023 09:03:36 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 0D3D140BB6; Tue, 10 Jan 2023 22:03:34 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 0D3D140BB6 Authentication-Results: smtp2.osuosl.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=hKWSM62d X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LhDp3LPDC9hC; Tue, 10 Jan 2023 22:03:33 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTPS id 2B32340BAA; Tue, 10 Jan 2023 22:03:32 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 2B32340BAA Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id E6A8CC0070; Tue, 10 Jan 2023 22:03:31 +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 65B3CC007D for ; Tue, 10 Jan 2023 22:03:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 41FC380AE3 for ; Tue, 10 Jan 2023 22:03:29 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 41FC380AE3 Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=hKWSM62d X-Virus-Scanned: amavisd-new at osuosl.org 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 1v5sJ5gZuKCM for ; Tue, 10 Jan 2023 22:03:28 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 28EFF81401 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by smtp1.osuosl.org (Postfix) with ESMTPS id 28EFF81401 for ; Tue, 10 Jan 2023 22:03:28 +0000 (UTC) Received: by mail-lj1-x22d.google.com with SMTP id s25so14077382lji.2 for ; Tue, 10 Jan 2023 14:03:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zdnm4qvz0eCYuVNugwFRpROW9Bswa3nM2RlEs+VYm+A=; b=hKWSM62dQ2wo6T4m48mbJFb5SqarKA2iyv4NTBVd7f15wbHb51R84DSXzq4U8PgMxd PHq3JytO4K/vJQYmuO1FzyRqcXSemcU2p0ht/knir29rWR+Dbe2nO0o4LomK9Gm4PbW6 yLoKMn4nn5JCaVCC3ZEhubG/uidoRFOOnxn/LNRsj8gNQ8sWWkUsTcpEyPFAO9t2o5nE 0KBrhB+3AVVGkEjWfA33T2y+fnsSjS5A6vGuZCDkinosvHH01HGQcpqUyZLxhxKNi1Jd ASEBPwlcwGMJk/dZ0IJTX/+KAZhmcLsGpJCwVIUJhas52tCh4MYA6nZVLxuPYn4J2Fzf cnPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zdnm4qvz0eCYuVNugwFRpROW9Bswa3nM2RlEs+VYm+A=; b=A2WGnEPSSIvCwjR+A2HNf2iJ3BmFnKYbl6qtRqb6gDx/Ovt+jYo6HYe2FvlLYYu686 WGjXj1X+ke9QR0Pa/yYW03l75ONhU6HLqSwdZjkRwrKjHPwY6c4GGhaYf968azFLCkQa 75OsJOOaQmf+jPakyerpdLfQVybLzJ3E5I79Bd6M0BVsrIoSITzhfXKaFcm/8GZWYrpJ DGubQ6e6Am2FThnLW4XJ3z6FdMQLKjwo43uTZ0o6UkZadlpHW+o7JnMfLCQ35y2BPWFo eBIfkpz6rfSYwZgNFspNopWLiJa7O10BJOEUZWXJrHS1a2Yw3wr+oaNPB/whI1o467VK Hblg== X-Gm-Message-State: AFqh2kp2UD3xqdHkI+OrGSRcP/HKvSq97+E5d/I7MfCna4HX0FhQqWQJ 5mB9iN+00mg9PYZa42KXuY42ubmTri1HIT/f X-Google-Smtp-Source: AMrXdXtlmhAFXuIITeVpsg3I8QV5C0kxVjySpTNka2s+ggeDCcxNTV19XwA+zE6tS0n9THGHGsEIbg== X-Received: by 2002:a2e:b5a2:0:b0:285:e6ef:bc12 with SMTP id f2-20020a2eb5a2000000b00285e6efbc12mr2104291ljn.39.1673388205782; Tue, 10 Jan 2023 14:03:25 -0800 (PST) Received: from ip-10-70-112-12.vpc-1e810be1.internal (c2-178-216-98-9.elastic.cloud.croc.ru. [178.216.98.9]) by smtp.gmail.com with ESMTPSA id bj27-20020a2eaa9b000000b0027fd65e4faesm1445574ljb.108.2023.01.10.14.03.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jan 2023 14:03:25 -0800 (PST) From: Vladislav Odintsov To: dev@openvswitch.org Date: Wed, 11 Jan 2023 01:03:13 +0300 Message-Id: <20230110220313.3525167-2-odivlad@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20230110220313.3525167-1-odivlad@gmail.com> References: <20230110220313.3525167-1-odivlad@gmail.com> MIME-Version: 1.0 Cc: Vladislav Odintsov , Dumitru Ceara Subject: [ovs-dev] [PATCH ovn branch-21.12 2/2] ovn-ic: Only monitor useful tables and columns. 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" From: Dumitru Ceara Signed-off-by: Dumitru Ceara Signed-off-by: Mark Michelson Acked-by: Mark Michelson (cherry picked from commit 2698e7811b41b00ac3b6544430a95be9ae700e23) Signed-off-by: Vladislav Odintsov --- ic/ovn-ic.c | 110 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 105 insertions(+), 5 deletions(-) diff --git a/ic/ovn-ic.c b/ic/ovn-ic.c index a9b797af2..f63a83a44 100644 --- a/ic/ovn-ic.c +++ b/ic/ovn-ic.c @@ -1865,13 +1865,113 @@ main(int argc, char *argv[]) struct ovsdb_idl_loop ovnisb_idl_loop = OVSDB_IDL_LOOP_INITIALIZER( ovsdb_idl_create(ovn_ic_sb_db, &icsbrec_idl_class, true, true)); - /* ovn-nb db. XXX: add only needed tables and columns */ + /* ovn-nb db. */ struct ovsdb_idl_loop ovnnb_idl_loop = OVSDB_IDL_LOOP_INITIALIZER( - ovsdb_idl_create(ovnnb_db, &nbrec_idl_class, true, true)); - - /* ovn-sb db. XXX: add only needed tables and columns */ + ovsdb_idl_create(ovnnb_db, &nbrec_idl_class, false, true)); + + ovsdb_idl_add_table(ovnnb_idl_loop.idl, &nbrec_table_nb_global); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, &nbrec_nb_global_col_name); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, &nbrec_nb_global_col_options); + + ovsdb_idl_add_table(ovnnb_idl_loop.idl, + &nbrec_table_logical_router_static_route); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_router_static_route_col_route_table); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_router_static_route_col_ip_prefix); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_router_static_route_col_nexthop); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_router_static_route_col_external_ids); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_router_static_route_col_options); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_router_static_route_col_policy); + + ovsdb_idl_add_table(ovnnb_idl_loop.idl, &nbrec_table_logical_router); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_router_col_name); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_router_col_static_routes); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_router_col_ports); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_router_col_options); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_router_col_external_ids); + + ovsdb_idl_add_table(ovnnb_idl_loop.idl, &nbrec_table_logical_router_port); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_router_port_col_name); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_router_port_col_networks); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_router_port_col_external_ids); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_router_port_col_options); + + ovsdb_idl_add_table(ovnnb_idl_loop.idl, &nbrec_table_logical_switch); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_switch_col_name); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_switch_col_ports); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_switch_col_other_config); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_switch_col_external_ids); + + ovsdb_idl_add_table(ovnnb_idl_loop.idl, &nbrec_table_logical_switch_port); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_switch_port_col_name); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_switch_port_col_addresses); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_switch_port_col_options); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_switch_port_col_type); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_switch_port_col_up); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_switch_port_col_addresses); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_switch_port_col_enabled); + ovsdb_idl_add_column(ovnnb_idl_loop.idl, + &nbrec_logical_switch_port_col_external_ids); + + /* ovn-sb db. */ struct ovsdb_idl_loop ovnsb_idl_loop = OVSDB_IDL_LOOP_INITIALIZER( - ovsdb_idl_create(ovnsb_db, &sbrec_idl_class, true, true)); + ovsdb_idl_create(ovnsb_db, &sbrec_idl_class, false, true)); + + ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_chassis); + ovsdb_idl_add_column(ovnsb_idl_loop.idl, &sbrec_chassis_col_encaps); + ovsdb_idl_add_column(ovnsb_idl_loop.idl, &sbrec_chassis_col_external_ids); + ovsdb_idl_add_column(ovnsb_idl_loop.idl, &sbrec_chassis_col_name); + ovsdb_idl_add_column(ovnsb_idl_loop.idl, &sbrec_chassis_col_hostname); + ovsdb_idl_add_column(ovnsb_idl_loop.idl, &sbrec_chassis_col_other_config); + + ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_encap); + ovsdb_idl_add_column(ovnsb_idl_loop.idl, &sbrec_encap_col_chassis_name); + ovsdb_idl_add_column(ovnsb_idl_loop.idl, &sbrec_encap_col_type); + ovsdb_idl_add_column(ovnsb_idl_loop.idl, &sbrec_encap_col_ip); + ovsdb_idl_add_column(ovnsb_idl_loop.idl, &sbrec_encap_col_options); + + ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_datapath_binding); + ovsdb_idl_add_column(ovnsb_idl_loop.idl, + &sbrec_datapath_binding_col_external_ids); + + ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_port_binding); + ovsdb_idl_add_column(ovnsb_idl_loop.idl, + &sbrec_port_binding_col_datapath); + ovsdb_idl_add_column(ovnsb_idl_loop.idl, + &sbrec_port_binding_col_mac); + ovsdb_idl_add_column(ovnsb_idl_loop.idl, + &sbrec_port_binding_col_options); + ovsdb_idl_add_column(ovnsb_idl_loop.idl, + &sbrec_port_binding_col_logical_port); + ovsdb_idl_add_column(ovnsb_idl_loop.idl, + &sbrec_port_binding_col_external_ids); + ovsdb_idl_add_column(ovnsb_idl_loop.idl, + &sbrec_port_binding_col_chassis); /* Create IDL indexes */ struct ovsdb_idl_index *nbrec_ls_by_name