Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2227900/?format=api
{ "id": 2227900, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2227900/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ovn/patch/20260424132342.3486635-3-amusil@redhat.com/", "project": { "id": 68, "url": "http://patchwork.ozlabs.org/api/1.1/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": "" }, "msgid": "<20260424132342.3486635-3-amusil@redhat.com>", "date": "2026-04-24T13:23:37", "name": "[ovs-dev,2/7] controller: Support FDB entries with nexthop ID defined.", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "dff8f26bfce8b64d406169cf06f34887c3482a5e", "submitter": { "id": 83634, "url": "http://patchwork.ozlabs.org/api/1.1/people/83634/?format=api", "name": "Ales Musil", "email": "amusil@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/ovn/patch/20260424132342.3486635-3-amusil@redhat.com/mbox/", "series": [ { "id": 501360, "url": "http://patchwork.ozlabs.org/api/1.1/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/2227900/comments/", "check": "success", "checks": "http://patchwork.ozlabs.org/api/patches/2227900/checks/", "tags": {}, "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=PY7xfoh/;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=140.211.166.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=PY7xfoh/", "smtp1.osuosl.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com", "smtp1.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=PY7xfoh/" ], "Received": [ "from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.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 4g2DFC53Fmz1yD5\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 24 Apr 2026 23:23:59 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id AF77F61B11;\n\tFri, 24 Apr 2026 13:23:57 +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 3AhKyEsZzwdE; Fri, 24 Apr 2026 13:23:55 +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 625E261B08;\n\tFri, 24 Apr 2026 13:23:55 +0000 (UTC)", "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id 3E252C058F;\n\tFri, 24 Apr 2026 13:23:55 +0000 (UTC)", "from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 2A4DAC04FA\n for <dev@openvswitch.org>; Fri, 24 Apr 2026 13:23:53 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by smtp1.osuosl.org (Postfix) with ESMTP id 1CD9D84AC0\n for <dev@openvswitch.org>; Fri, 24 Apr 2026 13:23:53 +0000 (UTC)", "from smtp1.osuosl.org ([127.0.0.1])\n by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id fPAb9MHSdLa0 for <dev@openvswitch.org>;\n Fri, 24 Apr 2026 13:23:52 +0000 (UTC)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by smtp1.osuosl.org (Postfix) with ESMTPS id D71A384AC2\n for <dev@openvswitch.org>; Fri, 24 Apr 2026 13:23:51 +0000 (UTC)", "from mx-prod-mc-08.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-22-Edlq6r68Nv2ZKzabbR0FCQ-1; Fri,\n 24 Apr 2026 09:23:49 -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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 8F0501800366\n for <dev@openvswitch.org>; Fri, 24 Apr 2026 13:23:48 +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 1FB8B180047F; Fri, 24 Apr 2026 13:23:46 +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 625E261B08", "OpenDKIM Filter v2.11.0 smtp1.osuosl.org D71A384AC2" ], "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 smtp1.osuosl.org D71A384AC2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1777037030;\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=XLHNs5lOzzwBrO/vHxIpuuUphqHwtWdNb2m5RdxE68U=;\n b=PY7xfoh/kC8FmIYlx0FUQ/C224+hYSBcsPk/5rwb2lEwOVafHWBbxFTy00gbmgeFwOK/bi\n ODsI2mu8M4sq8mlRkqtnYClqseqqXK+Y6/5QbGzHVqf6ozzbVZbUXIKOQ5tzgTBbkBDMNA\n /OSgfx7EJOuFPKBKS6PTBK8oaKnduz0=", "X-MC-Unique": "Edlq6r68Nv2ZKzabbR0FCQ-1", "X-Mimecast-MFC-AGG-ID": "Edlq6r68Nv2ZKzabbR0FCQ_1777037028", "To": "dev@openvswitch.org", "Date": "Fri, 24 Apr 2026 15:23:37 +0200", "Message-ID": "<20260424132342.3486635-3-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": "D7MaPLxU39FgiJ-bCtYy4YLvkHDfcSPYZ6PydkoGxv0_1777037028", "X-Mimecast-Originator": "redhat.com", "Subject": "[ovs-dev] [PATCH ovn 2/7] controller: Support FDB entries with\n nexthop ID defined.", "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": "FDB entries using a nexthop ID instead of a direct destination\naddress are not parsed. Add NDA_NH_ID support so they can be\nused by the EVPN FDBs.\n\nAssisted-by: Claude Opus 4.6, Claude Code\nSigned-off-by: Ales Musil <amusil@redhat.com>\n---\n controller/neighbor-exchange-netlink.c | 13 +++\n controller/neighbor-exchange-netlink.h | 1 +\n tests/ovn-macros.at | 6 +-\n tests/system-ovn-netlink.at | 121 ++++++++++++++++++++-----\n tests/test-ovn-netlink.c | 10 +-\n 5 files changed, 121 insertions(+), 30 deletions(-)", "diff": "diff --git a/controller/neighbor-exchange-netlink.c b/controller/neighbor-exchange-netlink.c\nindex 812c146f4..9eecf9f5b 100644\n--- a/controller/neighbor-exchange-netlink.c\n+++ b/controller/neighbor-exchange-netlink.c\n@@ -266,12 +266,18 @@ ne_table_parse__(struct ofpbuf *buf, size_t ofs, const struct nlmsghdr *nlmsg,\n [NDA_DST] = { .type = NL_A_U32, .optional = true },\n [NDA_LLADDR] = { .type = NL_A_LL_ADDR, .optional = true },\n [NDA_PORT] = { .type = NL_A_U16, .optional = true },\n+ /* NDA_NH_ID is only used with AF_BRIDGE messages.\n+ * This entry aligns the policy array sizes. */\n+ [NDA_NH_ID] = { .type = NL_A_U32, .optional = true },\n };\n \n static const struct nl_policy policy6[] = {\n [NDA_DST] = { .type = NL_A_IPV6, .optional = true },\n [NDA_LLADDR] = { .type = NL_A_LL_ADDR, .optional = true },\n [NDA_PORT] = { .type = NL_A_U16, .optional = true },\n+ /* NDA_NH_ID is only used with AF_BRIDGE messages.\n+ * This entry aligns the policy array sizes. */\n+ [NDA_NH_ID] = { .type = NL_A_U32, .optional = true },\n };\n \n static const struct nl_policy policy_bridge[] = {\n@@ -281,6 +287,7 @@ ne_table_parse__(struct ofpbuf *buf, size_t ofs, const struct nlmsghdr *nlmsg,\n [NDA_LLADDR] = { .type = NL_A_LL_ADDR, .optional = true },\n [NDA_PORT] = { .type = NL_A_U16, .optional = true },\n [NDA_VLAN] = { .type = NL_A_U16, .optional = true },\n+ [NDA_NH_ID] = { .type = NL_A_U32, .optional = true },\n };\n \n BUILD_ASSERT(ARRAY_SIZE(policy) == ARRAY_SIZE(policy6));\n@@ -345,6 +352,12 @@ ne_table_parse__(struct ofpbuf *buf, size_t ofs, const struct nlmsghdr *nlmsg,\n if (attrs[NDA_VLAN]) {\n change->nd.vlan = nl_attr_get_u16(attrs[NDA_VLAN]);\n }\n+\n+ /* NDA_NH_ID is only present in AF_BRIDGE messages in practice,\n+ * but reading it unconditionally is harmless. */\n+ if (attrs[NDA_NH_ID]) {\n+ change->nd.nh_id = nl_attr_get_u32(attrs[NDA_NH_ID]);\n+ }\n } else {\n VLOG_DBG_RL(&rl, \"received unparseable rtnetlink neigh message\");\n return 0;\ndiff --git a/controller/neighbor-exchange-netlink.h b/controller/neighbor-exchange-netlink.h\nindex 6d907938e..659fe72d8 100644\n--- a/controller/neighbor-exchange-netlink.h\n+++ b/controller/neighbor-exchange-netlink.h\n@@ -40,6 +40,7 @@ struct ne_nl_received_neigh {\n * from linux/neighbour.h. */\n uint8_t type; /* A value out of 'rtm_type' from linux/rtnetlink.h\n * e.g., RTN_UNICAST, RTN_MULTICAST. */\n+ uint32_t nh_id; /* ID of nexthop group if present, 0 otherwise. */\n };\n \n /* A digested version of a neigh message sent down by the kernel to indicate\ndiff --git a/tests/ovn-macros.at b/tests/ovn-macros.at\nindex 39f03ba62..241453df9 100644\n--- a/tests/ovn-macros.at\n+++ b/tests/ovn-macros.at\n@@ -1465,7 +1465,11 @@ ovn_strip_collector_set() {\n }\n \n netlink_if_index() {\n- ip -o link show dev $1 | awk -F: '{print $1}'\n+ local ns_prefix=\n+ if test -n \"$2\"; then\n+ ns_prefix=\"ip netns exec $2\"\n+ fi\n+ $ns_prefix ip -o link show dev $1 | awk -F: '{print $1}'\n }\n \n OVS_END_SHELL_HELPERS\ndiff --git a/tests/system-ovn-netlink.at b/tests/system-ovn-netlink.at\nindex 738800ea7..6bcad017f 100644\n--- a/tests/system-ovn-netlink.at\n+++ b/tests/system-ovn-netlink.at\n@@ -24,9 +24,9 @@ check bridge fdb append 00:00:00:00:00:00 dev vxlan-test \\\n if_index=$(netlink_if_index vxlan-test)\n OVS_WAIT_FOR_OUTPUT_UNQUOTED([ovstest test-ovn-netlink neighbor-sync \\\n bridge $if_index 0 | sort], [0], [dnl\n-Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:00:00 dst=42.42.42.3 port=0\n-Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:00:00 dst=42.42.42.4 port=4790\n-Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:00:02 dst=:: port=0\n+Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:00:00 dst=42.42.42.3 port=0 nh_id=0\n+Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:00:00 dst=42.42.42.4 port=4790 nh_id=0\n+Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:00:02 dst=:: port=0 nh_id=0\n ])\n AT_CLEANUP\n \n@@ -52,8 +52,44 @@ check bridge fdb add 00:00:00:00:00:03 dev vxlan-test \\\n if_index=$(netlink_if_index vxlan-test)\n OVS_WAIT_FOR_OUTPUT_UNQUOTED([ovstest test-ovn-netlink neighbor-sync \\\n bridge $if_index 0 | sort], [0], [dnl\n-Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:00:02 dst=:: port=0\n-Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:00:03 dst=42.42.42.3 port=0\n+Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:00:02 dst=:: port=0 nh_id=0\n+Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:00:03 dst=42.42.42.3 port=0 nh_id=0\n+])\n+\n+dnl Test FDB entries with nexthop group ID (NDA_NH_ID).\n+dnl Use a separate namespace to avoid nexthop ID conflicts.\n+ADD_NAMESPACES(nhid)\n+\n+dnl Bridge setup.\n+NS_EXEC([nhid], [ip link add br-nhid type bridge])\n+NS_EXEC([nhid], [ip link set br-nhid address 00:00:00:00:00:01])\n+NS_EXEC([nhid], [ip link set dev br-nhid up])\n+\n+dnl VXLAN setup.\n+NS_EXEC([nhid], [ip link add vxlan-nhid type vxlan id 42 \\\n+ dstport 4789 local 42.42.42.2 nolearning])\n+NS_EXEC([nhid], [ip link set vxlan-nhid master br-nhid])\n+NS_EXEC([nhid], [ip link set vxlan-nhid address 00:00:00:00:00:02])\n+NS_EXEC([nhid], [ip link set dev vxlan-nhid up])\n+\n+dnl Nexthop setup.\n+NS_EXEC([nhid], [ip nexthop add id 1 via 192.168.1.1 fdb])\n+NS_EXEC([nhid], [ip nexthop add id 10 group 1 fdb])\n+\n+dnl FDB entries.\n+NS_EXEC([nhid], [bridge fdb add 00:00:00:00:00:03 dev vxlan-nhid \\\n+ dst 42.42.42.3 static extern_learn])\n+NS_EXEC([nhid], [bridge fdb add 00:00:00:00:00:04 dev vxlan-nhid nhid 10])\n+\n+nhid_if_index=$(netlink_if_index vxlan-nhid nhid)\n+\n+dnl Verify that nh_id is parsed and reported.\n+OVS_WAIT_FOR_OUTPUT_UNQUOTED(\n+ [ip netns exec nhid ovstest test-ovn-netlink neighbor-sync \\\n+ bridge $nhid_if_index 0 | sort], [0], [dnl\n+Neighbor ifindex=$nhid_if_index vlan=0 eth=00:00:00:00:00:02 dst=:: port=0 nh_id=0\n+Neighbor ifindex=$nhid_if_index vlan=0 eth=00:00:00:00:00:03 dst=42.42.42.3 port=0 nh_id=0\n+Neighbor ifindex=$nhid_if_index vlan=0 eth=00:00:00:00:00:04 dst=:: port=0 nh_id=10\n ])\n AT_CLEANUP\n \n@@ -76,9 +112,9 @@ dnl the L2 multicast ones.\n if_index=$(netlink_if_index lo-test)\n OVS_WAIT_FOR_OUTPUT_UNQUOTED([ovstest test-ovn-netlink neighbor-sync \\\n bridge $if_index 2 00:00:00:00:01:00 00:00:00:00:02:00 | sort], [0], [dnl\n-Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:00:02 dst=:: port=0\n-Neighbor ifindex=$if_index vlan=0 eth=01:00:5e:00:00:01 dst=:: port=0\n-Neighbor ifindex=$if_index vlan=0 eth=33:33:00:00:00:01 dst=:: port=0\n+Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:00:02 dst=:: port=0 nh_id=0\n+Neighbor ifindex=$if_index vlan=0 eth=01:00:5e:00:00:01 dst=:: port=0 nh_id=0\n+Neighbor ifindex=$if_index vlan=0 eth=33:33:00:00:00:01 dst=:: port=0 nh_id=0\n ])\n \n dnl Check that OVN installed its entries (these are always installed\n@@ -98,9 +134,9 @@ check bridge fdb del 00:00:00:00:02:00 dev lo-test master static\n \n OVS_WAIT_FOR_OUTPUT_UNQUOTED([ovstest test-ovn-netlink neighbor-sync \\\n bridge $if_index 2 00:00:00:00:01:00 00:00:00:00:02:00 | sort], [0], [dnl\n-Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:00:02 dst=:: port=0\n-Neighbor ifindex=$if_index vlan=0 eth=01:00:5e:00:00:01 dst=:: port=0\n-Neighbor ifindex=$if_index vlan=0 eth=33:33:00:00:00:01 dst=:: port=0\n+Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:00:02 dst=:: port=0 nh_id=0\n+Neighbor ifindex=$if_index vlan=0 eth=01:00:5e:00:00:01 dst=:: port=0 nh_id=0\n+Neighbor ifindex=$if_index vlan=0 eth=33:33:00:00:00:01 dst=:: port=0 nh_id=0\n ])\n \n OVS_WAIT_FOR_OUTPUT([bridge fdb show dev lo-test | grep static | sort], [0],\n@@ -118,9 +154,9 @@ check bridge fdb add 00:00:00:00:04:00 dev lo-test master static\n \n OVS_WAIT_FOR_OUTPUT_UNQUOTED([ovstest test-ovn-netlink neighbor-sync \\\n bridge $if_index 2 00:00:00:00:01:00 00:00:00:00:02:00 | sort], [0], [dnl\n-Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:00:02 dst=:: port=0\n-Neighbor ifindex=$if_index vlan=0 eth=01:00:5e:00:00:01 dst=:: port=0\n-Neighbor ifindex=$if_index vlan=0 eth=33:33:00:00:00:01 dst=:: port=0\n+Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:00:02 dst=:: port=0 nh_id=0\n+Neighbor ifindex=$if_index vlan=0 eth=01:00:5e:00:00:01 dst=:: port=0 nh_id=0\n+Neighbor ifindex=$if_index vlan=0 eth=33:33:00:00:00:01 dst=:: port=0 nh_id=0\n ])\n \n OVS_WAIT_FOR_OUTPUT([bridge fdb show dev lo-test | grep static | sort], [0],\n@@ -160,7 +196,7 @@ dnl external ones.\n if_index=$(netlink_if_index br-test)\n OVS_WAIT_FOR_OUTPUT_UNQUOTED([ovstest test-ovn-netlink neighbor-sync \\\n inet $if_index 1 00:00:00:00:20:00 20.20.20.20 | sort], [0], [dnl\n-Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:10:00 dst=10.10.10.10 port=0\n+Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:10:00 dst=10.10.10.10 port=0 nh_id=0\n ])\n \n dnl Check that OVN installed its entries (these are always installed\n@@ -172,7 +208,7 @@ dnl Let OVN inject some IPv6 neighbors too and make sure it learnt the\n dnl external ones.\n OVS_WAIT_FOR_OUTPUT_UNQUOTED([ovstest test-ovn-netlink neighbor-sync \\\n inet6 $if_index 1 00:00:00:00:20:00 20::20 | sort], [0], [dnl\n-Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:10:00 dst=10::10 port=0\n+Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:10:00 dst=10::10 port=0 nh_id=0\n ])\n \n dnl Check that OVN installed its entries (these are always installed\n@@ -186,11 +222,11 @@ check ip neigh del dev br-test 20.20.20.20\n check ip -6 neigh del dev br-test 20::20\n OVS_WAIT_FOR_OUTPUT_UNQUOTED([ovstest test-ovn-netlink neighbor-sync \\\n inet $if_index 1 00:00:00:00:20:00 20.20.20.20 | sort], [0], [dnl\n-Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:10:00 dst=10.10.10.10 port=0\n+Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:10:00 dst=10.10.10.10 port=0 nh_id=0\n ])\n OVS_WAIT_FOR_OUTPUT_UNQUOTED([ovstest test-ovn-netlink neighbor-sync \\\n inet6 $if_index 1 00:00:00:00:20:00 20::20 | sort], [0], [dnl\n-Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:10:00 dst=10::10 port=0\n+Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:10:00 dst=10::10 port=0 nh_id=0\n ])\n \n OVN_NEIGH_EQUAL([br-test], [nud noarp], [20.20.20], [dnl\n@@ -207,11 +243,11 @@ check ip -6 neigh add 20::40 \\\n \n OVS_WAIT_FOR_OUTPUT_UNQUOTED([ovstest test-ovn-netlink neighbor-sync \\\n inet $if_index 1 00:00:00:00:20:00 20.20.20.20 | sort], [0], [dnl\n-Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:10:00 dst=10.10.10.10 port=0\n+Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:10:00 dst=10.10.10.10 port=0 nh_id=0\n ])\n OVS_WAIT_FOR_OUTPUT_UNQUOTED([ovstest test-ovn-netlink neighbor-sync \\\n inet6 $if_index 1 00:00:00:00:20:00 20::20 | sort], [0], [dnl\n-Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:10:00 dst=10::10 port=0\n+Neighbor ifindex=$if_index vlan=0 eth=00:00:00:00:10:00 dst=10::10 port=0 nh_id=0\n ])\n \n OVN_NEIGH_EQUAL([br-test], [nud noarp], [20.20.20], [dnl\n@@ -241,13 +277,13 @@ lo_if_index=$(netlink_if_index lo-test)\n dnl Should notify if an entry is added to a bridge port monitored by OVN.\n AT_CHECK_UNQUOTED([ovstest test-ovn-netlink neighbor-table-notify \\\n 'bridge fdb add 00:00:00:00:00:05 dev lo-test'], [0], [dnl\n-Add neighbor ifindex=$lo_if_index vlan=0 eth=00:00:00:00:00:05 dst=:: port=0\n+Add neighbor ifindex=$lo_if_index vlan=0 eth=00:00:00:00:00:05 dst=:: port=0 nh_id=0\n ])\n \n dnl Should notify if an entry is removed from a bridge port monitored by OVN.\n AT_CHECK_UNQUOTED([ovstest test-ovn-netlink neighbor-table-notify \\\n 'bridge fdb del 00:00:00:00:00:05 dev lo-test'], [0], [dnl\n-Delete neighbor ifindex=$lo_if_index vlan=0 eth=00:00:00:00:00:05 dst=:: port=0\n+Delete neighbor ifindex=$lo_if_index vlan=0 eth=00:00:00:00:00:05 dst=:: port=0 nh_id=0\n ])\n \n dnl Should NOT notify if a static entry is added to a bridge port\n@@ -261,7 +297,7 @@ dnl OVN.\n AT_CHECK_UNQUOTED([ovstest test-ovn-netlink neighbor-table-notify \\\n 'ip neigh add 10.10.10.10 lladdr 00:00:00:00:10:00 \\\n dev br-test extern_learn'], [0], [dnl\n-Add neighbor ifindex=$br_if_index vlan=0 eth=00:00:00:00:10:00 dst=10.10.10.10 port=0\n+Add neighbor ifindex=$br_if_index vlan=0 eth=00:00:00:00:10:00 dst=10.10.10.10 port=0 nh_id=0\n ])\n \n dnl Should notify if an entry is removed from a bridge that's monitored by\n@@ -269,8 +305,8 @@ dnl OVN.\n AT_CHECK_UNQUOTED([ovstest test-ovn-netlink neighbor-table-notify \\\n 'ip neigh del 10.10.10.10 lladdr 00:00:00:00:10:00 \\\n dev br-test' | sort], [0], [dnl\n-Add neighbor ifindex=$br_if_index vlan=0 eth=00:00:00:00:00:00 dst=10.10.10.10 port=0\n-Delete neighbor ifindex=$br_if_index vlan=0 eth=00:00:00:00:00:00 dst=10.10.10.10 port=0\n+Add neighbor ifindex=$br_if_index vlan=0 eth=00:00:00:00:00:00 dst=10.10.10.10 port=0 nh_id=0\n+Delete neighbor ifindex=$br_if_index vlan=0 eth=00:00:00:00:00:00 dst=10.10.10.10 port=0 nh_id=0\n ])\n \n dnl Should NOT notify if a noarp entry is added to a bridge port\n@@ -279,6 +315,41 @@ AT_CHECK_UNQUOTED([ovstest test-ovn-netlink neighbor-table-notify \\\n 'ip neigh add 20.20.20.20 lladdr 00:00:00:00:20:00 \\\n dev br-test nud noarp'], [0], [dnl\n ])\n+\n+dnl Test NDA_NH_ID in notifications.\n+dnl Use a separate namespace to avoid nexthop ID conflicts.\n+ADD_NAMESPACES(nhid)\n+\n+dnl Bridge setup.\n+NS_EXEC([nhid], [ip link add br-nhid type bridge])\n+NS_EXEC([nhid], [ip link set br-nhid address 00:00:00:00:00:01])\n+NS_EXEC([nhid], [ip link set dev br-nhid up])\n+\n+dnl VXLAN setup.\n+NS_EXEC([nhid], [ip link add vxlan-nhid type vxlan id 42 \\\n+ dstport 4789 local 42.42.42.2 nolearning])\n+NS_EXEC([nhid], [ip link set vxlan-nhid master br-nhid])\n+NS_EXEC([nhid], [ip link set dev vxlan-nhid up])\n+\n+dnl Nexthop setup.\n+NS_EXEC([nhid], [ip nexthop add id 1 via 192.168.1.1 fdb])\n+NS_EXEC([nhid], [ip nexthop add id 10 group 1 fdb])\n+\n+nhid_if_index=$(netlink_if_index vxlan-nhid nhid)\n+\n+dnl Should notify with nh_id when FDB entry with nhid is added.\n+AT_CHECK_UNQUOTED(\n+ [ip netns exec nhid ovstest test-ovn-netlink neighbor-table-notify \\\n+ 'bridge fdb add 00:00:00:00:00:07 dev vxlan-nhid nhid 10'], [0], [dnl\n+Add neighbor ifindex=$nhid_if_index vlan=0 eth=00:00:00:00:00:07 dst=:: port=0 nh_id=10\n+])\n+\n+dnl Should notify with nh_id when FDB entry with nhid is deleted.\n+AT_CHECK_UNQUOTED(\n+ [ip netns exec nhid ovstest test-ovn-netlink neighbor-table-notify \\\n+ 'bridge fdb del 00:00:00:00:00:07 dev vxlan-nhid nhid 10'], [0], [dnl\n+Delete neighbor ifindex=$nhid_if_index vlan=0 eth=00:00:00:00:00:07 dst=:: port=0 nh_id=10\n+])\n AT_CLEANUP\n \n AT_SETUP([netlink - host-if-monitor])\ndiff --git a/tests/test-ovn-netlink.c b/tests/test-ovn-netlink.c\nindex 45880e3b4..bea269b5e 100644\n--- a/tests/test-ovn-netlink.c\n+++ b/tests/test-ovn-netlink.c\n@@ -95,10 +95,11 @@ test_neighbor_sync(struct ovs_cmdl_context *ctx)\n VECTOR_FOR_EACH_PTR (&received_neighbors, ne) {\n char addr_s[INET6_ADDRSTRLEN + 1];\n printf(\"Neighbor ifindex=%\"PRId32\" vlan=%\"PRIu16\" \"\n- \"eth=\" ETH_ADDR_FMT \" dst=%s port=%\"PRIu16\"\\n\",\n+ \"eth=\" ETH_ADDR_FMT \" dst=%s port=%\"PRIu16\" \"\n+ \"nh_id=%\"PRIu32\"\\n\",\n ne->if_index, ne->vlan, ETH_ADDR_ARGS(ne->lladdr),\n ipv6_string_mapped(addr_s, &ne->addr) ? addr_s : \"(invalid)\",\n- ne->port);\n+ ne->port, ne->nh_id);\n }\n \n done:\n@@ -142,13 +143,14 @@ test_neighbor_table_notify(struct ovs_cmdl_context *ctx)\n VECTOR_FOR_EACH_PTR (msgs, msg) {\n char addr_s[INET6_ADDRSTRLEN + 1];\n printf(\"%s neighbor ifindex=%\"PRId32\" vlan=%\"PRIu16\" \"\n- \"eth=\" ETH_ADDR_FMT \" dst=%s port=%\"PRIu16\"\\n\",\n+ \"eth=\" ETH_ADDR_FMT \" dst=%s port=%\"PRIu16\" \"\n+ \"nh_id=%\"PRIu32\"\\n\",\n msg->nlmsg_type == RTM_NEWNEIGH ? \"Add\" : \"Delete\",\n msg->nd.if_index, msg->nd.vlan, ETH_ADDR_ARGS(msg->nd.lladdr),\n ipv6_string_mapped(addr_s, &msg->nd.addr)\n ? addr_s\n : \"(invalid)\",\n- msg->nd.port);\n+ msg->nd.port, msg->nd.nh_id);\n }\n \n ovn_netlink_notifiers_destroy();\n", "prefixes": [ "ovs-dev", "2/7" ] }