From patchwork Mon Aug 26 14:14:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 1976853 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=dYmuFHIT; 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 4Wst4B0qHpz1yZd for ; Tue, 27 Aug 2024 00:15:20 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 221B080CF1; Mon, 26 Aug 2024 14:15:17 +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 QLdBQBf5XKa4; Mon, 26 Aug 2024 14:15:15 +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 F131080BBA 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=dYmuFHIT Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id F131080BBA; Mon, 26 Aug 2024 14:15:14 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 9790CC07E7; Mon, 26 Aug 2024 14:15:14 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id BFA40C07E6 for ; Mon, 26 Aug 2024 14:15:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 9262B40139 for ; Mon, 26 Aug 2024 14:15:12 +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 qc0-hnU_BMtt for ; Mon, 26 Aug 2024 14:15:11 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.133.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=lorenzo.bianconi@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 093BF40347 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 093BF40347 Authentication-Results: smtp2.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=dYmuFHIT Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id 093BF40347 for ; Mon, 26 Aug 2024 14:15:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724681709; 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: in-reply-to:in-reply-to:references:references; bh=xF3VUIzvP2pQuMDzQkQTZlXkAbS7h6nY9GbGB8HkJkQ=; b=dYmuFHITyB4UBOPTiUNmK6vfFFHXfJA5Pmaqzgbj8D8bKYRsWBGyDUDjQKhsX+twS1jgKI e795TWB9Kfp0Dav1Yqz3xGgCqUDIPE1bVI35eTeRLzIaceSHHdfRjMlBxbQZLWmXIw/BgE OAULthhz2tknu6fGbwKXEcGXoTdX2KQ= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-558-2MfgKnuDO3yq5Zz6IdOwoA-1; Mon, 26 Aug 2024 10:15:08 -0400 X-MC-Unique: 2MfgKnuDO3yq5Zz6IdOwoA-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-3718bf7d54aso2893449f8f.1 for ; Mon, 26 Aug 2024 07:15:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724681707; x=1725286507; 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=5lp516fP6924xQyK4aS1IhIh/X4oh952GicTscQ1R3A=; b=v++eGTGkGfTmhh7NJmwf1ONg8XrOJzQ2KlpurNQ3qKonjCo79rGcEnif11240J88lZ Tc0ZiNaoV6VkgI1SozQh/jUTa4AXred1Qade2JU2c4oCerH7bg1+ak0oKqGzdR++LMp/ 6gwAS8TXxFHxUYtRx9iMFqsaKhcpP876eRdNZMC+mIda4VyGHXHa/LJLziXc2mAG8dv+ OU9TdokHKZU/AMH4gsBxfGjwWRiE7BzBLqC4Yy7XYye1OhqzIbu/MwBJq2YXtQsamhwM 08k6DpSs8lfEXmuRp45ZbQiBYXDhhY1R6kmbflTBsxGAFeBIlVSK7QSIlD09rpLeIH6N +Kvw== X-Gm-Message-State: AOJu0YxPrHKHZQHYldN7ic4KuAyw8fwK08yxwzXywBXG01IkMQMvZR2W fpPSbVWVtWezmm4/1oStdlh0A9lBKtKbvNx97S+WPIzZ8nihUQ6hcwyAGHf1zdteYBXNcm9hvwF xA2wUtmamd8HbdA3qKk/E41jwe1s3Ly7lMW3H2342wTW918b02ojGRWNdJtmJzLJZOLHRd1qB9r Wwfev7pV1h5/BvYnUKcaXNuOXE1xRKiDw2dDLsCPegG+8tbkvHAA== X-Received: by 2002:adf:a407:0:b0:368:74a8:6c34 with SMTP id ffacd0b85a97d-373118651b4mr6817926f8f.36.1724681706596; Mon, 26 Aug 2024 07:15:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGPZ22x1tJP7+QyyGQa7IkasI1L4+YCowNqSGkYUZliiedR3iJQ8CSof2e4JDVLTaSKXZNhRQ== X-Received: by 2002:adf:a407:0:b0:368:74a8:6c34 with SMTP id ffacd0b85a97d-373118651b4mr6817891f8f.36.1724681705863; Mon, 26 Aug 2024 07:15:05 -0700 (PDT) Received: from localhost (net-188-216-76-117.cust.vodafonedsl.it. [188.216.76.117]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3730826ecf9sm10824241f8f.117.2024.08.26.07.15.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2024 07:15:05 -0700 (PDT) From: Lorenzo Bianconi To: ovs-dev@openvswitch.org Date: Mon, 26 Aug 2024 16:14:49 +0200 Message-ID: <268e17461dbb73f96e02105e356a4212ab6afcb9.1724680233.git.lorenzo.bianconi@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH v3 ovn 1/3] Revert "ofctrl: Introduce ecmp_nexthop_monitor.". 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: , Cc: dceara@redhat.com Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" This reverts commit 090ca4ecaa9200850ae37c1c126a6ff85651d3f0. Revert current implementation of ECMP_Nexthop monitor feature since it can trigger over-flush of CT entries committed by incoming traffic. In particular, at the moment there is no way to link the next-hop IP address (so the ct-entry ID) to the incoming traffic identified by the ethernet source mac address and so to the ct_lablel committed by the following logical flow: table=10(lr_in_ecmp_stateful), priority=100 , match=(inport == "R1_ext" && ip4.dst == 10.0.0.0/24 && (ct.new || ct.est)), action=(ct_commit { ct_label.ecmp_reply_eth = eth.src; ct_mark.ecmp_reply_port = 2; ct_label.label = 1; }; next;) Remove the feature while working on an improved approach. Reported-at: https://issues.redhat.com/browse/FDP-750 Signed-off-by: Lorenzo Bianconi --- controller/ofctrl.c | 54 ------------------------------------- controller/ofctrl.h | 2 -- controller/ovn-controller.c | 2 -- tests/system-ovn.at | 8 ------ 4 files changed, 66 deletions(-) diff --git a/controller/ofctrl.c b/controller/ofctrl.c index e023cab9b..f9387d375 100644 --- a/controller/ofctrl.c +++ b/controller/ofctrl.c @@ -45,7 +45,6 @@ #include "ovn/actions.h" #include "lib/extend-table.h" #include "lib/lb.h" -#include "lib/ovn-util.h" #include "openvswitch/poll-loop.h" #include "physical.h" #include "openvswitch/rconn.h" @@ -390,16 +389,9 @@ struct meter_band_entry { static struct shash meter_bands; -static unsigned long *ecmp_nexthop_ids; - static void ofctrl_meter_bands_destroy(void); static void ofctrl_meter_bands_clear(void); -static void ecmp_nexthop_monitor_run( - const struct sbrec_ecmp_nexthop_table *enh_table, - struct ovs_list *msgs); - - /* MFF_* field ID for our Geneve option. In S_TLV_TABLE_MOD_SENT, this is * the option we requested (we don't know whether we obtained it yet). In * S_CLEAR_FLOWS or S_UPDATE_FLOWS, this is really the option we have. */ @@ -438,7 +430,6 @@ ofctrl_init(struct ovn_extend_table *group_table, groups = group_table; meters = meter_table; shash_init(&meter_bands); - ecmp_nexthop_ids = bitmap_allocate(ECMP_NEXTHOP_IDS_LEN); } /* S_NEW, for a new connection. @@ -886,7 +877,6 @@ ofctrl_destroy(void) expr_symtab_destroy(&symtab); shash_destroy(&symtab); ofctrl_meter_bands_destroy(); - bitmap_free(ecmp_nexthop_ids); } uint64_t @@ -2316,47 +2306,6 @@ add_meter(struct ovn_extend_table_info *m_desired, ofctrl_meter_bands_alloc(sb_meter, m_desired, msgs); } -static void -ecmp_nexthop_monitor_flush_ct_entry(uint64_t id, struct ovs_list *msgs) -{ - ovs_u128 mask = { - /* ct_labels.label BITS[96-127] */ - .u64.hi = 0xffffffff00000000, - }; - ovs_u128 nexthop = { - .u64.hi = id << 32, - }; - struct ofp_ct_match match = { - .labels = nexthop, - .labels_mask = mask, - }; - struct ofpbuf *msg = ofp_ct_match_encode(&match, NULL, - rconn_get_version(swconn)); - ovs_list_push_back(msgs, &msg->list_node); -} - -static void -ecmp_nexthop_monitor_run(const struct sbrec_ecmp_nexthop_table *enh_table, - struct ovs_list *msgs) -{ - unsigned long *ids = bitmap_allocate(ECMP_NEXTHOP_IDS_LEN); - - const struct sbrec_ecmp_nexthop *sbrec_ecmp_nexthop; - SBREC_ECMP_NEXTHOP_TABLE_FOR_EACH (sbrec_ecmp_nexthop, enh_table) { - bitmap_set1(ids, sbrec_ecmp_nexthop->id); - } - - int id; - BITMAP_FOR_EACH_1 (id, ECMP_NEXTHOP_IDS_LEN, ecmp_nexthop_ids) { - if (!bitmap_is_set(ids, id)) { - ecmp_nexthop_monitor_flush_ct_entry(id, msgs); - } - } - - bitmap_free(ecmp_nexthop_ids); - ecmp_nexthop_ids = ids; -} - static void installed_flow_add(struct ovn_flow *d, struct ofputil_bundle_ctrl_msg *bc, @@ -2715,7 +2664,6 @@ ofctrl_put(struct ovn_desired_flow_table *lflow_table, struct shash *pending_ct_zones, struct hmap *pending_lb_tuples, struct ovsdb_idl_index *sbrec_meter_by_name, - const struct sbrec_ecmp_nexthop_table *enh_table, uint64_t req_cfg, bool lflows_changed, bool pflows_changed) @@ -2756,8 +2704,6 @@ ofctrl_put(struct ovn_desired_flow_table *lflow_table, /* OpenFlow messages to send to the switch to bring it up-to-date. */ struct ovs_list msgs = OVS_LIST_INITIALIZER(&msgs); - ecmp_nexthop_monitor_run(enh_table, &msgs); - /* Iterate through ct zones that need to be flushed. */ struct shash_node *iter; SHASH_FOR_EACH(iter, pending_ct_zones) { diff --git a/controller/ofctrl.h b/controller/ofctrl.h index 33953a8a4..129e3b6ad 100644 --- a/controller/ofctrl.h +++ b/controller/ofctrl.h @@ -31,7 +31,6 @@ struct ofpbuf; struct ovsrec_bridge; struct ovsrec_open_vswitch_table; struct sbrec_meter_table; -struct sbrec_ecmp_nexthop_table; struct shash; struct ovn_desired_flow_table { @@ -60,7 +59,6 @@ void ofctrl_put(struct ovn_desired_flow_table *lflow_table, struct shash *pending_ct_zones, struct hmap *pending_lb_tuples, struct ovsdb_idl_index *sbrec_meter_by_name, - const struct sbrec_ecmp_nexthop_table *enh_table, uint64_t nb_cfg, bool lflow_changed, bool pflow_changed); diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c index 854d80bdf..c48667887 100644 --- a/controller/ovn-controller.c +++ b/controller/ovn-controller.c @@ -5722,8 +5722,6 @@ main(int argc, char *argv[]) &ct_zones_data->ctx.pending, &lb_data->removed_tuples, sbrec_meter_by_name, - sbrec_ecmp_nexthop_table_get( - ovnsb_idl_loop.idl), ofctrl_seqno_get_req_cfg(), engine_node_changed(&en_lflow_output), engine_node_changed(&en_pflow_output)); diff --git a/tests/system-ovn.at b/tests/system-ovn.at index 6e4ec4247..c2e35a74c 100644 --- a/tests/system-ovn.at +++ b/tests/system-ovn.at @@ -6248,10 +6248,6 @@ sed -e 's/labels=0x[[0-9]]/labels=0x?/' | sort], [0], [dnl tcp,orig=(src=172.16.0.1,dst=10.0.0.2,sport=,dport=),reply=(src=10.0.0.2,dst=172.16.0.1,sport=,dport=),zone=,mark=,labels=0x?000000000401020500000000,protoinfo=(state=) ]) -# Flush connection tracking entries -ovn-nbctl --wait=hv lr-route-del R1 -AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(172.16.0.1)]) - OVS_APP_EXIT_AND_WAIT([ovn-controller]) as ovn-sb @@ -6474,10 +6470,6 @@ sed -e 's/labels=0x[[0-9]]/labels=0x?/' | sort], [0], [dnl tcp,orig=(src=fd07::1,dst=fd01::2,sport=,dport=),reply=(src=fd01::2,dst=fd07::1,sport=,dport=),zone=,mark=,labels=0x?000000001001020400000000,protoinfo=(state=) ]) -# Flush connection tracking entries -check ovn-nbctl --wait=hv lr-route-del R1 -AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(fd01::2)]) - OVS_APP_EXIT_AND_WAIT([ovn-controller]) as ovn-sb From patchwork Mon Aug 26 14:14:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 1976856 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=EcoM+5od; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (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 4Wst4F14Zvz1yfF for ; Tue, 27 Aug 2024 00:15:24 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 88B1660719; Mon, 26 Aug 2024 14:15:22 +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 xYBBuThMGc9W; Mon, 26 Aug 2024 14:15:19 +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 smtp3.osuosl.org 0920D60779 Authentication-Results: smtp3.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=EcoM+5od Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp3.osuosl.org (Postfix) with ESMTPS id 0920D60779; Mon, 26 Aug 2024 14:15:19 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id BD89AC07E9; Mon, 26 Aug 2024 14:15:18 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 9B421C07E7 for ; Mon, 26 Aug 2024 14:15:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 970E440576 for ; Mon, 26 Aug 2024 14:15:15 +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 pzuhc5PSWj49 for ; Mon, 26 Aug 2024 14:15:13 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=lorenzo.bianconi@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 34A2940347 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 34A2940347 Authentication-Results: smtp2.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=EcoM+5od 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 34A2940347 for ; Mon, 26 Aug 2024 14:15:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724681712; 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: in-reply-to:in-reply-to:references:references; bh=RUTS0d2mRakUvBLfT+BwaxZoNKAF1VO6fD6vkINj5F8=; b=EcoM+5odFRPSus9U29Xf6ZwbcCZ4FJ6c2214mTUsgnGO76cp+aCPO3SAbtATzkbbx2Fnyu igHXuzx7yqwHE9PmsRR+m9UU5FP58FHLHxCEvLZOVbZVdB6gYv7IXoVfVQq+xFTS8D6tSm /+c9pcPozAdu50pHc268PwSMMMCK2G0= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-341-tMjvUX3xOheluByPgG2yoA-1; Mon, 26 Aug 2024 10:15:09 -0400 X-MC-Unique: tMjvUX3xOheluByPgG2yoA-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-42aa70df35eso49296835e9.2 for ; Mon, 26 Aug 2024 07:15:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724681708; x=1725286508; 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=RUTS0d2mRakUvBLfT+BwaxZoNKAF1VO6fD6vkINj5F8=; b=gtysMOLVD3U77BYrr2BwmM7FC2vLhBtF8r6RFO78XjDl3BDmAJ2mz83U135o+kZt5N 497QVRty+jQotherdAGD1wuXsSle5pX/dRr6PT3zRGvSGFA8XFXoAQXqMrQ+IKHsMo85 j0ZuqgHHXFb3XULmjmVj99jCKcHbw4/ml5tnVlO6UtxIIp2wQ4bWaK+yRsrmgpk5KHPn /AHpfi0f5KNy+LgCid5vjt6MSVYKNftFXDyC49+VQFwDZ85XPfCRywHCMwAZ28v1DFY3 HPro5RXq6mmoC61rRPDYUMEfOjkn+ZUXShKQFvgG2SO08uLNAqm1TLvw1TWLobo3ufcR Pdgw== X-Gm-Message-State: AOJu0Yx1JnXMhoIaTOdh9ZVLM4FBcOKwhP0QRJgiHerxPnilz7Z5xRJk qR3eAK77/SbtbhpXU0y3wB/rfnHwI+Bp15ZC5F1xOQkDH+qA/HVuk+R9WXDopDmns60Xv6r9nY3 gataAX+A7I2aoFViX9UG2dlFbZ+C9c0+ShW+AwH19CZEYj6JktnC0UmLuHd7aHcY8sNENDpWQKQ 8zfVQLmjBUZlbopXekqmUrMoX0iLIJfXE5161ahfbgceadOG+D0g== X-Received: by 2002:a05:600c:181b:b0:42a:a6b8:f09f with SMTP id 5b1f17b1804b1-42acd5dccd8mr85843305e9.23.1724681707647; Mon, 26 Aug 2024 07:15:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFWR0Wu7K67rPQeglFqpM8oxwtyofj2vFLXq6f1XUbgwM3aGcxoVn/TVKILLcuVAqavzBcjkQ== X-Received: by 2002:a05:600c:181b:b0:42a:a6b8:f09f with SMTP id 5b1f17b1804b1-42acd5dccd8mr85842955e9.23.1724681707040; Mon, 26 Aug 2024 07:15:07 -0700 (PDT) Received: from localhost (net-188-216-76-117.cust.vodafonedsl.it. [188.216.76.117]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42abefc61dbsm191369525e9.33.2024.08.26.07.15.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2024 07:15:06 -0700 (PDT) From: Lorenzo Bianconi To: ovs-dev@openvswitch.org Date: Mon, 26 Aug 2024 16:14:50 +0200 Message-ID: <495ece570262c32dfac3cade1d8fbf7f9e1fbff2.1724680233.git.lorenzo.bianconi@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH v3 ovn 2/3] Revert "northd: Add nexhop id in ct_label.label.". 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: , Cc: dceara@redhat.com Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" This reverts commit 0158825b2ad575456a0f94775646250099f92463. Revert current implementation of ECMP_Nexthop monitor feature since it can trigger over-flush of CT entries committed by incoming traffic. In particular, at the moment there is no way to link the next-hop IP address (so the ct-entry ID) to the incoming traffic identified by the ethernet source mac address and so to the ct_lablel committed by the following logical flow: table=10(lr_in_ecmp_stateful), priority=100 , match=(inport == "R1_ext" && ip4.dst == 10.0.0.0/24 && (ct.new || ct.est)), action=(ct_commit { ct_label.ecmp_reply_eth = eth.src; ct_mark.ecmp_reply_port = 2; ct_label.label = 1; }; next;) Remove the feature while working on an improved approach. Reported-at: https://issues.redhat.com/browse/FDP-750 Signed-off-by: Lorenzo Bianconi --- northd/en-lflow.c | 3 -- northd/inc-proc-northd.c | 1 - northd/northd.c | 35 ++++++-------------- northd/northd.h | 1 - tests/ovn.at | 4 +-- tests/system-ovn.at | 71 ++++++++++++++++------------------------ 6 files changed, 41 insertions(+), 74 deletions(-) diff --git a/northd/en-lflow.c b/northd/en-lflow.c index 08e5bd0a1..469d7c6b5 100644 --- a/northd/en-lflow.c +++ b/northd/en-lflow.c @@ -56,8 +56,6 @@ lflow_get_input_data(struct engine_node *node, engine_get_input_data("lr_stateful", node); struct ed_type_ls_stateful *ls_stateful_data = engine_get_input_data("ls_stateful", node); - struct ecmp_nexthop_data *nexthop_data = - engine_get_input_data("ecmp_nexthop", node); lflow_input->sbrec_logical_flow_table = EN_OVSDB_GET(engine_get_input("SB_logical_flow", node)); @@ -87,7 +85,6 @@ lflow_get_input_data(struct engine_node *node, lflow_input->parsed_routes = &static_routes_data->parsed_routes; lflow_input->route_tables = &static_routes_data->route_tables; lflow_input->route_policies = &route_policies_data->route_policies; - lflow_input->nexthops_table = &nexthop_data->nexthops; struct ed_type_global_config *global_config = engine_get_input_data("global_config", node); diff --git a/northd/inc-proc-northd.c b/northd/inc-proc-northd.c index cb880b439..06c7ee2b8 100644 --- a/northd/inc-proc-northd.c +++ b/northd/inc-proc-northd.c @@ -282,7 +282,6 @@ void inc_proc_northd_init(struct ovsdb_idl_loop *nb, engine_add_input(&en_lflow, &en_bfd_sync, NULL); engine_add_input(&en_lflow, &en_route_policies, NULL); engine_add_input(&en_lflow, &en_static_routes, NULL); - engine_add_input(&en_lflow, &en_ecmp_nexthop, NULL); engine_add_input(&en_lflow, &en_global_config, node_global_config_handler); diff --git a/northd/northd.c b/northd/northd.c index ed959535b..b92c09ca7 100644 --- a/northd/northd.c +++ b/northd/northd.c @@ -11512,8 +11512,7 @@ add_ecmp_symmetric_reply_flows(struct lflow_table *lflows, struct ovn_port *out_port, const struct parsed_route *route, struct ds *route_match, - struct lflow_ref *lflow_ref, - struct simap *nexthops_table) + struct lflow_ref *lflow_ref) { const struct nbrec_logical_router_static_route *st_route = route->route; struct ds match = DS_EMPTY_INITIALIZER; @@ -11548,15 +11547,9 @@ add_ecmp_symmetric_reply_flows(struct lflow_table *lflows, ds_put_cstr(&match, " && (ct.new || ct.est)"); ds_put_format(&actions, "ct_commit { ct_label.ecmp_reply_eth = eth.src; " - "ct_mark.ecmp_reply_port = %" PRId64 ";", + "ct_mark.ecmp_reply_port = %" PRId64 ";}; " + "next;", out_port->sb->tunnel_key); - - struct simap_node *n = simap_find(nexthops_table, st_route->nexthop); - if (n) { - ds_put_format(&actions, " ct_label.label = %d;", n->data); - } - ds_put_cstr(&actions, " }; next;"); - ovn_lflow_add_with_hint(lflows, od, S_ROUTER_IN_ECMP_STATEFUL, 100, ds_cstr(&match), ds_cstr(&actions), &st_route->header_, @@ -11613,8 +11606,7 @@ add_ecmp_symmetric_reply_flows(struct lflow_table *lflows, static void build_ecmp_route_flow(struct lflow_table *lflows, struct ovn_datapath *od, const struct hmap *lr_ports, struct ecmp_groups_node *eg, - struct lflow_ref *lflow_ref, - struct simap *nexthops_table) + struct lflow_ref *lflow_ref) { bool is_ipv4 = IN6_IS_ADDR_V4MAPPED(&eg->prefix); @@ -11671,7 +11663,7 @@ build_ecmp_route_flow(struct lflow_table *lflows, struct ovn_datapath *od, out_port->key)) { add_ecmp_symmetric_reply_flows(lflows, od, lrp_addr_s, out_port, route_, &route_match, - lflow_ref, nexthops_table); + lflow_ref); } ds_clear(&match); ds_put_format(&match, REG_ECMP_GROUP_ID" == %"PRIu16" && " @@ -13573,7 +13565,7 @@ build_static_route_flows_for_lrouter( struct ovn_datapath *od, struct lflow_table *lflows, const struct hmap *lr_ports, struct hmap *parsed_routes, struct simap *route_tables, const struct sset *bfd_ports, - struct lflow_ref *lflow_ref, struct simap *nexthops_table) + struct lflow_ref *lflow_ref) { ovs_assert(od->nbr); ovn_lflow_add_default_drop(lflows, od, S_ROUTER_IN_IP_ROUTING_ECMP, @@ -13615,8 +13607,7 @@ build_static_route_flows_for_lrouter( HMAP_FOR_EACH (group, hmap_node, &ecmp_groups) { /* add a flow in IP_ROUTING, and one flow for each member in * IP_ROUTING_ECMP. */ - build_ecmp_route_flow(lflows, od, lr_ports, group, lflow_ref, - nexthops_table); + build_ecmp_route_flow(lflows, od, lr_ports, group, lflow_ref); } const struct unique_routes_node *ur; HMAP_FOR_EACH (ur, hmap_node, &unique_routes) { @@ -17054,7 +17045,6 @@ struct lswitch_flow_build_info { struct hmap *parsed_routes; struct hmap *route_policies; struct simap *route_tables; - struct simap *nexthops_table; }; /* Helper function to combine all lflow generation which is iterated by @@ -17101,8 +17091,7 @@ build_lswitch_and_lrouter_iterate_by_lr(struct ovn_datapath *od, build_ip_routing_pre_flows_for_lrouter(od, lsi->lflows, NULL); build_static_route_flows_for_lrouter(od, lsi->lflows, lsi->lr_ports, lsi->parsed_routes, lsi->route_tables, - lsi->bfd_ports, NULL, - lsi->nexthops_table); + lsi->bfd_ports, NULL); build_mcast_lookup_flows_for_lrouter(od, lsi->lflows, &lsi->match, &lsi->actions, NULL); build_ingress_policy_flows_for_lrouter(od, lsi->lflows, lsi->lr_ports, @@ -17432,8 +17421,7 @@ build_lswitch_and_lrouter_flows( const struct sampling_app_table *sampling_apps, struct hmap *parsed_routes, struct hmap *route_policies, - struct simap *route_tables, - struct simap *nexthops_table) + struct simap *route_tables) { char *svc_check_match = xasprintf("eth.dst == %s", svc_monitor_mac); @@ -17471,7 +17459,6 @@ build_lswitch_and_lrouter_flows( lsiv[index].parsed_routes = parsed_routes; lsiv[index].route_tables = route_tables; lsiv[index].route_policies = route_policies; - lsiv[index].nexthops_table = nexthops_table; ds_init(&lsiv[index].match); ds_init(&lsiv[index].actions); @@ -17518,7 +17505,6 @@ build_lswitch_and_lrouter_flows( .route_policies = route_policies, .match = DS_EMPTY_INITIALIZER, .actions = DS_EMPTY_INITIALIZER, - .nexthops_table = nexthops_table, }; /* Combined build - all lflow generation from lswitch and lrouter @@ -17685,8 +17671,7 @@ void build_lflows(struct ovsdb_idl_txn *ovnsb_txn, input_data->sampling_apps, input_data->parsed_routes, input_data->route_policies, - input_data->route_tables, - input_data->nexthops_table); + input_data->route_tables); if (parallelization_state == STATE_INIT_HASH_SIZES) { parallelization_state = STATE_USE_PARALLELIZATION; diff --git a/northd/northd.h b/northd/northd.h index a4971e336..c163dd46b 100644 --- a/northd/northd.h +++ b/northd/northd.h @@ -233,7 +233,6 @@ struct lflow_input { struct hmap *parsed_routes; struct hmap *route_policies; struct simap *route_tables; - struct simap *nexthops_table; }; extern int parallelization_state; diff --git a/tests/ovn.at b/tests/ovn.at index 50c9f04da..acf18c4e0 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -28717,7 +28717,7 @@ AT_CHECK([ for hv in 1 2; do grep table=$ecmp_stateful hv${hv}flows | \ grep "priority=100" | \ - grep -c "ct(commit,zone=NXM_NX_REG11\\[[0..15\\]],.*exec(move:NXM_OF_ETH_SRC\\[[\\]]->NXM_NX_CT_LABEL\\[[32..79\\]],load:0x[[0-9]]->NXM_NX_CT_MARK\\[[16..31\\]],load:0x[[0-9]]->NXM_NX_CT_LABEL\\[[96..127\\]]))" + grep -c "ct(commit,zone=NXM_NX_REG11\\[[0..15\\]],.*exec(move:NXM_OF_ETH_SRC\\[[\\]]->NXM_NX_CT_LABEL\\[[32..79\\]],load:0x[[0-9]]->NXM_NX_CT_MARK\\[[16..31\\]]))" grep table=$arp_resolve hv${hv}flows | \ grep "priority=200" | \ @@ -28846,7 +28846,7 @@ AT_CHECK([ for hv in 1 2; do grep table=$ecmp_stateful hv${hv}flows | \ grep "priority=100" | \ - grep -c "ct(commit,zone=NXM_NX_REG11\\[[0..15\\]],.*exec(move:NXM_OF_ETH_SRC\\[[\\]]->NXM_NX_CT_LABEL\\[[32..79\\]],load:0x[[0-9]]->NXM_NX_CT_MARK\\[[16..31\\]],load:0x[[0-9]]->NXM_NX_CT_LABEL\\[[96..127\\]]))" + grep -c "ct(commit,zone=NXM_NX_REG11\\[[0..15\\]],.*exec(move:NXM_OF_ETH_SRC\\[[\\]]->NXM_NX_CT_LABEL\\[[32..79\\]],load:0x[[0-9]]->NXM_NX_CT_MARK\\[[16..31\\]]))" grep table=$arp_resolve hv${hv}flows | \ grep "priority=200" | \ diff --git a/tests/system-ovn.at b/tests/system-ovn.at index c2e35a74c..0831a2108 100644 --- a/tests/system-ovn.at +++ b/tests/system-ovn.at @@ -6172,21 +6172,18 @@ NS_CHECK_EXEC([bob1], [ping -q -c 3 -i 0.3 -w 2 10.0.0.2 | FORMAT_PING], \ # and just ensure that the known ethernet address is present. AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(172.16.0.1) | \ sed -e 's/zone=[[0-9]]*/zone=/' | -sed -e 's/mark=[[0-9]]*/mark=/' | -sed -e 's/labels=0x[[0-9]]/labels=0x?/'], [0], [dnl -icmp,orig=(src=172.16.0.1,dst=10.0.0.2,id=,type=8,code=0),reply=(src=10.0.0.2,dst=172.16.0.1,id=,type=0,code=0),zone=,mark=,labels=0x?000000000401020400000000 -tcp,orig=(src=172.16.0.1,dst=10.0.0.2,sport=,dport=),reply=(src=10.0.0.2,dst=172.16.0.1,sport=,dport=),zone=,mark=,labels=0x?000000000401020400000000,protoinfo=(state=) +sed -e 's/mark=[[0-9]]*/mark=/'], [0], [dnl +icmp,orig=(src=172.16.0.1,dst=10.0.0.2,id=,type=8,code=0),reply=(src=10.0.0.2,dst=172.16.0.1,id=,type=0,code=0),zone=,mark=,labels=0x401020400000000 +tcp,orig=(src=172.16.0.1,dst=10.0.0.2,sport=,dport=),reply=(src=10.0.0.2,dst=172.16.0.1,sport=,dport=),zone=,mark=,labels=0x401020400000000,protoinfo=(state=) ]) # Ensure datapaths show conntrack states as expected # Like with conntrack entries, we shouldn't try to predict # port binding tunnel keys. So omit them from expected labels. -AT_CHECK([ovs-appctl dpctl/dump-flows | sed -e 's/label=0x[[0-9]]/label=0x?/' | \ -grep 'ct_state(+new-est+trk).*ct(.*label=0x?000000000401020400000000/.*)' -c], [0], [dnl +AT_CHECK([ovs-appctl dpctl/dump-flows | grep 'ct_state(+new-est+trk).*ct(.*label=0x401020400000000/.*)' -c], [0], [dnl 2 ]) -AT_CHECK([[ovs-appctl dpctl/dump-flows | sed -e 's/ct_label(0x[0-9]/ct_label(0x?/' | \ -grep 'ct_state(-new+est+trk).*ct_label(0x?000000000401020400000000)' -c]], [0], [dnl +AT_CHECK([ovs-appctl dpctl/dump-flows | grep 'ct_state(-new+est+trk).*ct_label(0x401020400000000)' -c], [0], [dnl 2 ]) @@ -6205,21 +6202,18 @@ NS_CHECK_EXEC([bob1], [ping -q -c 3 -i 0.3 -w 2 10.0.0.2 | FORMAT_PING], \ [0], [dnl 3 packets transmitted, 3 received, 0% packet loss, time 0ms ]) -AT_CHECK([ovs-appctl dpctl/dump-flows | sed -e 's/label=0x[[0-9]]/label=0x?/' | \ -grep 'ct_state(+new-est+trk).*ct(.*label=0x?000000001001020400000000/.*)' -c], [0], [dnl +AT_CHECK([ovs-appctl dpctl/dump-flows | grep 'ct_state(+new-est+trk).*ct(.*label=0x1001020400000000/.*)' -c], [0], [dnl 2 ]) -AT_CHECK([[ovs-appctl dpctl/dump-flows | sed -e 's/ct_label(0x[0-9]/ct_label(0x?/' | \ -grep 'ct_state(-new+est+trk).*ct_label(0x?000000001001020400000000)' -c]], [0], [dnl +AT_CHECK([ovs-appctl dpctl/dump-flows | grep 'ct_state(-new+est+trk).*ct_label(0x1001020400000000)' -c], [0], [dnl 2 ]) -AT_CHECK([ovs-appctl dpctl/dump-conntrack | grep 1001020400000000 | FORMAT_CT(172.16.0.1) | \ +AT_CHECK([ovs-appctl dpctl/dump-conntrack | grep 0x1001020400000000 | FORMAT_CT(172.16.0.1) | \ sed -e 's/zone=[[0-9]]*/zone=/' | -sed -e 's/mark=[[0-9]]*/mark=/' | -sed -e 's/labels=0x[[0-9]]/labels=0x?/' | sort], [0], [dnl -icmp,orig=(src=172.16.0.1,dst=10.0.0.2,id=,type=8,code=0),reply=(src=10.0.0.2,dst=172.16.0.1,id=,type=0,code=0),zone=,mark=,labels=0x?000000001001020400000000 -tcp,orig=(src=172.16.0.1,dst=10.0.0.2,sport=,dport=),reply=(src=10.0.0.2,dst=172.16.0.1,sport=,dport=),zone=,mark=,labels=0x?000000001001020400000000,protoinfo=(state=) +sed -e 's/mark=[[0-9]]*/mark=/' | sort], [0], [dnl +icmp,orig=(src=172.16.0.1,dst=10.0.0.2,id=,type=8,code=0),reply=(src=10.0.0.2,dst=172.16.0.1,id=,type=0,code=0),zone=,mark=,labels=0x1001020400000000 +tcp,orig=(src=172.16.0.1,dst=10.0.0.2,sport=,dport=),reply=(src=10.0.0.2,dst=172.16.0.1,sport=,dport=),zone=,mark=,labels=0x1001020400000000,protoinfo=(state=) ]) # Check entries in table 76 and 77 expires w/o traffic OVS_WAIT_UNTIL([ @@ -6241,11 +6235,10 @@ NS_CHECK_EXEC([alice1], [ping -q -c 3 -i 0.3 -w 2 172.16.0.1 | FORMAT_PING], \ 3 packets transmitted, 3 received, 0% packet loss, time 0ms ]) -AT_CHECK([ovs-appctl dpctl/dump-conntrack | grep 401020500000000 | FORMAT_CT(172.16.0.1) | \ +AT_CHECK([ovs-appctl dpctl/dump-conntrack | grep 0x401020500000000 | FORMAT_CT(172.16.0.1) | \ sed -e 's/zone=[[0-9]]*/zone=/' | -sed -e 's/mark=[[0-9]]*/mark=/' | -sed -e 's/labels=0x[[0-9]]/labels=0x?/' | sort], [0], [dnl -tcp,orig=(src=172.16.0.1,dst=10.0.0.2,sport=,dport=),reply=(src=10.0.0.2,dst=172.16.0.1,sport=,dport=),zone=,mark=,labels=0x?000000000401020500000000,protoinfo=(state=) +sed -e 's/mark=[[0-9]]*/mark=/' | sort], [0], [dnl +tcp,orig=(src=172.16.0.1,dst=10.0.0.2,sport=,dport=),reply=(src=10.0.0.2,dst=172.16.0.1,sport=,dport=),zone=,mark=,labels=0x401020500000000,protoinfo=(state=) ]) OVS_APP_EXIT_AND_WAIT([ovn-controller]) @@ -6395,12 +6388,11 @@ NS_CHECK_EXEC([bob1], [ping -q -c 3 -i 0.3 -w 2 fd01::2 | FORMAT_PING], \ # Ensure datapaths show conntrack states as expected # Like with conntrack entries, we shouldn't try to predict # port binding tunnel keys. So omit them from expected labels. -AT_CHECK([ovs-appctl dpctl/dump-flows | sed -e 's/label=0x[[0-9]]/label=0x?/' | \ -grep 'ct_state(+new-est+trk).*ct(.*label=0x?000000000401020400000000/.*)' -c], [0], [dnl +AT_CHECK([ovs-appctl dpctl/dump-flows | grep 'ct_state(+new-est+trk).*ct(.*label=0x401020400000000/.*)' -c], [0], [dnl 2 ]) -AT_CHECK([[ovs-appctl dpctl/dump-flows | sed -e 's/ct_label(0x[0-9]/ct_label(0x?/' | \ -grep 'ct_state(-new+est+trk).*ct_label(0x?000000000401020400000000)' -c]], [0], [dnl + +AT_CHECK([ovs-appctl dpctl/dump-flows | grep 'ct_state(-new+est+trk).*ct_label(0x401020400000000)' -c], [0], [dnl 2 ]) @@ -6409,10 +6401,9 @@ grep 'ct_state(-new+est+trk).*ct_label(0x?000000000401020400000000)' -c]], [0], # and just ensure that the known ethernet address is present. AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(fd01::2) | \ sed -e 's/zone=[[0-9]]*/zone=/' | -sed -e 's/mark=[[0-9]]*/mark=/' | -sed -e 's/labels=0x[[0-9]]/labels=0x?/' | sort], [0], [dnl -icmpv6,orig=(src=fd07::1,dst=fd01::2,id=,type=128,code=0),reply=(src=fd01::2,dst=fd07::1,id=,type=129,code=0),zone=,mark=,labels=0x?000000000401020400000000 -tcp,orig=(src=fd07::1,dst=fd01::2,sport=,dport=),reply=(src=fd01::2,dst=fd07::1,sport=,dport=),zone=,mark=,labels=0x?000000000401020400000000,protoinfo=(state=) +sed -e 's/mark=[[0-9]]*/mark=/' | sort], [0], [dnl +icmpv6,orig=(src=fd07::1,dst=fd01::2,id=,type=128,code=0),reply=(src=fd01::2,dst=fd07::1,id=,type=129,code=0),zone=,mark=,labels=0x401020400000000 +tcp,orig=(src=fd07::1,dst=fd01::2,sport=,dport=),reply=(src=fd01::2,dst=fd07::1,sport=,dport=),zone=,mark=,labels=0x401020400000000,protoinfo=(state=) ]) # Flush conntrack entries for easier output parsing of next test. @@ -6429,21 +6420,18 @@ NS_CHECK_EXEC([bob1], [ping -q -c 3 -i 0.3 -w 2 fd01::2 | FORMAT_PING], \ 3 packets transmitted, 3 received, 0% packet loss, time 0ms ]) -AT_CHECK([ovs-appctl dpctl/dump-flows | sed -e 's/label=0x[[0-9]]/label=0x?/' | \ -grep 'ct_state(+new-est+trk).*ct(.*label=0x?000000001001020400000000/.*)' -c], [0], [dnl +AT_CHECK([ovs-appctl dpctl/dump-flows | grep 'ct_state(+new-est+trk).*ct(.*label=0x1001020400000000/.*)' -c], [0], [dnl 2 ]) -AT_CHECK([[ovs-appctl dpctl/dump-flows | sed -e 's/ct_label(0x[0-9]/ct_label(0x?/' | \ -grep 'ct_state(-new+est+trk).*ct_label(0x?000000001001020400000000)' -c]], [0], [dnl +AT_CHECK([ovs-appctl dpctl/dump-flows | grep 'ct_state(-new+est+trk).*ct_label(0x1001020400000000)' -c], [0], [dnl 2 ]) -AT_CHECK([ovs-appctl dpctl/dump-conntrack | grep 1001020400000000 | FORMAT_CT(fd01::2) | \ +AT_CHECK([ovs-appctl dpctl/dump-conntrack | grep 0x1001020400000000 | FORMAT_CT(fd01::2) | \ sed -e 's/zone=[[0-9]]*/zone=/' | -sed -e 's/mark=[[0-9]]*/mark=/' | -sed -e 's/labels=0x[[0-9]]/labels=0x?/'], [0], [dnl -icmpv6,orig=(src=fd07::1,dst=fd01::2,id=,type=128,code=0),reply=(src=fd01::2,dst=fd07::1,id=,type=129,code=0),zone=,mark=,labels=0x?000000001001020400000000 -tcp,orig=(src=fd07::1,dst=fd01::2,sport=,dport=),reply=(src=fd01::2,dst=fd07::1,sport=,dport=),zone=,mark=,labels=0x?000000001001020400000000,protoinfo=(state=) +sed -e 's/mark=[[0-9]]*/mark=/'], [0], [dnl +icmpv6,orig=(src=fd07::1,dst=fd01::2,id=,type=128,code=0),reply=(src=fd01::2,dst=fd07::1,id=,type=129,code=0),zone=,mark=,labels=0x1001020400000000 +tcp,orig=(src=fd07::1,dst=fd01::2,sport=,dport=),reply=(src=fd01::2,dst=fd07::1,sport=,dport=),zone=,mark=,labels=0x1001020400000000,protoinfo=(state=) ]) # Check entries in table 76 and 77 expires w/o traffic @@ -6463,11 +6451,10 @@ NS_CHECK_EXEC([alice1], [ping -q -c 3 -i 0.3 -w 2 fd07::1 | FORMAT_PING], \ 3 packets transmitted, 3 received, 0% packet loss, time 0ms ]) -AT_CHECK([ovs-appctl dpctl/dump-conntrack | grep 1001020400000000 | FORMAT_CT(fd07::1) | \ +AT_CHECK([ovs-appctl dpctl/dump-conntrack | grep 0x1001020400000000 | FORMAT_CT(fd07::1) | \ sed -e 's/zone=[[0-9]]*/zone=/' | -sed -e 's/mark=[[0-9]]*/mark=/' | -sed -e 's/labels=0x[[0-9]]/labels=0x?/' | sort], [0], [dnl -tcp,orig=(src=fd07::1,dst=fd01::2,sport=,dport=),reply=(src=fd01::2,dst=fd07::1,sport=,dport=),zone=,mark=,labels=0x?000000001001020400000000,protoinfo=(state=) +sed -e 's/mark=[[0-9]]*/mark=/' | sort], [0], [dnl +tcp,orig=(src=fd07::1,dst=fd01::2,sport=,dport=),reply=(src=fd01::2,dst=fd07::1,sport=,dport=),zone=,mark=,labels=0x1001020400000000,protoinfo=(state=) ]) OVS_APP_EXIT_AND_WAIT([ovn-controller]) From patchwork Mon Aug 26 14:14:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 1976854 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=JWgokwjM; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (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 4Wst4B6Gz8z1yfF for ; Tue, 27 Aug 2024 00:15:22 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id C8A99403DE; Mon, 26 Aug 2024 14:15:19 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id R-A_0W42zOzE; Mon, 26 Aug 2024 14:15:18 +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 smtp4.osuosl.org D510D403D9 Authentication-Results: smtp4.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=JWgokwjM Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id D510D403D9; Mon, 26 Aug 2024 14:15:17 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 76238C07E9; Mon, 26 Aug 2024 14:15:17 +0000 (UTC) X-Original-To: ovs-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 27295C07E7 for ; Mon, 26 Aug 2024 14:15:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id CD58A80B45 for ; Mon, 26 Aug 2024 14:15:14 +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 OQAqjYZbEX26 for ; Mon, 26 Aug 2024 14:15:13 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=lorenzo.bianconi@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 3ED8480BBA Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 3ED8480BBA Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=JWgokwjM Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id 3ED8480BBA for ; Mon, 26 Aug 2024 14:15:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724681711; 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: in-reply-to:in-reply-to:references:references; bh=C6ZwaFoiLzX80unqkJpwCcr/RTNXvKCpHe+/k5TSxpo=; b=JWgokwjMFZcOMPNxUy9spCSlj/rbELTQzqJzvfy/paDFIAxz7vQsk9qCvEFIcVkOfY0Djp WbP0QT7d+X2fi3s/avsQQ6juMKQ99bi5AlxpzBb7RZMQysbt7ZrGbubmx9IIhIvYNRHdDj CIqBvmouBMA66ZRa3JTmzvYO4K+zYSE= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-15-X_oTjdm9N7qyP04soj7xAQ-1; Mon, 26 Aug 2024 10:15:10 -0400 X-MC-Unique: X_oTjdm9N7qyP04soj7xAQ-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-42820af1106so37561665e9.2 for ; Mon, 26 Aug 2024 07:15:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724681709; x=1725286509; 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=C6ZwaFoiLzX80unqkJpwCcr/RTNXvKCpHe+/k5TSxpo=; b=Jw7M5sdoYVcV9x1XVl+6T1yrkVlv8Q4E7nuKejJqqYRpDEa/C/uzyh7POrnrTtjObE SzKwkWGNEp86y00gCera2YyRt0P2xiV2zorhIzBtI4DIb1xkMSPaNdeLzAtGfKCClfaB 5Cjp+Ukn6IB9qkR07mPfyfJOI3lyCFwUKSp3DW0kfP90yjGluEhjb4sCu4BW4bNNNhWq CAVADd12+VQEGjUEUXXGGXHZB0Wh57iBTYuXmMx3wDQIikflVbaOd6tpfo+/6axsLOXU cRij7Z3jjBomGwCd/DcHZ/1hwgYsCFcOK5H7v+eXW+WMnO3SiysPzcI2TVDIQVUbhjnm uJOQ== X-Gm-Message-State: AOJu0YxHH1c61XLxZq3CDuYONLz3PiO1hxSztMQwcGBIueCXMXEoBOrc sJ4PlAJlGjw1iSfihgvshJuYvRZdK16BuT/SV7uncJVKQ5/p4N5QyKG22t0dwHuKPbIVZNAUqgx UFoz/BugQkRayH4hUN3JNsComYT7fbeuxXwKfTl5br9Uhp7MXgAgCMF3tZ+FzpWmauqBCWWVkbx /9nXR3p5DpkOkknnorGO/2OYx96U+XG+bhcOUKIHZr2ISpXRBhjQ== X-Received: by 2002:a05:600c:3d07:b0:426:627d:5542 with SMTP id 5b1f17b1804b1-42acd5dac5amr66854115e9.28.1724681708828; Mon, 26 Aug 2024 07:15:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEC8a64dn2aeuJoz6rKdo8gLWbJxiv+WSuxeq7OQX/wKXaSw1qf2A6N/uBiGVNuJrk0DurK9w== X-Received: by 2002:a05:600c:3d07:b0:426:627d:5542 with SMTP id 5b1f17b1804b1-42acd5dac5amr66853815e9.28.1724681708295; Mon, 26 Aug 2024 07:15:08 -0700 (PDT) Received: from localhost (net-188-216-76-117.cust.vodafonedsl.it. [188.216.76.117]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ac517a490sm156737935e9.31.2024.08.26.07.15.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2024 07:15:07 -0700 (PDT) From: Lorenzo Bianconi To: ovs-dev@openvswitch.org Date: Mon, 26 Aug 2024 16:14:51 +0200 Message-ID: <31fcef90afa5144de4fc7ae5bcb9532236aa18bc.1724680233.git.lorenzo.bianconi@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH v3 ovn 3/3] Revert "northd: Introduce ECMP_Nexthop table in SB db.". 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: , Cc: dceara@redhat.com Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" This reverts commit aeae21335a8bccbb9fe7746fcf4ed2d2a0e1c7a4. Revert current implementation of ECMP_Nexthop monitor feature since it can trigger over-flush of CT entries committed by incoming traffic. In particular, at the moment there is no way to link the next-hop IP address (so the ct-entry ID) to the incoming traffic identified by the ethernet source mac address and so to the ct_lablel committed by the following logical flow: table=10(lr_in_ecmp_stateful), priority=100 , match=(inport == "R1_ext" && ip4.dst == 10.0.0.0/24 && (ct.new || ct.est)), action=(ct_commit { ct_label.ecmp_reply_eth = eth.src; ct_mark.ecmp_reply_port = 2; ct_label.label = 1; }; next;) Remove the feature while working on an improved approach. Bump ovn-sb.ovsschema version to 20.37.0. Reported-at: https://issues.redhat.com/browse/FDP-750 Signed-off-by: Lorenzo Bianconi --- lib/ovn-util.h | 2 -- northd/en-northd.c | 35 -------------------- northd/en-northd.h | 4 --- northd/inc-proc-northd.c | 7 +--- northd/northd.c | 70 ---------------------------------------- northd/northd.h | 10 ------ ovn-sb.ovsschema | 18 ++--------- ovn-sb.xml | 31 ------------------ tests/ovn-northd.at | 4 --- 9 files changed, 3 insertions(+), 178 deletions(-) diff --git a/lib/ovn-util.h b/lib/ovn-util.h index 622fec531..7b98b9b9a 100644 --- a/lib/ovn-util.h +++ b/lib/ovn-util.h @@ -38,8 +38,6 @@ #define STT_TUNNEL_OVERHEAD 18 #define VXLAN_TUNNEL_OVERHEAD 30 -#define ECMP_NEXTHOP_IDS_LEN 65535 - struct eth_addr; struct nbrec_logical_router_port; struct ovsrec_flow_sample_collector_set_table; diff --git a/northd/en-northd.c b/northd/en-northd.c index 0ecc72a24..24ed31517 100644 --- a/northd/en-northd.c +++ b/northd/en-northd.c @@ -404,25 +404,6 @@ en_bfd_sync_run(struct engine_node *node, void *data) engine_set_node_state(node, EN_UPDATED); } -void -en_ecmp_nexthop_run(struct engine_node *node, void *data) -{ - const struct engine_context *eng_ctx = engine_get_context(); - struct static_routes_data *static_routes_data = - engine_get_input_data("static_routes", node); - struct ecmp_nexthop_data *enh_data = data; - const struct sbrec_ecmp_nexthop_table *sbrec_ecmp_nexthop_table = - EN_OVSDB_GET(engine_get_input("SB_ecmp_nexthop", node)); - - ecmp_nexthop_destroy(data); - ecmp_nexthop_init(data); - build_ecmp_nexthop_table(eng_ctx->ovnsb_idl_txn, - &static_routes_data->parsed_routes, - &enh_data->nexthops, - sbrec_ecmp_nexthop_table); - engine_set_node_state(node, EN_UPDATED); -} - void *en_northd_init(struct engine_node *node OVS_UNUSED, struct engine_arg *arg OVS_UNUSED) @@ -473,16 +454,6 @@ void return data; } -void -*en_ecmp_nexthop_init(struct engine_node *node OVS_UNUSED, - struct engine_arg *arg OVS_UNUSED) -{ - struct ecmp_nexthop_data *data = xzalloc(sizeof *data); - - ecmp_nexthop_init(data); - return data; -} - void en_northd_cleanup(void *data) { @@ -555,9 +526,3 @@ en_bfd_sync_cleanup(void *data) { bfd_sync_destroy(data); } - -void -en_ecmp_nexthop_cleanup(void *data) -{ - ecmp_nexthop_destroy(data); -} diff --git a/northd/en-northd.h b/northd/en-northd.h index 2666cc67e..631a7c17a 100644 --- a/northd/en-northd.h +++ b/northd/en-northd.h @@ -42,9 +42,5 @@ bool bfd_sync_northd_change_handler(struct engine_node *node, void *data OVS_UNUSED); void en_bfd_sync_run(struct engine_node *node, void *data); void en_bfd_sync_cleanup(void *data OVS_UNUSED); -void en_ecmp_nexthop_run(struct engine_node *node, void *data); -void *en_ecmp_nexthop_init(struct engine_node *node OVS_UNUSED, - struct engine_arg *arg OVS_UNUSED); -void en_ecmp_nexthop_cleanup(void *data); #endif /* EN_NORTHD_H */ diff --git a/northd/inc-proc-northd.c b/northd/inc-proc-northd.c index 06c7ee2b8..1f79916a5 100644 --- a/northd/inc-proc-northd.c +++ b/northd/inc-proc-northd.c @@ -103,8 +103,7 @@ static unixctl_cb_func chassis_features_list; SB_NODE(fdb, "fdb") \ SB_NODE(static_mac_binding, "static_mac_binding") \ SB_NODE(chassis_template_var, "chassis_template_var") \ - SB_NODE(logical_dp_group, "logical_dp_group") \ - SB_NODE(ecmp_nexthop, "ecmp_nexthop") + SB_NODE(logical_dp_group, "logical_dp_group") enum sb_engine_node { #define SB_NODE(NAME, NAME_STR) SB_##NAME, @@ -163,7 +162,6 @@ static ENGINE_NODE(route_policies, "route_policies"); static ENGINE_NODE(static_routes, "static_routes"); static ENGINE_NODE(bfd, "bfd"); static ENGINE_NODE(bfd_sync, "bfd_sync"); -static ENGINE_NODE(ecmp_nexthop, "ecmp_nexthop"); void inc_proc_northd_init(struct ovsdb_idl_loop *nb, struct ovsdb_idl_loop *sb) @@ -266,9 +264,6 @@ void inc_proc_northd_init(struct ovsdb_idl_loop *nb, engine_add_input(&en_bfd_sync, &en_route_policies, NULL); engine_add_input(&en_bfd_sync, &en_northd, bfd_sync_northd_change_handler); - engine_add_input(&en_ecmp_nexthop, &en_sb_ecmp_nexthop, NULL); - engine_add_input(&en_ecmp_nexthop, &en_static_routes, NULL); - engine_add_input(&en_sync_meters, &en_nb_acl, NULL); engine_add_input(&en_sync_meters, &en_nb_meter, NULL); engine_add_input(&en_sync_meters, &en_sb_meter, NULL); diff --git a/northd/northd.c b/northd/northd.c index b92c09ca7..a267cd5f8 100644 --- a/northd/northd.c +++ b/northd/northd.c @@ -10665,64 +10665,6 @@ build_bfd_map(const struct nbrec_bfd_table *nbrec_bfd_table, } } -void -build_ecmp_nexthop_table( - struct ovsdb_idl_txn *ovnsb_txn, - struct hmap *routes, - struct simap *nexthops, - const struct sbrec_ecmp_nexthop_table *sbrec_ecmp_nexthop_table) -{ - if (!ovnsb_txn) { - return; - } - - unsigned long *nexthop_ids = bitmap_allocate(ECMP_NEXTHOP_IDS_LEN); - const struct sbrec_ecmp_nexthop *sb_ecmp_nexthop; - SBREC_ECMP_NEXTHOP_TABLE_FOR_EACH (sb_ecmp_nexthop, - sbrec_ecmp_nexthop_table) { - simap_put(nexthops, sb_ecmp_nexthop->nexthop, - sb_ecmp_nexthop->id); - bitmap_set1(nexthop_ids, sb_ecmp_nexthop->id); - } - - struct sset nb_nexthops_sset = SSET_INITIALIZER(&nb_nexthops_sset); - - struct parsed_route *pr; - HMAP_FOR_EACH (pr, key_node, routes) { - if (!pr->ecmp_symmetric_reply) { - continue; - } - - const struct nbrec_logical_router_static_route *r = pr->route; - if (!simap_contains(nexthops, r->nexthop)) { - int id = bitmap_scan(nexthop_ids, 0, 1, ECMP_NEXTHOP_IDS_LEN); - if (id == ECMP_NEXTHOP_IDS_LEN) { - static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 1); - VLOG_WARN_RL(&rl, "nexthop id address space is exhausted"); - continue; - } - bitmap_set1(nexthop_ids, id); - simap_put(nexthops, r->nexthop, id); - - sb_ecmp_nexthop = sbrec_ecmp_nexthop_insert(ovnsb_txn); - sbrec_ecmp_nexthop_set_nexthop(sb_ecmp_nexthop, r->nexthop); - sbrec_ecmp_nexthop_set_id(sb_ecmp_nexthop, id); - } - sset_add(&nb_nexthops_sset, r->nexthop); - } - - SBREC_ECMP_NEXTHOP_TABLE_FOR_EACH_SAFE (sb_ecmp_nexthop, - sbrec_ecmp_nexthop_table) { - if (!sset_contains(&nb_nexthops_sset, sb_ecmp_nexthop->nexthop)) { - simap_find_and_delete(nexthops, sb_ecmp_nexthop->nexthop); - sbrec_ecmp_nexthop_delete(sb_ecmp_nexthop); - } - } - - sset_destroy(&nb_nexthops_sset); - bitmap_free(nexthop_ids); -} - /* Returns a string of the IP address of the router port 'op' that * overlaps with 'ip_s". If one is not found, returns NULL. * @@ -18781,12 +18723,6 @@ bfd_sync_init(struct bfd_sync_data *data) sset_init(&data->bfd_ports); } -void -ecmp_nexthop_init(struct ecmp_nexthop_data *data) -{ - simap_init(&data->nexthops); -} - void northd_destroy(struct northd_data *data) { @@ -18874,12 +18810,6 @@ static_routes_destroy(struct static_routes_data *data) __bfd_destroy(&data->bfd_active_connections); } -void -ecmp_nexthop_destroy(struct ecmp_nexthop_data *data) -{ - simap_destroy(&data->nexthops); -} - void ovnnb_db_run(struct northd_input *input_data, struct northd_data *data, diff --git a/northd/northd.h b/northd/northd.h index c163dd46b..8f76d642d 100644 --- a/northd/northd.h +++ b/northd/northd.h @@ -199,10 +199,6 @@ struct bfd_sync_data { struct sset bfd_ports; }; -struct ecmp_nexthop_data { - struct simap nexthops; -}; - struct lr_nat_table; struct lflow_input { @@ -749,12 +745,6 @@ void bfd_destroy(struct bfd_data *); void bfd_sync_init(struct bfd_sync_data *); void bfd_sync_destroy(struct bfd_sync_data *); -void build_ecmp_nexthop_table(struct ovsdb_idl_txn *, - struct hmap *, struct simap *, - const struct sbrec_ecmp_nexthop_table *); -void ecmp_nexthop_init(struct ecmp_nexthop_data *); -void ecmp_nexthop_destroy(struct ecmp_nexthop_data *); - struct lflow_table; struct lr_stateful_tracked_data; struct ls_stateful_tracked_data; diff --git a/ovn-sb.ovsschema b/ovn-sb.ovsschema index 9d8e0ac46..73abf2c8d 100644 --- a/ovn-sb.ovsschema +++ b/ovn-sb.ovsschema @@ -1,7 +1,7 @@ { "name": "OVN_Southbound", - "version": "20.36.0", - "cksum": "1845967275 32154", + "version": "20.37.0", + "cksum": "1950136776 31493", "tables": { "SB_Global": { "columns": { @@ -610,20 +610,6 @@ "refTable": "Datapath_Binding"}}}}, "indexes": [["logical_port", "ip"]], "isRoot": true}, - "ECMP_Nexthop": { - "columns": { - "nexthop": {"type": "string"}, - "id": {"type": {"key": {"type": "integer", - "minInteger": 0, - "maxInteger": 65535}}}, - "external_ids": { - "type": {"key": "string", "value": "string", - "min": 0, "max": "unlimited"}}, - "options": { - "type": {"key": "string", "value": "string", - "min": 0, "max": "unlimited"}}}, - "indexes": [["nexthop"]], - "isRoot": true}, "Chassis_Template_Var": { "columns": { "chassis": {"type": "string"}, diff --git a/ovn-sb.xml b/ovn-sb.xml index c11296d7c..746cc6308 100644 --- a/ovn-sb.xml +++ b/ovn-sb.xml @@ -5178,35 +5178,4 @@ tcp.flags = RST; The set of variable values for a given chassis. - - -

