| Message ID | cover.1775568640.git.tredaelli@redhat.com |
|---|---|
| Headers | show
Return-Path: <ovs-dev-bounces@openvswitch.org> 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=L+4Nuqj5; 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 4fqnHY0S4Vz1yD3 for <incoming@patchwork.ozlabs.org>; Tue, 07 Apr 2026 23:34:49 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 294A160C24; Tue, 7 Apr 2026 13:34:47 +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 PiizZXp98iW9; Tue, 7 Apr 2026 13:34:46 +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=<UNKNOWN> DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 3E4BA606D5 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=L+4Nuqj5 Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id 3E4BA606D5; Tue, 7 Apr 2026 13:34:46 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 20E0DC04FB; Tue, 7 Apr 2026 13:34:46 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 8E5FFC04FA for <dev@openvswitch.org>; Tue, 7 Apr 2026 13:34:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 6EF3780BFE for <dev@openvswitch.org>; Tue, 7 Apr 2026 13:34:44 +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 PEmA9vOXFXKz for <dev@openvswitch.org>; Tue, 7 Apr 2026 13:34:43 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.133.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=tredaelli@redhat.com; receiver=<UNKNOWN> DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 6277A80B89 Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 6277A80B89 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=L+4Nuqj5 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id 6277A80B89 for <dev@openvswitch.org>; Tue, 7 Apr 2026 13:34:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775568882; 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; bh=tCHy49NveOPNXIiW7X5WUilsa6xBD01Aow383gt8Nhs=; b=L+4Nuqj5FoyBla+UxCZSpDU6xCbv+oGsyR1jycBuv6TO6idvOBhS8LldGSJm3Ck5RxoC1S sX/n2RmC3VDJjYgaNqYvaXbD7WlVTP+B5EH7o7yQ6g2HmEk92vBeSRJuD8gA1SHIFsnNjI df9n9bY6TQqeSH5vdGdx2gPiJMMXf2o= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-570-aNZpKifxNOyDnRPqYIy9mg-1; Tue, 07 Apr 2026 09:34:38 -0400 X-MC-Unique: aNZpKifxNOyDnRPqYIy9mg-1 X-Mimecast-MFC-AGG-ID: aNZpKifxNOyDnRPqYIy9mg_1775568878 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id BCAE51955F27; Tue, 7 Apr 2026 13:34:37 +0000 (UTC) Received: from aldebaran.char-dominant.ts.net (unknown [10.44.34.48]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 773CF19560A6; Tue, 7 Apr 2026 13:34:36 +0000 (UTC) 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 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>, <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>, <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> |
| Series |
Add JSON output to several ovs-appctl commands
|
expand
|
This series extends five ovs-appctl commands with structured JSON output via the --format json option: fdb/stats-show, upcall/show, dpif-netdev/pmd-sleep-show, dpif-netdev/pmd-stats-show, and dpctl/show. Changes since v1: - All patches: split the main handler into separate text and JSON helper functions as suggested by Eelco Chaudron. - All patches: use dashes (not underscores) in JSON field names, and full words instead of abbreviations, as suggested by Eelco Chaudron and Ilya Maximets. - All patches: validate the complete pretty-printed JSON output in tests rather than grepping for individual fields, as suggested by Eelco Chaudron. - Patch 1 (fdb/stats-show): use bridge name as the top-level key; group statistics into "entries" and "events" sub-objects, as suggested by Eelco Chaudron and Ilya Maximets. - Patch 2 (upcall/show): use datapath name as the top-level key; group flow counters under "flows"; index revalidators by ID as an object, as suggested by Eelco Chaudron. - Patch 3 (pmd-sleep-show): use "threads" as the container key and thread names (pmd-cXX) as keys, matching the names visible in system tools like "top", as suggested by Ilya Maximets and Eelco Chaudron. Drop the "_id" suffix from field names as suggested by Ilya Maximets. - Patch 4 (pmd-stats-show): use thread names as keys (matching patch 3); group average metrics under an "averages" sub-object, as suggested by Ilya Maximets. - Patch 5 (dpctl/show): use datapath name as the top-level key and port name as port key; use "port-number" field name as suggested by Eelco Chaudron and Ilya Maximets. Make masks, cache, and statistics independent fields (null when unavailable) for a consistent schema regardless of command-line flags, as suggested by Eelco Chaudron. Regarding pmd-perf-show (raised by Ilya Maximets): pmd-stats-show is kept as the lightweight, scripting-friendly command for basic PMD statistics. JSON support for pmd-perf-show, with its histograms, iteration history, and multiple output modes, is planned as a separate follow-up series. Timothy Redaelli (5): ofproto-dpif: Add JSON output to fdb/stats-show. ofproto-dpif-upcall: Add JSON output to upcall/show. dpif-netdev: Add JSON output to pmd-sleep-show. dpif-netdev: Add JSON output to pmd-stats-show. dpctl: Add JSON output to dpctl/show. NEWS | 4 + lib/dpctl.c | 203 +++++++++++++++++++++++++++++++++- lib/dpctl.h | 11 ++ lib/dpif-netdev.c | 173 ++++++++++++++++++++++++++++- ofproto/ofproto-dpif-upcall.c | 94 +++++++++++++--- ofproto/ofproto-dpif.c | 87 +++++++++++---- tests/dpctl.at | 17 +++ tests/ofproto-dpif.at | 44 ++++++++ tests/pmd.at | 92 +++++++++++++++ 9 files changed, 684 insertions(+), 41 deletions(-)