{"id":2220546,"url":"http://patchwork.ozlabs.org/api/1.1/covers/2220546/?format=json","web_url":"http://patchwork.ozlabs.org/project/openvswitch/cover/cover.1775568640.git.tredaelli@redhat.com/","project":{"id":47,"url":"http://patchwork.ozlabs.org/api/1.1/projects/47/?format=json","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":"<cover.1775568640.git.tredaelli@redhat.com>","date":"2026-04-07T13:34:24","name":"[ovs-dev,v2,0/5] Add JSON output to several ovs-appctl commands","submitter":{"id":70949,"url":"http://patchwork.ozlabs.org/api/1.1/people/70949/?format=json","name":"Timothy Redaelli","email":"tredaelli@redhat.com"},"mbox":"http://patchwork.ozlabs.org/project/openvswitch/cover/cover.1775568640.git.tredaelli@redhat.com/mbox/","series":[{"id":498985,"url":"http://patchwork.ozlabs.org/api/1.1/series/498985/?format=json","web_url":"http://patchwork.ozlabs.org/project/openvswitch/list/?series=498985","date":"2026-04-07T13:34:24","name":"Add JSON output to several ovs-appctl commands","version":2,"mbox":"http://patchwork.ozlabs.org/series/498985/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/covers/2220546/comments/","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=L+4Nuqj5;\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=L+4Nuqj5","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=L+4Nuqj5"],"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 4fqnHY0S4Vz1yD3\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 07 Apr 2026 23:34:49 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 294A160C24;\n\tTue,  7 Apr 2026 13:34:47 +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 PiizZXp98iW9; Tue,  7 Apr 2026 13:34:46 +0000 (UTC)","from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])\n\tby smtp3.osuosl.org (Postfix) with ESMTPS id 3E4BA606D5;\n\tTue,  7 Apr 2026 13:34:46 +0000 (UTC)","from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id 20E0DC04FB;\n\tTue,  7 Apr 2026 13:34:46 +0000 (UTC)","from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 8E5FFC04FA\n for <dev@openvswitch.org>; Tue,  7 Apr 2026 13:34:44 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n by smtp1.osuosl.org (Postfix) with ESMTP id 6EF3780BFE\n for <dev@openvswitch.org>; Tue,  7 Apr 2026 13:34:44 +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 PEmA9vOXFXKz for <dev@openvswitch.org>;\n Tue,  7 Apr 2026 13:34:43 +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 6277A80B89\n for <dev@openvswitch.org>; Tue,  7 Apr 2026 13:34:43 +0000 (UTC)","from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-570-aNZpKifxNOyDnRPqYIy9mg-1; Tue,\n 07 Apr 2026 09:34:38 -0400","from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12])\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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id BCAE51955F27; Tue,  7 Apr 2026 13:34:37 +0000 (UTC)","from aldebaran.char-dominant.ts.net (unknown [10.44.34.48])\n by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 773CF19560A6; Tue,  7 Apr 2026 13:34:36 +0000 (UTC)"],"X-Virus-Scanned":["amavis at osuosl.org","amavis at osuosl.org"],"X-Comment":"SPF check N/A for local connections - client-ip=140.211.9.56;\n helo=lists.linuxfoundation.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN> ","DKIM-Filter":["OpenDKIM Filter v2.11.0 smtp3.osuosl.org 3E4BA606D5","OpenDKIM Filter v2.11.0 smtp1.osuosl.org 6277A80B89"],"Received-SPF":"Pass (mailfrom) identity=mailfrom; client-ip=170.10.133.124;\n helo=us-smtp-delivery-124.mimecast.com; envelope-from=tredaelli@redhat.com;\n receiver=<UNKNOWN>","DMARC-Filter":"OpenDMARC Filter v1.4.2 smtp1.osuosl.org 6277A80B89","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1775568882;\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 bh=tCHy49NveOPNXIiW7X5WUilsa6xBD01Aow383gt8Nhs=;\n b=L+4Nuqj5FoyBla+UxCZSpDU6xCbv+oGsyR1jycBuv6TO6idvOBhS8LldGSJm3Ck5RxoC1S\n sX/n2RmC3VDJjYgaNqYvaXbD7WlVTP+B5EH7o7yQ6g2HmEk92vBeSRJuD8gA1SHIFsnNjI\n df9n9bY6TQqeSH5vdGdx2gPiJMMXf2o=","X-MC-Unique":"aNZpKifxNOyDnRPqYIy9mg-1","X-Mimecast-MFC-AGG-ID":"aNZpKifxNOyDnRPqYIy9mg_1775568878","To":"dev@openvswitch.org","Date":"Tue,  7 Apr 2026 15:34:24 +0200","Message-ID":"<cover.1775568640.git.tredaelli@redhat.com>","MIME-Version":"1.0","X-Scanned-By":"MIMEDefang 3.0 on 10.30.177.12","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"RaljDsuZI9Oca14iIcrLbE618ZUBYVW-HM9WpK80F6Q_1775568878","X-Mimecast-Originator":"redhat.com","Subject":"[ovs-dev] [PATCH v2 0/5] Add JSON output to several ovs-appctl\n commands","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":"Timothy Redaelli via dev <ovs-dev@openvswitch.org>","Reply-To":"Timothy Redaelli <tredaelli@redhat.com>","Cc":"i.maximets@ovn.org","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":"This series extends five ovs-appctl commands with structured JSON output\nvia the --format json option: fdb/stats-show, upcall/show,\ndpif-netdev/pmd-sleep-show, dpif-netdev/pmd-stats-show, and dpctl/show.\n\nChanges since v1:\n  - All patches: split the main handler into separate text and JSON\n    helper functions as suggested by Eelco Chaudron.\n  - All patches: use dashes (not underscores) in JSON field names, and\n    full words instead of abbreviations, as suggested by Eelco Chaudron\n    and Ilya Maximets.\n  - All patches: validate the complete pretty-printed JSON output in\n    tests rather than grepping for individual fields, as suggested by\n    Eelco Chaudron.\n  - Patch 1 (fdb/stats-show): use bridge name as the top-level key;\n    group statistics into \"entries\" and \"events\" sub-objects, as\n    suggested by Eelco Chaudron and Ilya Maximets.\n  - Patch 2 (upcall/show): use datapath name as the top-level key;\n    group flow counters under \"flows\"; index revalidators by ID as an\n    object, as suggested by Eelco Chaudron.\n  - Patch 3 (pmd-sleep-show): use \"threads\" as the container key and\n    thread names (pmd-cXX) as keys, matching the names visible in\n    system tools like \"top\", as suggested by Ilya Maximets and\n    Eelco Chaudron.  Drop the \"_id\" suffix from field names as\n    suggested by Ilya Maximets.\n  - Patch 4 (pmd-stats-show): use thread names as keys (matching\n    patch 3); group average metrics under an \"averages\" sub-object,\n    as suggested by Ilya Maximets.\n  - Patch 5 (dpctl/show): use datapath name as the top-level key and\n    port name as port key; use \"port-number\" field name as suggested\n    by Eelco Chaudron and Ilya Maximets.  Make masks, cache, and\n    statistics independent fields (null when unavailable) for a\n    consistent schema regardless of command-line flags, as suggested\n    by Eelco Chaudron.\n\nRegarding pmd-perf-show (raised by Ilya Maximets): pmd-stats-show is\nkept as the lightweight, scripting-friendly command for basic PMD\nstatistics.  JSON support for pmd-perf-show, with its histograms,\niteration history, and multiple output modes, is planned as a separate\nfollow-up series.\n\nTimothy Redaelli (5):\n  ofproto-dpif: Add JSON output to fdb/stats-show.\n  ofproto-dpif-upcall: Add JSON output to upcall/show.\n  dpif-netdev: Add JSON output to pmd-sleep-show.\n  dpif-netdev: Add JSON output to pmd-stats-show.\n  dpctl: Add JSON output to dpctl/show.\n\n NEWS                          |   4 +\n lib/dpctl.c                   | 203 +++++++++++++++++++++++++++++++++-\n lib/dpctl.h                   |  11 ++\n lib/dpif-netdev.c             | 173 ++++++++++++++++++++++++++++-\n ofproto/ofproto-dpif-upcall.c |  94 +++++++++++++---\n ofproto/ofproto-dpif.c        |  87 +++++++++++----\n tests/dpctl.at                |  17 +++\n tests/ofproto-dpif.at         |  44 ++++++++\n tests/pmd.at                  |  92 +++++++++++++++\n 9 files changed, 684 insertions(+), 41 deletions(-)"}