From patchwork Thu Jan 18 09:57:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakob Meng X-Patchwork-Id: 1887842 Return-Path: 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=EOwGUZAq; 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 4TFyqr6T2Pz1yPv for ; Thu, 18 Jan 2024 20:58:31 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 888F261AE8; Thu, 18 Jan 2024 09:58:28 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 888F261AE8 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=EOwGUZAq X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9_XOwLzHuoSV; Thu, 18 Jan 2024 09:58:27 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id 944D861ADA; Thu, 18 Jan 2024 09:58:26 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 944D861ADA Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 67734C0072; Thu, 18 Jan 2024 09:58:26 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7DEF7C0037 for ; Thu, 18 Jan 2024 09:58:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 4B3B24376A for ; Thu, 18 Jan 2024 09:58:24 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 4B3B24376A Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=EOwGUZAq X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BPhmMcdF66dJ for ; Thu, 18 Jan 2024 09:58:22 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id A1D6C437AD for ; Thu, 18 Jan 2024 09:58:22 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org A1D6C437AD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1705571901; 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=42aCMvbyyTCdIzOYmZZOZsOAlHFx9jofJ55corTm74c=; b=EOwGUZAqJh7dzg65vlfx43L4TcpOWELqqqvBXMeD8YoPB17XVZecM2Eu73wLJrk1FzGnvY 1RkCnuP4nlemr1SwIoj+rwRLIQFuFBJY7IFk3TmJCcoVdrow7mJ8D5z4LgQpvfFdCqHqXo OEDPhorRS6TxlQvtSBpx895A7LxoZV4= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-63-6UYdxGc4OiKNMDR46UTB5Q-1; Thu, 18 Jan 2024 04:58:19 -0500 X-MC-Unique: 6UYdxGc4OiKNMDR46UTB5Q-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-40e86ddcee5so13791585e9.2 for ; Thu, 18 Jan 2024 01:58:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705571899; x=1706176699; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=42aCMvbyyTCdIzOYmZZOZsOAlHFx9jofJ55corTm74c=; b=UtpC0icLDURmkSwvL9hCjdtINj0/HfAPUJxUJre7mPDbb2cuRuJNObXPZkrcO72zUU 1elr3xDa0p8Jie4VGutacAJ2C3+YuzwFzP3H1LBxysArnUvYIBgfX45mrTAv9hT7rjcW MKKCXwdssIBLgVGG8NBG6RkXW417vpc5jaY8UtIaxyvK64Dv9RYt+yYcBJdw1tNFoELF wT1nKWTevkmUXW9XuCV8jo6dS40tdXHpO/ZMyE7IXXUmKBD2CO4Pd6jE549NbbThXglj q/qXxDbYqKwGpDOQDdq19At/rhaeX31I5uzPuyO/7JZVV8s56o+iBnGnxxdAgNhHnjQE XGvA== X-Gm-Message-State: AOJu0YzX87h1M/CdCsZqPsSrkfTBd189dVeSuCH3p/0koVOOi25PwPHu DQjzlKXUxVNsYHV5DunYUrc3ZHOzzWN+vsrmx2HZJ06zjxbtRNRyOCTTAe0QW1o48EnFkPB0WdK TEBjULyiaOH0aKXC5A8Q9wfAXrtSA9xjjmU4ypg1Yjy8F9YBSBK5QZtKk6I8koaROIipXOIWIj2 FFEEFkvXBZ2IrNyUnhUq2waTfreZqg X-Received: by 2002:a05:600c:ac3:b0:40e:8f49:d70c with SMTP id c3-20020a05600c0ac300b0040e8f49d70cmr359715wmr.43.1705571898788; Thu, 18 Jan 2024 01:58:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IGvNdeoSIMlGQ/M97qc6qxbrUlSmTrH9NAO0AeT+D8vIf4/N7b+qynfZ+/29TprSGQwpZI/Mw== X-Received: by 2002:a05:600c:ac3:b0:40e:8f49:d70c with SMTP id c3-20020a05600c0ac300b0040e8f49d70cmr359699wmr.43.1705571898454; Thu, 18 Jan 2024 01:58:18 -0800 (PST) Received: from positronik4lide.redhat.com ([87.122.58.78]) by smtp.gmail.com with ESMTPSA id iv11-20020a05600c548b00b0040d8ff79fd8sm25226688wmb.7.2024.01.18.01.58.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 01:58:17 -0800 (PST) From: jmeng@redhat.com To: dev@openvswitch.org, i.maximets@ovn.org, echaudro@redhat.com, ktraynor@redhat.com, aconole@redhat.com, rjarry@redhat.com Date: Thu, 18 Jan 2024 10:57:36 +0100 Message-Id: <20240118095742.731853-1-jmeng@redhat.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH v6 0/6] Add global option to output JSON from ovs-appctl cmds. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" From: Jakob Meng Compared to the previous patch series v5 [0] this v6 fixes missing command callbacks in third patch only, i.e. in ipsec/ovs-monitor-ipsec.in and vtep/ovs-vtep.in. [0] https://patchwork.ozlabs.org/project/openvswitch/list/?series=390829&archive=both&state=* Jakob Meng (6): Add global option for JSON output to ovs-appctl. python: Add global option for JSON output to Python tools. Migrate commands to extended unixctl API. ofproto: Add JSON output for 'dpif/show' command. appctl: Add option '--pretty' for pretty-printing JSON output. appctl: Add tests for unsupported output formats. NEWS | 7 ++ ipsec/ovs-monitor-ipsec.in | 22 ++-- lib/bfd.c | 16 ++- lib/cfm.c | 13 ++- lib/command-line.c | 36 +++++++ lib/command-line.h | 10 ++ lib/coverage.c | 11 +- lib/dpctl.c | 127 +++++++++++++--------- lib/dpctl.h | 4 + lib/dpdk.c | 15 +-- lib/dpif-netdev-perf.c | 1 + lib/dpif-netdev-perf.h | 1 + lib/dpif-netdev.c | 84 +++++++++------ lib/dpif-netlink.c | 6 +- lib/lacp.c | 7 +- lib/memory.c | 5 +- lib/netdev-dpdk.c | 16 ++- lib/netdev-dummy.c | 30 ++++-- lib/netdev-native-tnl.c | 4 +- lib/netdev-native-tnl.h | 4 +- lib/netdev-vport.c | 1 + lib/odp-execute.c | 10 +- lib/ovs-lldp.c | 16 +-- lib/ovs-router.c | 26 +++-- lib/rstp.c | 22 ++-- lib/stopwatch.c | 10 +- lib/stp.c | 20 ++-- lib/timeval.c | 13 ++- lib/tnl-neigh-cache.c | 35 +++--- lib/tnl-ports.c | 6 +- lib/unixctl.c | 133 +++++++++++++++++------ lib/unixctl.h | 11 +- lib/vlog.c | 46 +++++--- ofproto/bond.c | 32 ++++-- ofproto/ofproto-dpif-trace.c | 10 +- ofproto/ofproto-dpif-upcall.c | 81 ++++++++++---- ofproto/ofproto-dpif.c | 187 ++++++++++++++++++++++++++++----- ofproto/ofproto.c | 10 +- ofproto/tunnel.c | 4 +- ovsdb/file.c | 4 +- ovsdb/ovsdb-client.c | 40 ++++--- ovsdb/ovsdb-server.c | 129 +++++++++++++++++------ ovsdb/ovsdb.c | 4 +- ovsdb/raft.c | 28 +++-- python/ovs/unixctl/__init__.py | 19 ++-- python/ovs/unixctl/server.py | 37 ++++++- python/ovs/util.py | 8 ++ python/ovs/vlog.py | 12 ++- tests/appctl.py | 17 +++ tests/pmd.at | 33 ++++++ tests/test-netflow.c | 4 +- tests/test-sflow.c | 4 +- tests/test-unixctl.c | 33 ++++-- tests/test-unixctl.py | 25 +++-- tests/unixctl-py.at | 8 ++ utilities/ovs-appctl.c | 117 ++++++++++++++++++--- utilities/ovs-dpctl.c | 1 + utilities/ovs-ofctl.c | 43 +++++--- vswitchd/bridge.c | 25 +++-- vswitchd/ovs-vswitchd.c | 5 +- vtep/ovs-vtep.in | 5 +- 61 files changed, 1249 insertions(+), 444 deletions(-)