- Each record in this table represents an active ECMP route committed by - ovn-northd to ovs connection-tracking table. - ECMP_Nexthop table is used by ovn-controller - to track active ct entries and to flush stale ones. -

- -

- Nexthop IP address for this ECMP route. Nexthop IP address should - be the IP address of a connected router port or the IP address of - an external device used as nexthop for the given destination. -

-
- - -

- Nexthop unique identifier. Nexthop ID is used to track active - ecmp-symmetric-reply connections and flush stale ones. -

-
- - - Reserved for future use. - - - - See External IDs at the beginning of this document. - -
diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at index 93ccbce6b..fddf222b3 100644 --- a/tests/ovn-northd.at +++ b/tests/ovn-northd.at @@ -6800,7 +6800,6 @@ check ovn-nbctl lsp-set-addresses public-lr0 router check ovn-nbctl lsp-set-options public-lr0 router-port=lr0-public check ovn-nbctl --wait=sb --ecmp-symmetric-reply lr-route-add lr0 1.0.0.1 192.168.0.10 -check_row_count ECMP_Nexthop 1 ovn-sbctl dump-flows lr0 > lr0flows @@ -6818,7 +6817,6 @@ AT_CHECK([grep -e "lr_in_ip_routing_ecmp" lr0flows | ovn_strip_lflows], [0], [dn ]) check ovn-nbctl --wait=sb --ecmp-symmetric-reply lr-route-add lr0 1.0.0.1 192.168.0.20 -check_row_count ECMP_Nexthop 2 ovn-sbctl dump-flows lr0 > lr0flows AT_CHECK([grep -w "lr_in_ip_routing" lr0flows | ovn_strip_lflows], [0], [dnl @@ -6848,7 +6846,6 @@ AT_CHECK([grep -e "lr_in_arp_resolve.*ecmp" lr0flows | ovn_strip_lflows], [0], [ # add ecmp route with wrong nexthop check ovn-nbctl --wait=sb --ecmp-symmetric-reply lr-route-add lr0 1.0.0.1 192.168.1.20 -check_row_count ECMP_Nexthop 2 ovn-sbctl dump-flows lr0 > lr0flows AT_CHECK([grep -w "lr_in_ip_routing" lr0flows | ovn_strip_lflows], [0], [dnl @@ -6868,7 +6865,6 @@ AT_CHECK([grep -e "lr_in_ip_routing_ecmp" lr0flows | sed 's/192\.168\.0\..0/192. check ovn-nbctl lr-route-del lr0 wait_row_count nb:Logical_Router_Static_Route 0 -check_row_count ECMP_Nexthop 0 check ovn-nbctl --wait=sb lr-route-add lr0 1.0.0.0/24 192.168.0.10 ovn-sbctl dump-flows lr0 > lr0flows