Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2227906/?format=api
{ "id": 2227906, "url": "http://patchwork.ozlabs.org/api/patches/2227906/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ovn/patch/20260424132342.3486635-8-amusil@redhat.com/", "project": { "id": 68, "url": "http://patchwork.ozlabs.org/api/projects/68/?format=api", "name": "Open Virtual Network development", "link_name": "ovn", "list_id": "ovs-dev.openvswitch.org", "list_email": "ovs-dev@openvswitch.org", "web_url": "http://openvswitch.org/", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260424132342.3486635-8-amusil@redhat.com>", "list_archive_url": null, "date": "2026-04-24T13:23:42", "name": "[ovs-dev,7/7] controller: Generate OpenFlow select groups for ECMP FDB entries.", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "0744c9ad881023c18d44cc5e246c7dc93500cc47", "submitter": { "id": 83634, "url": "http://patchwork.ozlabs.org/api/people/83634/?format=api", "name": "Ales Musil", "email": "amusil@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/ovn/patch/20260424132342.3486635-8-amusil@redhat.com/mbox/", "series": [ { "id": 501360, "url": "http://patchwork.ozlabs.org/api/series/501360/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ovn/list/?series=501360", "date": "2026-04-24T13:23:35", "name": "This series adds support for Equal-Cost Multi-Path (ECMP) FDB entries", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/501360/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2227906/comments/", "check": "success", "checks": "http://patchwork.ozlabs.org/api/patches/2227906/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<ovs-dev-bounces@openvswitch.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "dev@openvswitch.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "ovs-dev@lists.linuxfoundation.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=ZRQj1geM;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)", "smtp3.osuosl.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key)\n header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=ZRQj1geM", "smtp2.osuosl.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com", "smtp2.osuosl.org;\n dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com\n header.a=rsa-sha256 header.s=mimecast20190719 header.b=ZRQj1geM" ], "Received": [ "from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g2DFz2YKHz1yD5\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 24 Apr 2026 23:24:39 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 0009A61B4B;\n\tFri, 24 Apr 2026 13:24:37 +0000 (UTC)", "from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id spIghKU7kySw; Fri, 24 Apr 2026 13:24:35 +0000 (UTC)", "from lists.linuxfoundation.org (lf-lists.osuosl.org\n [IPv6:2605:bc80:3010:104::8cd3:938])\n\tby smtp3.osuosl.org (Postfix) with ESMTPS id 7C6E961B40;\n\tFri, 24 Apr 2026 13:24:35 +0000 (UTC)", "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id 5A530C058F;\n\tFri, 24 Apr 2026 13:24:35 +0000 (UTC)", "from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 1953CC04FA\n for <dev@openvswitch.org>; Fri, 24 Apr 2026 13:24:34 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by smtp2.osuosl.org (Postfix) with ESMTP id 8BEEA42314\n for <dev@openvswitch.org>; Fri, 24 Apr 2026 13:24:05 +0000 (UTC)", "from smtp2.osuosl.org ([127.0.0.1])\n by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id eEI02pi7rxtN for <dev@openvswitch.org>;\n Fri, 24 Apr 2026 13:24:01 +0000 (UTC)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by smtp2.osuosl.org (Postfix) with ESMTPS id 77C014231C\n for <dev@openvswitch.org>; Fri, 24 Apr 2026 13:24:00 +0000 (UTC)", "from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-54-FiAWcBYhOEGN74CzxO3-2Q-1; Fri,\n 24 Apr 2026 09:23:57 -0400", "from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 2BDFE1800454\n for <dev@openvswitch.org>; Fri, 24 Apr 2026 13:23:57 +0000 (UTC)", "from amusil.redhat.com (unknown [10.44.32.61])\n by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 9BF3518001D1; Fri, 24 Apr 2026 13:23:55 +0000 (UTC)" ], "X-Virus-Scanned": [ "amavis at osuosl.org", "amavis at osuosl.org" ], "X-Comment": "SPF check N/A for local connections -\n client-ip=2605:bc80:3010:104::8cd3:938; helo=lists.linuxfoundation.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN> ", "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 smtp3.osuosl.org 7C6E961B40", "OpenDKIM Filter v2.11.0 smtp2.osuosl.org 77C014231C" ], "Received-SPF": "Pass (mailfrom) identity=mailfrom; client-ip=170.10.133.124;\n helo=us-smtp-delivery-124.mimecast.com; envelope-from=amusil@redhat.com;\n receiver=<UNKNOWN>", "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp2.osuosl.org 77C014231C", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1777037039;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=eTOgwMW10rhb8HVaxYua9tWT7jo7jCCIQKwDDrnfT0o=;\n b=ZRQj1geMqmB83CCK4X6nU5MqJXzfQV+Ie0Ox/uLWolen8jMKfijXwFjux3ZI7q9VARV0oy\n Z/v/oJO7ryLmW8xcv23+nn/E6rTJR7hi4K5hWM9rnHtqHZqNhFh95iTUJeF3idJb1aZXz2\n xcM6Vw6NgNt8lU9y+zWcvA9x8Jw7yuo=", "X-MC-Unique": "FiAWcBYhOEGN74CzxO3-2Q-1", "X-Mimecast-MFC-AGG-ID": "FiAWcBYhOEGN74CzxO3-2Q_1777037037", "To": "dev@openvswitch.org", "Date": "Fri, 24 Apr 2026 15:23:42 +0200", "Message-ID": "<20260424132342.3486635-8-amusil@redhat.com>", "In-Reply-To": "<20260424132342.3486635-1-amusil@redhat.com>", "References": "<20260424132342.3486635-1-amusil@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.93", "X-Mimecast-Spam-Score": "0", "X-Mimecast-MFC-PROC-ID": "eKqAYixGZXYcy3eqJAXCN9j23XZ7BjT-V8N-byJG85Y_1777037037", "X-Mimecast-Originator": "redhat.com", "Subject": "[ovs-dev] [PATCH ovn 7/7] controller: Generate OpenFlow select\n groups for ECMP FDB entries.", "X-BeenThere": "ovs-dev@openvswitch.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "<ovs-dev.openvswitch.org>", "List-Unsubscribe": "<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>", "List-Archive": "<http://mail.openvswitch.org/pipermail/ovs-dev/>", "List-Post": "<mailto:ovs-dev@openvswitch.org>", "List-Help": "<mailto:ovs-dev-request@openvswitch.org?subject=help>", "List-Subscribe": "<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=subscribe>", "From": "Ales Musil via dev <ovs-dev@openvswitch.org>", "Reply-To": "Ales Musil <amusil@redhat.com>", "Cc": "dceara@redhat.com", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "ovs-dev-bounces@openvswitch.org", "Sender": "\"dev\" <ovs-dev-bounces@openvswitch.org>" }, "content": "For FDB entries with multiple paths (ECMP/multi-homed), create an\nOpenFlow select group with one bucket per path. Each bucket loads\nits binding_key into MFF_LOG_REMOTE_OUTPORT with the nexthop weight\nfrom the kernel. Single-path entries continue to use a direct load.\n\nReported-at: https://redhat.atlassian.net/browse/FDP-3068\nAssisted-by: Claude Opus 4.6, Claude Code\nSigned-off-by: Ales Musil <amusil@redhat.com>\n---\n NEWS | 3 +\n controller/evpn-fdb.c | 161 ++++++++++++++++++++++++++++---\n controller/evpn-fdb.h | 25 ++++-\n controller/ovn-controller.c | 17 +++-\n controller/physical.c | 80 ++++++++++++---\n controller/physical.h | 3 +\n tests/ovn-inc-proc-graph-dump.at | 2 +-\n tests/ovn-macros.at | 13 +++\n tests/system-ovn.at | 144 ++++++++++++++++++++++++---\n 9 files changed, 399 insertions(+), 49 deletions(-)", "diff": "diff --git a/NEWS b/NEWS\nindex 8633ba8bb..68cdbffea 100644\n--- a/NEWS\n+++ b/NEWS\n@@ -3,6 +3,9 @@ Post v26.03.0\n - Dynamic Routing:\n * Add support for hub-and-spoke propagation via the \"hub-spoke\" option\n in dynamic-routing-redistribute settings.\n+ * Add ECMP/multi-homing support for EVPN FDB entries. FDB entries\n+ backed by a kernel nexthop group are load-balanced via OpenFlow\n+ select groups with weighted buckets.\n \n OVN v26.03.0 - xxx xx xxxx\n --------------------------\ndiff --git a/controller/evpn-fdb.c b/controller/evpn-fdb.c\nindex 6767a70a5..9da3e86e5 100644\n--- a/controller/evpn-fdb.c\n+++ b/controller/evpn-fdb.c\n@@ -15,10 +15,15 @@\n \n #include <config.h>\n \n+#include <string.h>\n+\n #include \"evpn-binding.h\"\n+#include \"local_data.h\"\n #include \"neighbor-exchange.h\"\n+#include \"nexthop-exchange.h\"\n #include \"openvswitch/dynamic-string.h\"\n #include \"openvswitch/vlog.h\"\n+#include \"ovn-sb-idl.h\"\n #include \"packets.h\"\n #include \"unixctl.h\"\n \n@@ -34,6 +39,104 @@ static struct evpn_fdb *evpn_fdb_find(const struct hmap *evpn_fdbs,\n struct eth_addr, uint32_t vni);\n static uint32_t evpn_fdb_hash(const struct eth_addr *mac, uint32_t vni);\n \n+static int\n+evpn_fdb_path_cmp(const void *a, const void *b)\n+{\n+ const struct evpn_fdb_path *pa = a;\n+ const struct evpn_fdb_path *pb = b;\n+\n+ if (pa->binding_key != pb->binding_key) {\n+ return pa->binding_key < pb->binding_key ? -1 : 1;\n+ }\n+\n+ if (pa->weight != pb->weight) {\n+ return pa->weight < pb->weight ? -1 : 1;\n+ }\n+\n+ return 0;\n+}\n+\n+/* Build a sorted vector of paths for 'static_fdb'.\n+ * For single-path entries (nh_id == 0), looks up a single binding by IP.\n+ * For ECMP entries (nh_id != 0), resolves the nexthop group and collects\n+ * one path per gateway, preserving nexthop weights. */\n+static void\n+evpn_fdb_resolve_paths(const struct evpn_fdb_ctx_in *f_ctx_in,\n+ const struct evpn_static_entry *static_fdb,\n+ struct vector *paths)\n+{\n+ if (!static_fdb->nh_id) {\n+ /* Single-path: direct VTEP IP. */\n+ const struct evpn_binding *binding =\n+ evpn_binding_find(f_ctx_in->bindings, &static_fdb->ip,\n+ static_fdb->vni);\n+ if (!binding) {\n+ return;\n+ }\n+ struct evpn_fdb_path path = {\n+ .binding_key = binding->binding_key,\n+ .weight = 0,\n+ };\n+ vector_push(paths, &path);\n+ return;\n+ }\n+\n+ /* ECMP: resolve nexthop group to multiple paths. */\n+ const struct nexthop_entry *nhe =\n+ nexthop_entry_find(f_ctx_in->nexthops, static_fdb->nh_id);\n+ if (!nhe) {\n+ VLOG_WARN_RL(&rl, \"Couldn't find nexthop %\"PRIu32\" for \"\n+ ETH_ADDR_FMT\" MAC address.\",\n+ static_fdb->nh_id, ETH_ADDR_ARGS(static_fdb->mac));\n+ return;\n+ }\n+\n+ if (!nhe->n_grps) {\n+ VLOG_WARN_RL(&rl, \"Nexthop %\"PRIu32\" for \"\n+ ETH_ADDR_FMT\" MAC address is not a group.\",\n+ static_fdb->nh_id, ETH_ADDR_ARGS(static_fdb->mac));\n+ return;\n+ }\n+\n+ for (size_t i = 0; i < nhe->n_grps; i++) {\n+ const struct nexthop_grp_entry *grp = &nhe->grps[i];\n+ if (!grp->gateway) {\n+ continue;\n+ }\n+\n+ const struct evpn_binding *binding =\n+ evpn_binding_find(f_ctx_in->bindings, &grp->gateway->addr,\n+ static_fdb->vni);\n+ if (!binding) {\n+ VLOG_WARN_RL(&rl, \"Couldn't find EVPN binding for nexthop \"\n+ \"group member %\"PRIu32\" (gateway id %\"PRIu32\").\",\n+ static_fdb->nh_id, grp->id);\n+ continue;\n+ }\n+\n+ struct evpn_fdb_path path = {\n+ .binding_key = binding->binding_key,\n+ .weight = grp->weight,\n+ };\n+ vector_push(paths, &path);\n+ }\n+\n+ /* Sort so that memcmp-based comparison is deterministic. */\n+ vector_qsort(paths, evpn_fdb_path_cmp);\n+}\n+\n+/* Returns true if the paths in 'fdb' match the contents of 'paths'.\n+ * Caller must ensure 'paths' is non-empty (memcmp with NULL is UB). */\n+static bool\n+evpn_fdb_paths_equal(const struct evpn_fdb *fdb,\n+ const struct vector *paths)\n+{\n+ return vector_len(&fdb->paths) == vector_len(paths)\n+ && !memcmp(vector_get_array(&fdb->paths),\n+ vector_get_array(paths),\n+ vector_len(paths) * sizeof(struct evpn_fdb_path));\n+}\n+\n void\n evpn_fdb_run(const struct evpn_fdb_ctx_in *f_ctx_in,\n struct evpn_fdb_ctx_out *f_ctx_out)\n@@ -45,17 +148,30 @@ evpn_fdb_run(const struct evpn_fdb_ctx_in *f_ctx_in,\n hmapx_add(&stale_fdbs, fdb);\n }\n \n+ struct vector paths = VECTOR_EMPTY_INITIALIZER(struct evpn_fdb_path);\n+\n const struct evpn_static_entry *static_fdb;\n HMAP_FOR_EACH (static_fdb, hmap_node, f_ctx_in->static_fdbs) {\n- const struct evpn_binding *binding =\n- evpn_binding_find(f_ctx_in->bindings, &static_fdb->ip,\n- static_fdb->vni);\n- if (!binding) {\n- VLOG_WARN_RL(&rl, \"Couldn't find EVPN binding for \"ETH_ADDR_FMT\" \"\n- \"MAC address.\", ETH_ADDR_ARGS(static_fdb->mac));\n+ vector_clear(&paths);\n+\n+ evpn_fdb_resolve_paths(f_ctx_in, static_fdb, &paths);\n+ if (vector_is_empty(&paths)) {\n+ VLOG_WARN_RL(&rl, \"Couldn't resolve EVPN bindings for \"\n+ ETH_ADDR_FMT\" MAC address.\",\n+ ETH_ADDR_ARGS(static_fdb->mac));\n continue;\n }\n \n+ const struct evpn_datapath *edp =\n+ evpn_datapath_find(f_ctx_in->datapaths, static_fdb->vni);\n+ if (!edp) {\n+ VLOG_WARN_RL(&rl, \"Couldn't find EVPN datapath for VNI %\"PRIu32\n+ \" (\"ETH_ADDR_FMT\" MAC address).\",\n+ static_fdb->vni, ETH_ADDR_ARGS(static_fdb->mac));\n+ continue;\n+ }\n+ uint32_t dp_key = edp->ldp->datapath->tunnel_key;\n+\n fdb = evpn_fdb_find(f_ctx_out->fdbs, static_fdb->mac, static_fdb->vni);\n if (!fdb) {\n fdb = evpn_fdb_add(f_ctx_out->fdbs, static_fdb->mac,\n@@ -63,13 +179,16 @@ evpn_fdb_run(const struct evpn_fdb_ctx_in *f_ctx_in,\n }\n \n bool updated = false;\n- if (fdb->binding_key != binding->binding_key) {\n- fdb->binding_key = binding->binding_key;\n+ if (!evpn_fdb_paths_equal(fdb, &paths)) {\n+ vector_clear(&fdb->paths);\n+ vector_push_array(&fdb->paths,\n+ vector_get_array(&paths),\n+ vector_len(&paths));\n updated = true;\n }\n \n- if (fdb->dp_key != binding->dp_key) {\n- fdb->dp_key = binding->dp_key;\n+ if (fdb->dp_key != dp_key) {\n+ fdb->dp_key = dp_key;\n updated = true;\n }\n \n@@ -80,12 +199,15 @@ evpn_fdb_run(const struct evpn_fdb_ctx_in *f_ctx_in,\n hmapx_find_and_delete(&stale_fdbs, fdb);\n }\n \n+ vector_destroy(&paths);\n+\n struct hmapx_node *node;\n HMAPX_FOR_EACH (node, &stale_fdbs) {\n fdb = node->data;\n \n uuidset_insert(f_ctx_out->removed_fdbs, &fdb->flow_uuid);\n hmap_remove(f_ctx_out->fdbs, &fdb->hmap_node);\n+ vector_destroy(&fdb->paths);\n free(fdb);\n }\n \n@@ -97,6 +219,7 @@ evpn_fdbs_destroy(struct hmap *fdbs)\n {\n struct evpn_fdb *fdb;\n HMAP_FOR_EACH_POP (fdb, hmap_node, fdbs) {\n+ vector_destroy(&fdb->paths);\n free(fdb);\n }\n hmap_destroy(fdbs);\n@@ -112,10 +235,21 @@ evpn_fdb_list(struct unixctl_conn *conn, int argc OVS_UNUSED,\n const struct evpn_fdb *fdb;\n HMAP_FOR_EACH (fdb, hmap_node, fdbs) {\n ds_put_format(&ds, \"UUID: \"UUID_FMT\", MAC: \"ETH_ADDR_FMT\", \"\n- \"vni: %\"PRIu32\", binding_key: %#\"PRIx32\", \"\n- \"dp_key: %\"PRIu32\"\\n\",\n+ \"vni: %\"PRIu32\", dp_key: %\"PRIu32\n+ \", paths: [\",\n UUID_ARGS(&fdb->flow_uuid), ETH_ADDR_ARGS(fdb->mac),\n- fdb->vni, fdb->binding_key, fdb->dp_key);\n+ fdb->vni, fdb->dp_key);\n+\n+ for (size_t i = 0; i < vector_len(&fdb->paths); i++) {\n+ if (i) {\n+ ds_put_cstr(&ds, \", \");\n+ }\n+ struct evpn_fdb_path path =\n+ vector_get(&fdb->paths, i, struct evpn_fdb_path);\n+ ds_put_format(&ds, \"{key=%#\"PRIx32\", weight=%\"PRIu16\"}\",\n+ path.binding_key, path.weight);\n+ }\n+ ds_put_cstr(&ds, \"]\\n\");\n }\n \n unixctl_command_reply(conn, ds_cstr_ro(&ds));\n@@ -130,6 +264,7 @@ evpn_fdb_add(struct hmap *evpn_fdbs, struct eth_addr mac, uint32_t vni)\n .flow_uuid = uuid_random(),\n .mac = mac,\n .vni = vni,\n+ .paths = VECTOR_EMPTY_INITIALIZER(struct evpn_fdb_path),\n };\n \n uint32_t hash = evpn_fdb_hash(&mac, vni);\ndiff --git a/controller/evpn-fdb.h b/controller/evpn-fdb.h\nindex 35c5db040..65e1fc4fd 100644\n--- a/controller/evpn-fdb.h\n+++ b/controller/evpn-fdb.h\n@@ -21,6 +21,7 @@\n #include \"hmapx.h\"\n #include \"openvswitch/hmap.h\"\n #include \"uuidset.h\"\n+#include \"vec.h\"\n \n struct unixctl_conn;\n \n@@ -29,27 +30,41 @@ struct evpn_fdb_ctx_in {\n const struct hmap *bindings;\n /* Contains 'struct evpn_static_entry', one for each FDB. */\n const struct hmap *static_fdbs;\n+ /* Contains 'struct nexthop_entry'. */\n+ const struct hmap *nexthops;\n+ /* Contains 'struct evpn_datapath'. */\n+ const struct hmap *datapaths;\n };\n \n struct evpn_fdb_ctx_out {\n /* Contains 'struct evpn_fdb'. */\n struct hmap *fdbs;\n- /* Contains pointers to 'struct evpn_binding'. */\n+ /* Contains pointers to 'struct evpn_fdb'. */\n struct hmapx *updated_fdbs;\n- /* Contains 'flow_uuid' from removed 'struct evpn_binding'. */\n+ /* Contains 'flow_uuid' from removed 'struct evpn_fdb'. */\n struct uuidset *removed_fdbs;\n };\n \n+struct evpn_fdb_path {\n+ uint32_t binding_key;\n+ /* Nexthop weight from the kernel nexthop group.\n+ * 0 for single-path entries (no ECMP). */\n+ uint16_t weight;\n+ /* Must be zero; memcmp-based equality depends on it. */\n+ uint16_t pad;\n+};\n+\n struct evpn_fdb {\n struct hmap_node hmap_node;\n /* UUID used to identify physical flows related to this FDB. */\n struct uuid flow_uuid;\n- /* IP address of the remote VTEP. */\n+ /* MAC address of the remote workload. */\n struct eth_addr mac;\n uint32_t vni;\n- /* Local tunnel key to identify the binding. */\n- uint32_t binding_key;\n uint32_t dp_key;\n+ /* Contains 'struct evpn_fdb_path', one per ECMP path.\n+ * For single-path entries len == 1. */\n+ struct vector paths;\n };\n \n void evpn_fdb_run(const struct evpn_fdb_ctx_in *, struct evpn_fdb_ctx_out *);\ndiff --git a/controller/ovn-controller.c b/controller/ovn-controller.c\nindex 6f7578582..14279a897 100644\n--- a/controller/ovn-controller.c\n+++ b/controller/ovn-controller.c\n@@ -4641,6 +4641,8 @@ struct ed_type_pflow_output {\n struct ovn_desired_flow_table flow_table;\n /* Drop debugging options. */\n struct physical_debug debug;\n+ /* Shared group table from lflow_output, set during main loop init. */\n+ struct ovn_extend_table *group_table;\n };\n \n static void\n@@ -4784,6 +4786,8 @@ static void init_physical_ctx(struct engine_node *node,\n struct ed_type_evpn_arp *earp_data =\n engine_get_input_data(\"evpn_arp\", node);\n \n+ struct ed_type_pflow_output *pfo = engine_get_internal_data(node);\n+\n parse_encap_ips(ovs_table, &p_ctx->n_encap_ips, &p_ctx->encap_ips);\n p_ctx->sbrec_port_binding_by_name = sbrec_port_binding_by_name;\n p_ctx->sbrec_port_binding_by_datapath = sbrec_port_binding_by_datapath;\n@@ -4808,6 +4812,7 @@ static void init_physical_ctx(struct engine_node *node,\n p_ctx->evpn_multicast_groups = &eb_data->multicast_groups;\n p_ctx->evpn_fdbs = &efdb_data->fdbs;\n p_ctx->evpn_arps = &earp_data->arps;\n+ p_ctx->group_table = pfo->group_table;\n \n struct controller_engine_ctx *ctrl_ctx = engine_get_context()->client_ctx;\n p_ctx->if_mgr = ctrl_ctx->if_mgr;\n@@ -5127,7 +5132,8 @@ pflow_output_fdb_handler(struct engine_node *node, void *data)\n struct ed_type_evpn_fdb *ef_data =\n engine_get_input_data(\"evpn_fdb\", node);\n \n- physical_handle_evpn_fdb_changes(&pfo->flow_table, &ef_data->updated_fdbs,\n+ physical_handle_evpn_fdb_changes(&pfo->flow_table, pfo->group_table,\n+ &ef_data->updated_fdbs,\n &ef_data->removed_fdbs);\n return EN_HANDLED_UPDATED;\n }\n@@ -6712,10 +6718,14 @@ en_evpn_fdb_run(struct engine_node *node, void *data_)\n engine_get_input_data(\"neighbor_exchange\", node);\n const struct ed_type_evpn_vtep_binding *eb_data =\n engine_get_input_data(\"evpn_vtep_binding\", node);\n+ const struct ed_type_nexthop_exchange *nhe_data =\n+ engine_get_input_data(\"nexthop_exchange\", node);\n \n struct evpn_fdb_ctx_in f_ctx_in = {\n .static_fdbs = &ne_data->static_fdbs,\n .bindings = &eb_data->bindings,\n+ .nexthops = &nhe_data->nexthops,\n+ .datapaths = &eb_data->datapaths,\n };\n \n struct evpn_fdb_ctx_out f_ctx_out = {\n@@ -7216,9 +7226,7 @@ inc_proc_ovn_controller_init(\n engine_add_input(&en_evpn_fdb, &en_neighbor_exchange, NULL);\n engine_add_input(&en_evpn_fdb, &en_evpn_vtep_binding,\n evpn_fdb_vtep_binding_handler);\n- /* XXX: This is just a place holder and it will be updated later on. */\n- engine_add_input(&en_evpn_fdb, &en_nexthop_exchange,\n- engine_noop_handler);\n+ engine_add_input(&en_evpn_fdb, &en_nexthop_exchange, NULL);\n \n engine_add_input(&en_evpn_arp, &en_neighbor_exchange, NULL);\n engine_add_input(&en_evpn_arp, &en_evpn_vtep_binding,\n@@ -7646,6 +7654,7 @@ main(int argc, char *argv[])\n struct ovn_extend_table group_table;\n ovn_extend_table_init(&group_table, \"group-table\", 0);\n lflow_output_data->group_table = &group_table;\n+ pflow_output_data->group_table = &group_table;\n \n ofctrl_init(&group_table, &lflow_output_data->meter_table);\n \ndiff --git a/controller/physical.c b/controller/physical.c\nindex 228f3d171..348c55560 100644\n--- a/controller/physical.c\n+++ b/controller/physical.c\n@@ -17,6 +17,7 @@\n #include \"binding.h\"\n #include \"coverage.h\"\n #include \"byte-order.h\"\n+#include \"extend-table.h\"\n #include \"ct-zone.h\"\n #include \"encaps.h\"\n #include \"evpn-binding.h\"\n@@ -54,6 +55,7 @@\n #include \"socket-util.h\"\n #include \"sset.h\"\n #include \"util.h\"\n+#include \"vec.h\"\n #include \"vswitch-idl.h\"\n #include \"hmapx.h\"\n #include \"neighbor-of.h\"\n@@ -3594,7 +3596,9 @@ physical_consider_evpn_multicast(const struct evpn_multicast_group *mc_group,\n \n static void\n physical_consider_evpn_fdb(const struct evpn_fdb *fdb,\n+ struct ovn_extend_table *group_table,\n struct ofpbuf *ofpacts, struct match *match,\n+ struct ds *group_ds,\n struct ovn_desired_flow_table *flow_table)\n {\n /* Static FDB flow. */\n@@ -3604,22 +3608,63 @@ physical_consider_evpn_fdb(const struct evpn_fdb *fdb,\n match_set_metadata(match, htonll(fdb->dp_key));\n match_set_dl_dst(match, fdb->mac);\n \n- put_load(fdb->binding_key, MFF_LOG_REMOTE_OUTPORT, 0, 32, ofpacts);\n+ if (vector_len(&fdb->paths) > 1) {\n+ /* ECMP: create a select group with one bucket per path.\n+ * Each bucket loads its binding_key into\n+ * MFF_LOG_REMOTE_OUTPORT. */\n+ const struct mf_field *mf = mf_from_id(MFF_LOG_REMOTE_OUTPORT);\n+\n+ ds_clear(group_ds);\n+ ds_put_cstr(group_ds, \"type=select,selection_method=dp_hash\");\n+\n+ for (size_t i = 0; i < vector_len(&fdb->paths); i++) {\n+ struct evpn_fdb_path path =\n+ vector_get(&fdb->paths, i, struct evpn_fdb_path);\n+ ds_put_format(group_ds, \",bucket=bucket_id=%\"PRIuSIZE\",\"\n+ \"weight:%\"PRIu16\",actions=load:%\"PRIu32\"->%s[0..%u]\",\n+ i, path.weight, path.binding_key, mf->name,\n+ mf->n_bits - 1);\n+ }\n+\n+ uint32_t group_id = ovn_extend_table_assign_id(group_table,\n+ ds_cstr(group_ds),\n+ fdb->flow_uuid);\n+ if (group_id == EXT_TABLE_ID_INVALID) {\n+ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);\n+ VLOG_WARN_RL(&rl, \"Failed to allocate group ID for ECMP FDB \"\n+ \"entry \"ETH_ADDR_FMT\".\", ETH_ADDR_ARGS(fdb->mac));\n+ return;\n+ }\n+\n+ struct ofpact_group *og = ofpact_put_GROUP(ofpacts);\n+ og->group_id = group_id;\n+ } else {\n+ struct evpn_fdb_path path =\n+ vector_get(&fdb->paths, 0, struct evpn_fdb_path);\n+ put_load(path.binding_key, MFF_LOG_REMOTE_OUTPORT, 0, 32, ofpacts);\n+ }\n+\n ofctrl_add_flow(flow_table, OFTABLE_GET_REMOTE_FDB, 150,\n fdb->flow_uuid.parts[0],\n match, ofpacts, &fdb->flow_uuid);\n \n- /* Prevent dynamic learning if it's already known via static FDB. */\n- ofpbuf_clear(ofpacts);\n- match_init_catchall(match);\n+ /* Prevent dynamic learning if it's already known via static FDB.\n+ * Install one flow per path. */\n+ for (size_t i = 0; i < vector_len(&fdb->paths); i++) {\n+ struct evpn_fdb_path path =\n+ vector_get(&fdb->paths, i, struct evpn_fdb_path);\n \n- match_set_metadata(match, htonll(fdb->dp_key));\n- match_set_reg(match, MFF_LOG_INPORT - MFF_REG0, fdb->binding_key);\n- match_set_dl_src(match, fdb->mac);\n+ ofpbuf_clear(ofpacts);\n+ match_init_catchall(match);\n \n- ofctrl_add_flow(flow_table, OFTABLE_LEARN_REMOTE_FDB, 150,\n- fdb->flow_uuid.parts[0],\n- match, ofpacts, &fdb->flow_uuid);\n+ match_set_metadata(match, htonll(fdb->dp_key));\n+ match_set_reg(match, MFF_LOG_INPORT - MFF_REG0, path.binding_key);\n+ match_set_dl_src(match, fdb->mac);\n+\n+ ofctrl_add_flow(flow_table, OFTABLE_LEARN_REMOTE_FDB, 150,\n+ fdb->flow_uuid.parts[0],\n+ match, ofpacts, &fdb->flow_uuid);\n+ }\n }\n \n static void\n@@ -3677,11 +3722,16 @@ physical_eval_evpn_flows(const struct physical_ctx *ctx,\n }\n evpn_local_ip_map_destroy(&vni_ip_map);\n \n+ struct ds group_ds = DS_EMPTY_INITIALIZER;\n+\n const struct evpn_fdb *fdb;\n HMAP_FOR_EACH (fdb, hmap_node, ctx->evpn_fdbs) {\n- physical_consider_evpn_fdb(fdb, ofpacts, &match, flow_table);\n+ physical_consider_evpn_fdb(fdb, ctx->group_table, ofpacts, &match,\n+ &group_ds, flow_table);\n }\n \n+ ds_destroy(&group_ds);\n+\n const struct evpn_arp *arp;\n HMAP_FOR_EACH (arp, hmap_node, ctx->evpn_arps) {\n physical_consider_evpn_arp(ctx->local_datapaths, arp, flow_table);\n@@ -3845,26 +3895,32 @@ physical_handle_evpn_binding_changes(\n \n void\n physical_handle_evpn_fdb_changes(struct ovn_desired_flow_table *flow_table,\n+ struct ovn_extend_table *group_table,\n const struct hmapx *updated_fdbs,\n const struct uuidset *removed_fdbs)\n {\n struct ofpbuf ofpacts;\n ofpbuf_init(&ofpacts, 0);\n struct match match = MATCH_CATCHALL_INITIALIZER;\n+ struct ds group_ds = DS_EMPTY_INITIALIZER;\n \n const struct hmapx_node *node;\n HMAPX_FOR_EACH (node, updated_fdbs) {\n const struct evpn_fdb *fdb = node->data;\n \n ofctrl_remove_flows(flow_table, &fdb->flow_uuid);\n- physical_consider_evpn_fdb(fdb, &ofpacts, &match, flow_table);\n+ ovn_extend_table_remove_desired(group_table, &fdb->flow_uuid);\n+ physical_consider_evpn_fdb(fdb, group_table, &ofpacts, &match,\n+ &group_ds, flow_table);\n }\n \n+ ds_destroy(&group_ds);\n ofpbuf_uninit(&ofpacts);\n \n const struct uuidset_node *uuidset_node;\n UUIDSET_FOR_EACH (uuidset_node, removed_fdbs) {\n ofctrl_remove_flows(flow_table, &uuidset_node->uuid);\n+ ovn_extend_table_remove_desired(group_table, &uuidset_node->uuid);\n }\n }\n \ndiff --git a/controller/physical.h b/controller/physical.h\nindex c7a33bd02..b02caea88 100644\n--- a/controller/physical.h\n+++ b/controller/physical.h\n@@ -30,6 +30,7 @@\n struct hmap;\n struct ovsdb_idl_index;\n struct ovsrec_bridge;\n+struct ovn_extend_table;\n struct simap;\n struct sbrec_multicast_group_table;\n struct sbrec_port_binding_table;\n@@ -76,6 +77,7 @@ struct physical_ctx {\n const struct hmap *evpn_multicast_groups;\n const struct hmap *evpn_fdbs;\n const struct hmap *evpn_arps;\n+ struct ovn_extend_table *group_table;\n \n /* Set of port binding names that have been already reprocessed during\n * the I-P run. */\n@@ -101,6 +103,7 @@ void physical_handle_evpn_binding_changes(\n const struct uuidset *removed_bindings,\n const struct uuidset *removed_multicast_groups);\n void physical_handle_evpn_fdb_changes(struct ovn_desired_flow_table *,\n+ struct ovn_extend_table *group_table,\n const struct hmapx *updated_fdbs,\n const struct uuidset *removed_fdbs);\n void physical_handle_evpn_arp_changes(const struct hmap *local_datapaths,\ndiff --git a/tests/ovn-inc-proc-graph-dump.at b/tests/ovn-inc-proc-graph-dump.at\nindex 6b4d94835..22f08a063 100644\n--- a/tests/ovn-inc-proc-graph-dump.at\n+++ b/tests/ovn-inc-proc-graph-dump.at\n@@ -418,7 +418,7 @@ digraph \"Incremental-Processing-Engine\" {\n \tevpn_fdb [[style=filled, shape=box, fillcolor=white, label=\"evpn_fdb\"]];\n \tneighbor_exchange -> evpn_fdb [[label=\"\"]];\n \tevpn_vtep_binding -> evpn_fdb [[label=\"evpn_fdb_vtep_binding_handler\"]];\n-\tnexthop_exchange -> evpn_fdb [[label=\"engine_noop_handler\"]];\n+\tnexthop_exchange -> evpn_fdb [[label=\"\"]];\n \tevpn_arp [[style=filled, shape=box, fillcolor=white, label=\"evpn_arp\"]];\n \tneighbor_exchange -> evpn_arp [[label=\"\"]];\n \tevpn_vtep_binding -> evpn_arp [[label=\"evpn_arp_vtep_binding_handler\"]];\ndiff --git a/tests/ovn-macros.at b/tests/ovn-macros.at\nindex 241453df9..2514014fb 100644\n--- a/tests/ovn-macros.at\n+++ b/tests/ovn-macros.at\n@@ -1472,6 +1472,19 @@ netlink_if_index() {\n $ns_prefix ip -o link show dev $1 | awk -F: '{print $1}'\n }\n \n+# Allocate a nexthop ID that is not currently in use by the system.\n+# Prints the allocated ID to stdout.\n+nexthop_alloc() {\n+ for _nh_try in $(shuf -i 1000000-2000000 -n 10); do\n+ if ! ip nexthop show id $_nh_try > /dev/null 2>&1; then\n+ echo $_nh_try\n+ return\n+ fi\n+ done\n+ echo \"Could not allocate a free nexthop ID\"\n+ AT_FAIL_IF([:])\n+}\n+\n OVS_END_SHELL_HELPERS\n \n m4_define([OVN_POPULATE_ARP], [AT_CHECK(ovn_populate_arp__, [0], [ignore])])\ndiff --git a/tests/system-ovn.at b/tests/system-ovn.at\nindex 582ed194b..0f71eb95d 100644\n--- a/tests/system-ovn.at\n+++ b/tests/system-ovn.at\n@@ -18322,10 +18322,10 @@ check bridge fdb add f0:00:0f:16:10:60 dev $VXLAN_NAME dst 169.0.0.20 static ext\n check bridge fdb add f0:00:0f:16:10:70 dev $VXLAN_NAME dst 169.0.0.30 static extern_learn\n \n OVS_WAIT_FOR_OUTPUT_UNQUOTED([ovn-appctl evpn/vtep-fdb-list | cut -d',' -f2- | sort], [0], [dnl\n- MAC: 00:00:00:00:00:01, vni: $vni, binding_key: 0x80000003, dp_key: $dp_key\n- MAC: f0:00:0f:16:10:50, vni: $vni, binding_key: 0x80000001, dp_key: $dp_key\n- MAC: f0:00:0f:16:10:60, vni: $vni, binding_key: 0x80000002, dp_key: $dp_key\n- MAC: f0:00:0f:16:10:70, vni: $vni, binding_key: 0x80000003, dp_key: $dp_key\n+ MAC: 00:00:00:00:00:01, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000003, weight=0}]]\n+ MAC: f0:00:0f:16:10:50, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000001, weight=0}]]\n+ MAC: f0:00:0f:16:10:60, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000002, weight=0}]]\n+ MAC: f0:00:0f:16:10:70, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000003, weight=0}]]\n ])\n \n AT_CHECK_UNQUOTED([ovs-ofctl dump-flows br-int table=OFTABLE_GET_REMOTE_FDB | grep priority | \\\n@@ -18364,6 +18364,122 @@ check diff -q bindings_before bindings_after\n check diff -q mc_groups_before mc_groups_after\n check diff -q fdb_before fdb_after\n \n+AS_BOX([L2 EVPN ECMP FDB (multi-homing)])\n+\n+# Allocate nexthop IDs that are not in use by the system.\n+nh_id1=$(nexthop_alloc)\n+nh_id2=$(nexthop_alloc)\n+nh_grp_id=$(nexthop_alloc)\n+\n+# Create nexthop singletons and a weighted group for ECMP.\n+check ip nexthop add id $nh_id1 via 169.0.0.10 fdb\n+on_exit \"ip nexthop del id $nh_id1\"\n+check ip nexthop add id $nh_id2 via 169.0.0.20 fdb\n+on_exit \"ip nexthop del id $nh_id2\"\n+check ip nexthop add id $nh_grp_id group $nh_id1,100/$nh_id2,200 fdb\n+on_exit \"ip nexthop del id $nh_grp_id\"\n+\n+# Add an ECMP FDB entry using the nexthop group.\n+check bridge fdb add f0:00:0f:16:10:90 dev $VXLAN_NAME nhid $nh_grp_id extern_learn\n+\n+# Verify the ECMP FDB entry has multiple paths with weights.\n+OVS_WAIT_FOR_OUTPUT_UNQUOTED([ovn-appctl evpn/vtep-fdb-list | cut -d',' -f2- | sort], [0], [dnl\n+ MAC: 00:00:00:00:00:01, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000003, weight=0}]]\n+ MAC: f0:00:0f:16:10:50, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000001, weight=0}]]\n+ MAC: f0:00:0f:16:10:60, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000002, weight=0}]]\n+ MAC: f0:00:0f:16:10:70, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000003, weight=0}]]\n+ MAC: f0:00:0f:16:10:90, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000001, weight=100}, {key=0x80000002, weight=200}]]\n+])\n+\n+# Verify OpenFlow: ECMP entry uses a group action, single-path entries\n+# use direct load. Normalize the dynamic group ID for comparison.\n+AT_CHECK_UNQUOTED(\n+ [ovs-ofctl dump-flows br-int table=OFTABLE_GET_REMOTE_FDB | grep priority | \\\n+ awk '{print $[7], $[8]}' | sed 's/group:[[0-9]]*/group:GID/' | sort], [0], [dnl\n+priority=0 actions=load:0->NXM_NX_REG1[[]]\n+priority=150,metadata=0x$dp_key,dl_dst=00:00:00:00:00:01 actions=load:0x80000003->NXM_NX_REG1[[]]\n+priority=150,metadata=0x$dp_key,dl_dst=f0:00:0f:16:10:50 actions=load:0x80000001->NXM_NX_REG1[[]]\n+priority=150,metadata=0x$dp_key,dl_dst=f0:00:0f:16:10:60 actions=load:0x80000002->NXM_NX_REG1[[]]\n+priority=150,metadata=0x$dp_key,dl_dst=f0:00:0f:16:10:70 actions=load:0x80000003->NXM_NX_REG1[[]]\n+priority=150,metadata=0x$dp_key,dl_dst=f0:00:0f:16:10:90 actions=group:GID\n+])\n+\n+# Verify the select group exists with weighted buckets.\n+AT_CHECK_UNQUOTED(\n+ [ovn-appctl group-table-list | \\\n+ sed 's/:[[[:space:]]]*[[0-9]]*$/: GID/'], [0], [dnl\n+type=select,selection_method=dp_hash,bucket=bucket_id=0,weight:100,actions=load:2147483649->reg1[[0..31]],bucket=bucket_id=1,weight:200,actions=load:2147483650->reg1[[0..31]]: GID\n+])\n+\n+# Verify learning suppression flows: two ECMP drop flows added.\n+AT_CHECK_UNQUOTED(\n+ [ovs-ofctl dump-flows br-int table=OFTABLE_LEARN_REMOTE_FDB | grep priority | \\\n+ awk '{print $[7], $[8]}' | strip_cookie | sort], [0], [dnl\n+priority=100,reg14=0x80000001,metadata=0x$dp_key actions=learn(table=OFTABLE_GET_REMOTE_FDB,priority=150,delete_learned,OXM_OF_METADATA[[]],NXM_OF_ETH_DST[[]]=NXM_OF_ETH_SRC[[]],load:NXM_NX_REG14[[]]->NXM_NX_REG1[[]])\n+priority=100,reg14=0x80000002,metadata=0x$dp_key actions=learn(table=OFTABLE_GET_REMOTE_FDB,priority=150,delete_learned,OXM_OF_METADATA[[]],NXM_OF_ETH_DST[[]]=NXM_OF_ETH_SRC[[]],load:NXM_NX_REG14[[]]->NXM_NX_REG1[[]])\n+priority=100,reg14=0x80000003,metadata=0x$dp_key actions=learn(table=OFTABLE_GET_REMOTE_FDB,priority=150,delete_learned,OXM_OF_METADATA[[]],NXM_OF_ETH_DST[[]]=NXM_OF_ETH_SRC[[]],load:NXM_NX_REG14[[]]->NXM_NX_REG1[[]])\n+priority=150,reg14=0x80000001,metadata=0x$dp_key,dl_src=f0:00:0f:16:10:50 actions=drop\n+priority=150,reg14=0x80000001,metadata=0x$dp_key,dl_src=f0:00:0f:16:10:90 actions=drop\n+priority=150,reg14=0x80000002,metadata=0x$dp_key,dl_src=f0:00:0f:16:10:60 actions=drop\n+priority=150,reg14=0x80000002,metadata=0x$dp_key,dl_src=f0:00:0f:16:10:90 actions=drop\n+priority=150,reg14=0x80000003,metadata=0x$dp_key,dl_src=00:00:00:00:00:01 actions=drop\n+priority=150,reg14=0x80000003,metadata=0x$dp_key,dl_src=f0:00:0f:16:10:70 actions=drop\n+])\n+\n+# Update the nexthop group: remove one member.\n+check ip nexthop replace id $nh_grp_id group $nh_id1,100 fdb\n+\n+# Verify the entry reverts to single path.\n+OVS_WAIT_FOR_OUTPUT_UNQUOTED([ovn-appctl evpn/vtep-fdb-list | cut -d',' -f2- | sort], [0], [dnl\n+ MAC: 00:00:00:00:00:01, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000003, weight=0}]]\n+ MAC: f0:00:0f:16:10:50, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000001, weight=0}]]\n+ MAC: f0:00:0f:16:10:60, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000002, weight=0}]]\n+ MAC: f0:00:0f:16:10:70, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000003, weight=0}]]\n+ MAC: f0:00:0f:16:10:90, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000001, weight=100}]]\n+])\n+\n+AT_CHECK_UNQUOTED(\n+ [ovs-ofctl dump-flows br-int table=OFTABLE_GET_REMOTE_FDB | grep priority | \\\n+ awk '{print $[7], $[8]}' | sort], [0], [dnl\n+priority=0 actions=load:0->NXM_NX_REG1[[]]\n+priority=150,metadata=0x$dp_key,dl_dst=00:00:00:00:00:01 actions=load:0x80000003->NXM_NX_REG1[[]]\n+priority=150,metadata=0x$dp_key,dl_dst=f0:00:0f:16:10:50 actions=load:0x80000001->NXM_NX_REG1[[]]\n+priority=150,metadata=0x$dp_key,dl_dst=f0:00:0f:16:10:60 actions=load:0x80000002->NXM_NX_REG1[[]]\n+priority=150,metadata=0x$dp_key,dl_dst=f0:00:0f:16:10:70 actions=load:0x80000003->NXM_NX_REG1[[]]\n+priority=150,metadata=0x$dp_key,dl_dst=f0:00:0f:16:10:90 actions=load:0x80000001->NXM_NX_REG1[[]]\n+])\n+\n+AT_CHECK_UNQUOTED(\n+ [ovs-ofctl dump-flows br-int table=OFTABLE_LEARN_REMOTE_FDB | grep priority | \\\n+ awk '{print $[7], $[8]}' | strip_cookie | sort], [0], [dnl\n+priority=100,reg14=0x80000001,metadata=0x$dp_key actions=learn(table=OFTABLE_GET_REMOTE_FDB,priority=150,delete_learned,OXM_OF_METADATA[[]],NXM_OF_ETH_DST[[]]=NXM_OF_ETH_SRC[[]],load:NXM_NX_REG14[[]]->NXM_NX_REG1[[]])\n+priority=100,reg14=0x80000002,metadata=0x$dp_key actions=learn(table=OFTABLE_GET_REMOTE_FDB,priority=150,delete_learned,OXM_OF_METADATA[[]],NXM_OF_ETH_DST[[]]=NXM_OF_ETH_SRC[[]],load:NXM_NX_REG14[[]]->NXM_NX_REG1[[]])\n+priority=100,reg14=0x80000003,metadata=0x$dp_key actions=learn(table=OFTABLE_GET_REMOTE_FDB,priority=150,delete_learned,OXM_OF_METADATA[[]],NXM_OF_ETH_DST[[]]=NXM_OF_ETH_SRC[[]],load:NXM_NX_REG14[[]]->NXM_NX_REG1[[]])\n+priority=150,reg14=0x80000001,metadata=0x$dp_key,dl_src=f0:00:0f:16:10:50 actions=drop\n+priority=150,reg14=0x80000001,metadata=0x$dp_key,dl_src=f0:00:0f:16:10:90 actions=drop\n+priority=150,reg14=0x80000002,metadata=0x$dp_key,dl_src=f0:00:0f:16:10:60 actions=drop\n+priority=150,reg14=0x80000003,metadata=0x$dp_key,dl_src=00:00:00:00:00:01 actions=drop\n+priority=150,reg14=0x80000003,metadata=0x$dp_key,dl_src=f0:00:0f:16:10:70 actions=drop\n+])\n+\n+# Check recompute stability while ECMP entry is still present.\n+ovn-appctl evpn/vtep-fdb-list > fdb_ecmp_before\n+check ovn-appctl inc-engine/recompute\n+check ovn-nbctl --wait=hv sync\n+ovn-appctl evpn/vtep-fdb-list > fdb_ecmp_after\n+check diff -q fdb_ecmp_before fdb_ecmp_after\n+\n+# Remove the ECMP FDB entry.\n+check bridge fdb del f0:00:0f:16:10:90 dev $VXLAN_NAME nhid $nh_grp_id\n+\n+# Verify the FDB entry is cleaned up.\n+OVS_WAIT_FOR_OUTPUT_UNQUOTED([ovn-appctl evpn/vtep-fdb-list | cut -d',' -f2- | sort], [0], [dnl\n+ MAC: 00:00:00:00:00:01, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000003, weight=0}]]\n+ MAC: f0:00:0f:16:10:50, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000001, weight=0}]]\n+ MAC: f0:00:0f:16:10:60, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000002, weight=0}]]\n+ MAC: f0:00:0f:16:10:70, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000003, weight=0}]]\n+])\n+\n AS_BOX([L2 EVPN FDB advertising])\n \n check ovn-nbctl --wait=hv set logical_switch ls-evpn other_config:dynamic-routing-redistribute=fdb\n@@ -18859,10 +18975,10 @@ check bridge fdb add f0:00:0f:16:10:60 dev $VXLAN_NAME dst 169::20 static extern\n check bridge fdb add f0:00:0f:16:10:70 dev $VXLAN_NAME dst 169::30 static extern_learn\n \n OVS_WAIT_FOR_OUTPUT_UNQUOTED([ovn-appctl evpn/vtep-fdb-list | cut -d',' -f2- | sort], [0], [dnl\n- MAC: 00:00:00:00:00:01, vni: $vni, binding_key: 0x80000003, dp_key: $dp_key\n- MAC: f0:00:0f:16:10:50, vni: $vni, binding_key: 0x80000001, dp_key: $dp_key\n- MAC: f0:00:0f:16:10:60, vni: $vni, binding_key: 0x80000002, dp_key: $dp_key\n- MAC: f0:00:0f:16:10:70, vni: $vni, binding_key: 0x80000003, dp_key: $dp_key\n+ MAC: 00:00:00:00:00:01, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000003, weight=0}]]\n+ MAC: f0:00:0f:16:10:50, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000001, weight=0}]]\n+ MAC: f0:00:0f:16:10:60, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000002, weight=0}]]\n+ MAC: f0:00:0f:16:10:70, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000003, weight=0}]]\n ])\n \n AT_CHECK_UNQUOTED([ovs-ofctl dump-flows br-int table=OFTABLE_GET_REMOTE_FDB | grep priority | \\\n@@ -19426,12 +19542,12 @@ check bridge fdb add f0:00:0f:16:10:70 dev $VXLAN_NAME dst 169.0.0.30 static ext\n check bridge fdb add f0:00:0f:16:10:80 dev $VXLAN_V6_NAME dst 169::30 static extern_learn\n \n OVS_WAIT_FOR_OUTPUT_UNQUOTED([ovn-appctl evpn/vtep-fdb-list | cut -d',' -f2- | sort], [0], [dnl\n- MAC: 00:00:00:00:00:01, vni: $vni, binding_key: 0x80000004, dp_key: $dp_key\n- MAC: 00:00:00:00:00:10, vni: $vni, binding_key: 0x80000005, dp_key: $dp_key\n- MAC: f0:00:0f:16:10:50, vni: $vni, binding_key: 0x80000001, dp_key: $dp_key\n- MAC: f0:00:0f:16:10:60, vni: $vni, binding_key: 0x80000003, dp_key: $dp_key\n- MAC: f0:00:0f:16:10:70, vni: $vni, binding_key: 0x80000004, dp_key: $dp_key\n- MAC: f0:00:0f:16:10:80, vni: $vni, binding_key: 0x80000005, dp_key: $dp_key\n+ MAC: 00:00:00:00:00:01, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000004, weight=0}]]\n+ MAC: 00:00:00:00:00:10, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000005, weight=0}]]\n+ MAC: f0:00:0f:16:10:50, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000001, weight=0}]]\n+ MAC: f0:00:0f:16:10:60, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000003, weight=0}]]\n+ MAC: f0:00:0f:16:10:70, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000004, weight=0}]]\n+ MAC: f0:00:0f:16:10:80, vni: $vni, dp_key: $dp_key, paths: [[{key=0x80000005, weight=0}]]\n ])\n \n AT_CHECK_UNQUOTED([ovs-ofctl dump-flows br-int table=OFTABLE_GET_REMOTE_FDB | grep priority | \\\n", "prefixes": [ "ovs-dev", "7/7" ] }