Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2223197/?format=api
{ "id": 2223197, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2223197/?format=api", "web_url": "http://patchwork.ozlabs.org/project/openvswitch/patch/20260414170347.3946810-1-hayatake396@gmail.com/", "project": { "id": 47, "url": "http://patchwork.ozlabs.org/api/1.1/projects/47/?format=api", "name": "Open vSwitch", "link_name": "openvswitch", "list_id": "ovs-dev.openvswitch.org", "list_email": "ovs-dev@openvswitch.org", "web_url": "http://openvswitch.org/", "scm_url": "git@github.com:openvswitch/ovs.git", "webscm_url": "https://github.com/openvswitch/ovs" }, "msgid": "<20260414170347.3946810-1-hayatake396@gmail.com>", "date": "2026-04-14T17:03:45", "name": "[ovs-dev] ofproto-dpif: Allow fdb/show to accept multiple bridges.", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "5f6482d42532b371f2a62f7cdb6af4641774c0c1", "submitter": { "id": 87325, "url": "http://patchwork.ozlabs.org/api/1.1/people/87325/?format=api", "name": "Takeru Hayasaka", "email": "hayatake396@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/openvswitch/patch/20260414170347.3946810-1-hayatake396@gmail.com/mbox/", "series": [ { "id": 499876, "url": "http://patchwork.ozlabs.org/api/1.1/series/499876/?format=api", "web_url": "http://patchwork.ozlabs.org/project/openvswitch/list/?series=499876", "date": "2026-04-14T17:03:45", "name": "[ovs-dev] ofproto-dpif: Allow fdb/show to accept multiple bridges.", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/499876/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2223197/comments/", "check": "fail", "checks": "http://patchwork.ozlabs.org/api/patches/2223197/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\" (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=UIMdZBv5;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)", "smtp4.osuosl.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key)\n header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104\n header.b=UIMdZBv5", "smtp4.osuosl.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com" ], "Received": [ "from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])\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 4fw9bk0HWqz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 15 Apr 2026 03:04:01 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id 2260D42BEC;\n\tTue, 14 Apr 2026 17:04:00 +0000 (UTC)", "from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id yemn-hbdqDI1; Tue, 14 Apr 2026 17:03:59 +0000 (UTC)", "from lists.linuxfoundation.org (lf-lists.osuosl.org\n [IPv6:2605:bc80:3010:104::8cd3:938])\n\tby smtp4.osuosl.org (Postfix) with ESMTPS id E821342B0F;\n\tTue, 14 Apr 2026 17:03:58 +0000 (UTC)", "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id C949EC054A;\n\tTue, 14 Apr 2026 17:03:58 +0000 (UTC)", "from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])\n by lists.linuxfoundation.org (Postfix) with ESMTP id BCAA9C0549\n for <dev@openvswitch.org>; Tue, 14 Apr 2026 17:03:56 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by smtp4.osuosl.org (Postfix) with ESMTP id A2B8842B10\n for <dev@openvswitch.org>; Tue, 14 Apr 2026 17:03:56 +0000 (UTC)", "from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id hebTZ7NmfSyj for <dev@openvswitch.org>;\n Tue, 14 Apr 2026 17:03:56 +0000 (UTC)", "from mail-pf1-x433.google.com (mail-pf1-x433.google.com\n [IPv6:2607:f8b0:4864:20::433])\n by smtp4.osuosl.org (Postfix) with ESMTPS id F239842B0F\n for <dev@openvswitch.org>; Tue, 14 Apr 2026 17:03:55 +0000 (UTC)", "by mail-pf1-x433.google.com with SMTP id\n d2e1a72fcca58-82f41fce3e6so1123575b3a.1\n for <dev@openvswitch.org>; Tue, 14 Apr 2026 10:03:55 -0700 (PDT)", "from lab-kiba-ocxma-dut-01.. (191.68.231.218.rev.ocx2915.net.\n [218.231.68.191]) by smtp.gmail.com with ESMTPSA id\n d2e1a72fcca58-82f0c30ee4bsm16156003b3a.2.2026.04.14.10.03.53\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 14 Apr 2026 10:03:54 -0700 (PDT)" ], "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 smtp4.osuosl.org E821342B0F", "OpenDKIM Filter v2.11.0 smtp4.osuosl.org F239842B0F" ], "Received-SPF": "Pass (mailfrom) identity=mailfrom;\n client-ip=2607:f8b0:4864:20::433; helo=mail-pf1-x433.google.com;\n envelope-from=hayatake396@gmail.com; receiver=<UNKNOWN>", "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp4.osuosl.org F239842B0F", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1776186235; x=1776791035; darn=openvswitch.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=d0mnc5Xr2taprWJbEeAOnqQsFp5zr85eVoL4trzY5lM=;\n b=UIMdZBv55/dbOR6vieCCH4d2RuVH4S+k0rCCEUdC4HoJQtNwCVx3istlfZKHG/SD1w\n 3b90+mA4GP4skZlUAuBFM4ThEsgfCgM5Bm2p3NHWBDJmYC90X3TsKEtovBqaZdh9Mp13\n oPP96Ak09gg7LsJb+hAjNlPzHvL7XR/sSVoSprSLuQBq1Lkg/dBlajuxDQqXsH3Qjn/d\n OsvMNjT212Xvg5pHHZOJPImwLdx0RYCdCKniiKR0BeZ92NLjhRKpfyjUKkLCiURaoqoo\n 1bR2MgyVT0Esduk6A8a7sx5kCQCKTtvnTD/GfOeXYiIfm9f2vHRiVgdze7UwVMlyPIBF\n bL4A==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776186235; x=1776791035;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=d0mnc5Xr2taprWJbEeAOnqQsFp5zr85eVoL4trzY5lM=;\n b=k5MEFT1SSgYulYQHd8pwlYsbvU0HNQ1uqH2PgsCZp/SJKkCz8+1HbmacSv6ySAYMr9\n D8os4HC4h1+eqQm0a35YFvLPwh3v5YmL5epH/14y5+JQW2ONqsGyrs/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 2026 10:03:54 -0700 (PDT)", "From": "Takeru Hayasaka <hayatake396@gmail.com>", "To": "dev@openvswitch.org", "Cc": "Takeru Hayasaka <hayatake396@gmail.com>", "Date": "Tue, 14 Apr 2026 17:03:45 +0000", "Message-ID": "<20260414170347.3946810-1-hayatake396@gmail.com>", "X-Mailer": "git-send-email 2.43.0", "MIME-Version": "1.0", "Subject": "[ovs-dev] [PATCH] ofproto-dpif: Allow fdb/show to accept multiple\n bridges.", "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>", "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": "Previously fdb/show required exactly one bridge argument. This\nchange allows specifying multiple bridge names in a single call,\nreducing the number of unixctl round-trips for clients that need\nto poll FDB entries across many bridges (e.g. EVPN agents managing\nmultiple VNIs).\n\nFor text output, each bridge's output is prefixed with a\n\"bridge <name>\" header line when multiple bridges are specified.\nSingle-bridge output remains unchanged for backward compatibility.\n\nFor JSON output, multiple bridges produce an array of objects\nwith \"bridge\" and \"entries\" keys. Single-bridge output remains\na flat array of FDB entries.\n\nSigned-off-by: Takeru Hayasaka <hayatake396@gmail.com>\n---\n NEWS | 5 +++-\n ofproto/ofproto-dpif.c | 57 ++++++++++++++++++++++++++++++++++--------\n tests/ofproto-dpif.at | 32 ++++++++++++++++++++++++\n 3 files changed, 82 insertions(+), 12 deletions(-)", "diff": "diff --git a/NEWS b/NEWS\nindex 1a3044cbfb2f..88d3ac7dad97 100644\n--- a/NEWS\n+++ b/NEWS\n@@ -3,7 +3,10 @@ Post-v3.7.0\n - Userspace datapath:\n * ARP/ND lookups for native tunnel are now rate limited. The holdout\n timer can be configured with 'tnl/neigh/retrans_time'.\n-\n+ - ovs-appctl:\n+ * \"fdb/show\" now accepts multiple bridge names in a single call,\n+ reducing the number of unixctl round-trips for clients that poll\n+ FDB entries across many bridges.\n \n v3.7.0 - 16 Feb 2026\n --------------------\ndiff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c\nindex a02afe8ef335..ff3fe2cf9ee5 100644\n--- a/ofproto/ofproto-dpif.c\n+++ b/ofproto/ofproto-dpif.c\n@@ -6242,25 +6242,60 @@ done_unlock:\n }\n \n static void\n-ofproto_unixctl_fdb_show(struct unixctl_conn *conn, int argc OVS_UNUSED,\n- const char *argv[] OVS_UNUSED, void *aux OVS_UNUSED)\n+ofproto_unixctl_fdb_show(struct unixctl_conn *conn, int argc,\n+ const char *argv[], void *aux OVS_UNUSED)\n {\n- const struct ofproto_dpif *ofproto = ofproto_dpif_lookup_by_name(argv[1]);\n+ bool multi = argc > 2;\n \n- if (!ofproto) {\n- unixctl_command_reply_error(conn, \"no such bridge\");\n- return;\n+ /* Validate all bridge names up front. */\n+ for (int i = 1; i < argc; i++) {\n+ if (!ofproto_dpif_lookup_by_name(argv[i])) {\n+ unixctl_command_reply_error(conn, \"no such bridge\");\n+ return;\n+ }\n }\n \n if (unixctl_command_get_output_format(conn) == UNIXCTL_OUTPUT_FMT_JSON) {\n- struct json *fdb_entries;\n+ struct json **bridge_entries = xmalloc((argc - 1)\n+ * sizeof *bridge_entries);\n+\n+ for (int i = 1; i < argc; i++) {\n+ const struct ofproto_dpif *ofproto =\n+ ofproto_dpif_lookup_by_name(argv[i]);\n+ struct json *fdb_entries;\n+\n+ ofproto_unixctl_fdb_show_json(ofproto, &fdb_entries);\n+ if (multi) {\n+ struct json *obj = json_object_create();\n \n- ofproto_unixctl_fdb_show_json(ofproto, &fdb_entries);\n- unixctl_command_reply_json(conn, fdb_entries);\n+ json_object_put_string(obj, \"bridge\", argv[i]);\n+ json_object_put(obj, \"entries\", fdb_entries);\n+ bridge_entries[i - 1] = obj;\n+ } else {\n+ bridge_entries[i - 1] = fdb_entries;\n+ }\n+ }\n+\n+ if (multi) {\n+ unixctl_command_reply_json(\n+ conn, json_array_create(bridge_entries, argc - 1));\n+ } else {\n+ unixctl_command_reply_json(conn, bridge_entries[0]);\n+ free(bridge_entries);\n+ }\n } else {\n struct ds ds = DS_EMPTY_INITIALIZER;\n \n- ofproto_unixctl_fdb_show_text(ofproto, &ds);\n+ for (int i = 1; i < argc; i++) {\n+ const struct ofproto_dpif *ofproto =\n+ ofproto_dpif_lookup_by_name(argv[i]);\n+\n+ if (multi) {\n+ ds_put_format(&ds, \"bridge %s\\n\", argv[i]);\n+ }\n+ ofproto_unixctl_fdb_show_text(ofproto, &ds);\n+ }\n+\n unixctl_command_reply(conn, ds_cstr(&ds));\n ds_destroy(&ds);\n }\n@@ -7131,7 +7166,7 @@ ofproto_unixctl_init(void)\n ofproto_unixctl_fdb_delete, NULL);\n unixctl_command_register(\"fdb/flush\", \"[bridge]\", 0, 1,\n ofproto_unixctl_fdb_flush, NULL);\n- unixctl_command_register(\"fdb/show\", \"bridge\", 1, 1,\n+ unixctl_command_register(\"fdb/show\", \"bridge [bridge2] ...\", 1, INT_MAX,\n ofproto_unixctl_fdb_show, NULL);\n unixctl_command_register(\"fdb/stats-clear\", \"[bridge]\", 0, 1,\n ofproto_unixctl_fdb_stats_clear, NULL);\ndiff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at\nindex 39e43d376849..3d8c5fa1e2f4 100644\n--- a/tests/ofproto-dpif.at\n+++ b/tests/ofproto-dpif.at\n@@ -7639,6 +7639,38 @@ AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\\{1,\\}$/?/'], [0], [d\n 5 0 50:54:00:00:00:07 ?\n ])\n \n+# Test fdb/show with multiple bridges.\n+AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 br1 | sed '/^ /s/[[0-9]]\\{1,\\}$/?/'], [0], [dnl\n+bridge br0\n+ port VLAN MAC Age\n+ 2 0 50:54:00:00:00:05 ?\n+bridge br1\n+ port VLAN MAC Age\n+ 5 0 50:54:00:00:00:07 ?\n+])\n+\n+dnl Check json output with multiple bridges.\n+AT_CHECK([ovs-appctl --format json --pretty fdb/show br0 br1 \\\n+ | sed 's/\"age\": [[0-9]]*/\"age\": ?/g'], [0], [dnl\n+[[\n+ {\n+ \"bridge\": \"br0\",\n+ \"entries\": [\n+ {\n+ \"age\": ?,\n+ \"mac\": \"50:54:00:00:00:05\",\n+ \"port\": 2,\n+ \"vlan\": 0}]},\n+ {\n+ \"bridge\": \"br1\",\n+ \"entries\": [\n+ {\n+ \"age\": ?,\n+ \"mac\": \"50:54:00:00:00:07\",\n+ \"port\": 5,\n+ \"vlan\": 0}]}]]\n+])\n+\n OVS_VSWITCHD_STOP\n AT_CLEANUP\n \n", "prefixes": [ "ovs-dev" ] }