From patchwork Thu Jun 14 19:00:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Pettit X-Patchwork-Id: 929634 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 416Cd464Rrz9s19 for ; Fri, 15 Jun 2018 05:00:56 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 169ECE2E; Thu, 14 Jun 2018 19:00:54 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 44F3CDE1 for ; Thu, 14 Jun 2018 19:00:52 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id ACFFD6AA for ; Thu, 14 Jun 2018 19:00:51 +0000 (UTC) Received: from ubuntu-ct.localdomain (unknown [195.50.135.69]) (Authenticated sender: jpettit@ovn.org) by relay12.mail.gandi.net (Postfix) with ESMTPSA id D7FF0200007 for ; Thu, 14 Jun 2018 19:00:49 +0000 (UTC) From: Justin Pettit To: dev@openvswitch.org Date: Thu, 14 Jun 2018 12:00:43 -0700 Message-Id: <1529002847-108864-1-git-send-email-jpettit@ovn.org> X-Mailer: git-send-email 2.7.4 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH 1/5] dpctl.man: Correct argument to "dump-flows". X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Signed-off-by: Justin Pettit Acked-by: Ben Pfaff --- lib/dpctl.man | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dpctl.man b/lib/dpctl.man index 50623c4a91b0..3a1716fedb6c 100644 --- a/lib/dpctl.man +++ b/lib/dpctl.man @@ -119,7 +119,7 @@ flow. As an example, \fBfilter='tcp,tp_src=100'\fR will match the datapath flow containing '\fBtcp(src=80/0xff00,dst=8080/0xff)\fR'. .IP If \fBtype=\fItype\fR is specified, only displays flows of a specific type. -\fItype\fR can be \fBoffloaded\fR to display only offloaded rules or \fBOVS\fR +\fItype\fR can be \fBoffloaded\fR to display only offloaded rules or \fBovs\fR to display only non-offloaded rules. By default both offloaded and non-offloaded rules are displayed. . From patchwork Thu Jun 14 19:00:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Pettit X-Patchwork-Id: 929637 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 416Cf95JkQz9s19 for ; Fri, 15 Jun 2018 05:01:53 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id BA1E3E38; Thu, 14 Jun 2018 19:00:55 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id E42D6DE1 for ; Thu, 14 Jun 2018 19:00:52 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id BDB76748 for ; Thu, 14 Jun 2018 19:00:51 +0000 (UTC) Received: from ubuntu-ct.localdomain (unknown [195.50.135.69]) (Authenticated sender: jpettit@ovn.org) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 2EAF1200010 for ; Thu, 14 Jun 2018 19:00:50 +0000 (UTC) From: Justin Pettit To: dev@openvswitch.org Date: Thu, 14 Jun 2018 12:00:44 -0700 Message-Id: <1529002847-108864-2-git-send-email-jpettit@ovn.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1529002847-108864-1-git-send-email-jpettit@ovn.org> References: <1529002847-108864-1-git-send-email-jpettit@ovn.org> X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH 2/5] dpctl: Use common code to open dpif with optional name. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Signed-off-by: Justin Pettit --- lib/dpctl.c | 158 +++++++++++++++--------------------------------------------- 1 file changed, 38 insertions(+), 120 deletions(-) diff --git a/lib/dpctl.c b/lib/dpctl.c index ec8c51e4b0a7..f522785a5f97 100644 --- a/lib/dpctl.c +++ b/lib/dpctl.c @@ -187,6 +187,31 @@ parsed_dpif_open(const char *arg_, bool create, struct dpif **dpifp) return result; } +/* Open a dpif with an optional name argument. + * + * The datapath name is not a mandatory parameter for this command. If + * it is not specified -- so 'argc' < 'max_args' -- we retrieve it from + * the current setup, assuming only one exists. On success stores the + * opened dpif in '*dpif'. */ +static int +opt_dpif_open(int argc, const char *argv[], struct dpctl_params *dpctl_p, + struct dpif **dpif, uint8_t max_args) +{ + int error = 0; + char *dpname = argc >= max_args ? xstrdup(argv[1]) : get_one_dp(dpctl_p); + if (!dpname) { + error = EINVAL; + dpctl_error(dpctl_p, error, "datapath not found"); + } else { + error = parsed_dpif_open(dpname, false, dpif); + free(dpname); + if (error) { + dpctl_error(dpctl_p, error, "opening datapath"); + } + } + return error; +} + static int dpctl_add_dp(int argc, const char *argv[], struct dpctl_params *dpctl_p) @@ -804,7 +829,6 @@ dpctl_dump_flows(int argc, const char *argv[], struct dpctl_params *dpctl_p) { struct dpif *dpif; struct ds ds; - char *name; char *filter = NULL; char *type = NULL; @@ -827,19 +851,8 @@ dpctl_dump_flows(int argc, const char *argv[], struct dpctl_params *dpctl_p) } } - /* The datapath name is not a mandatory parameter for this command. - * If it is not specified - so argc == 1 - we retrieve it from the - * current setup, assuming only one exists. */ - name = (argc > 1) ? xstrdup(argv[1]) : get_one_dp(dpctl_p); - if (!name) { - error = EINVAL; - goto out_free; - } - - error = parsed_dpif_open(name, false, &dpif); - free(name); + error = opt_dpif_open(argc, argv, dpctl_p, &dpif, 2); if (error) { - dpctl_error(dpctl_p, error, "opening datapath"); goto out_free; } @@ -961,21 +974,11 @@ dpctl_put_flow(int argc, const char *argv[], enum dpif_flow_put_flags flags, struct dpif *dpif; ovs_u128 ufid; bool ufid_present; - char *dp_name; struct simap port_names; int n, error; - /* The datapath name is not a mandatory parameter for this command. - * If it is not specified - so argc < 4 - we retrieve it from the - * current setup, assuming only one exists. */ - dp_name = argc == 4 ? xstrdup(argv[1]) : get_one_dp(dpctl_p); - if (!dp_name) { - return EINVAL; - } - error = parsed_dpif_open(dp_name, false, &dpif); - free(dp_name); + error = opt_dpif_open(argc, argv, dpctl_p, &dpif, 4); if (error) { - dpctl_error(dpctl_p, error, "opening datapath"); return error; } @@ -1070,24 +1073,14 @@ dpctl_get_flow(int argc, const char *argv[], struct dpctl_params *dpctl_p) const char *key_s = argv[argc - 1]; struct dpif_flow flow; struct dpif *dpif; - char *dp_name; ovs_u128 ufid; struct ofpbuf buf; uint64_t stub[DPIF_FLOW_BUFSIZE / 8]; struct ds ds; int n, error; - /* The datapath name is not a mandatory parameter for this command. - * If it is not specified - so argc < 3 - we retrieve it from the - * current setup, assuming only one exists. */ - dp_name = argc == 3 ? xstrdup(argv[1]) : get_one_dp(dpctl_p); - if (!dp_name) { - return EINVAL; - } - error = parsed_dpif_open(dp_name, false, &dpif); - free(dp_name); + error = opt_dpif_open(argc, argv, dpctl_p, &dpif, 3); if (error) { - dpctl_error(dpctl_p, error, "opening datapath"); return error; } @@ -1132,21 +1125,11 @@ dpctl_del_flow(int argc, const char *argv[], struct dpctl_params *dpctl_p) struct dpif *dpif; ovs_u128 ufid; bool ufid_present; - char *dp_name; struct simap port_names; int n, error; - /* The datapath name is not a mandatory parameter for this command. - * If it is not specified - so argc < 3 - we retrieve it from the - * current setup, assuming only one exists. */ - dp_name = argc == 3 ? xstrdup(argv[1]) : get_one_dp(dpctl_p); - if (!dp_name) { - return EINVAL; - } - error = parsed_dpif_open(dp_name, false, &dpif); - free(dp_name); + error = opt_dpif_open(argc, argv, dpctl_p, &dpif, 3); if (error) { - dpctl_error(dpctl_p, error, "opening datapath"); return error; } @@ -1213,20 +1196,9 @@ static int dpctl_del_flows(int argc, const char *argv[], struct dpctl_params *dpctl_p) { struct dpif *dpif; - char *name; - int error; - /* The datapath name is not a mandatory parameter for this command. - * If it is not specified - so argc < 2 - we retrieve it from the - * current setup, assuming only one exists. */ - name = (argc == 2) ? xstrdup(argv[1]) : get_one_dp(dpctl_p); - if (!name) { - return EINVAL; - } - error = parsed_dpif_open(name, false, &dpif); - free(name); + int error = opt_dpif_open(argc, argv, dpctl_p, &dpif, 2); if (error) { - dpctl_error(dpctl_p, error, "opening datapath"); return error; } @@ -1268,6 +1240,7 @@ dpctl_list_commands(int argc OVS_UNUSED, const char *argv[] OVS_UNUSED, return 0; } + static int dpctl_dump_conntrack(int argc, const char *argv[], @@ -1278,24 +1251,15 @@ dpctl_dump_conntrack(int argc, const char *argv[], uint16_t zone, *pzone = NULL; int tot_bkts; struct dpif *dpif; - char *name; int error; if (argc > 1 && ovs_scan(argv[argc - 1], "zone=%"SCNu16, &zone)) { pzone = &zone; argc--; } - /* The datapath name is not a mandatory parameter for this command. - * If it is not specified - so argc < 2 - we retrieve it from the - * current setup, assuming only one exists. */ - name = (argc == 2) ? xstrdup(argv[1]) : get_one_dp(dpctl_p); - if (!name) { - return EINVAL; - } - error = parsed_dpif_open(name, false, &dpif); - free(name); + + error = opt_dpif_open(argc, argv, dpctl_p, &dpif, 2); if (error) { - dpctl_error(dpctl_p, error, "opening datapath"); return error; } @@ -1409,8 +1373,6 @@ dpctl_ct_stats_show(int argc, const char *argv[], struct dpctl_params *dpctl_p) { struct dpif *dpif; - char *name; - struct ct_dpif_dump_state *dump; struct ct_dpif_entry cte; uint16_t zone, *pzone = NULL; @@ -1434,18 +1396,9 @@ dpctl_ct_stats_show(int argc, const char *argv[], } } } - /* The datapath name is not a mandatory parameter for this command. - * If it is not specified - so argc == 1 - we retrieve it from the - * current setup, assuming only one exists. */ - name = (argc > 1) ? xstrdup(argv[1]) : get_one_dp(dpctl_p); - if (!name) { - return EINVAL; - } - error = parsed_dpif_open(name, false, &dpif); - free(name); + error = opt_dpif_open(argc, argv, dpctl_p, &dpif, 2); if (error) { - dpctl_error(dpctl_p, error, "opening datapath"); return error; } @@ -1556,8 +1509,6 @@ dpctl_ct_bkts(int argc, const char *argv[], struct dpctl_params *dpctl_p) { struct dpif *dpif; - char *name; - struct ct_dpif_dump_state *dump; struct ct_dpif_entry cte; uint16_t gt = 0; /* Threshold: display value when greater than gt. */ @@ -1571,18 +1522,8 @@ dpctl_ct_bkts(int argc, const char *argv[], } } - /* The datapath name is not a mandatory parameter for this command. - * If it is not specified - so argc < 2 - we retrieve it from the - * current setup, assuming only one exists. */ - name = (argc == 2) ? xstrdup(argv[1]) : get_one_dp(dpctl_p); - if (!name) { - return EINVAL; - } - - error = parsed_dpif_open(name, false, &dpif); - free(name); + error = opt_dpif_open(argc, argv, dpctl_p, &dpif, 2); if (error) { - dpctl_error(dpctl_p, error, "opening datapath"); return error; } @@ -1657,34 +1598,11 @@ dpctl_ct_bkts(int argc, const char *argv[], } static int -dpctl_ct_open_dp(int argc, const char *argv[], - struct dpctl_params *dpctl_p, struct dpif **dpif, - uint8_t max_args) -{ - int error = 0; - /* The datapath name is not a mandatory parameter for this command. - * If it is not specified - so argc < max_args - we retrieve it from the - * current setup, assuming only one exists. */ - char *dpname = argc >= max_args ? xstrdup(argv[1]) : get_one_dp(dpctl_p); - if (!dpname) { - error = EINVAL; - dpctl_error(dpctl_p, error, "datapath not found"); - } else { - error = parsed_dpif_open(dpname, false, dpif); - free(dpname); - if (error) { - dpctl_error(dpctl_p, error, "opening datapath"); - } - } - return error; -} - -static int dpctl_ct_set_maxconns(int argc, const char *argv[], struct dpctl_params *dpctl_p) { struct dpif *dpif; - int error = dpctl_ct_open_dp(argc, argv, dpctl_p, &dpif, 3); + int error = opt_dpif_open(argc, argv, dpctl_p, &dpif, 3); if (!error) { uint32_t maxconns; if (ovs_scan(argv[argc - 1], "%"SCNu32, &maxconns)) { @@ -1710,7 +1628,7 @@ dpctl_ct_get_maxconns(int argc, const char *argv[], struct dpctl_params *dpctl_p) { struct dpif *dpif; - int error = dpctl_ct_open_dp(argc, argv, dpctl_p, &dpif, 2); + int error = opt_dpif_open(argc, argv, dpctl_p, &dpif, 2); if (!error) { uint32_t maxconns; error = ct_dpif_get_maxconns(dpif, &maxconns); @@ -1731,7 +1649,7 @@ dpctl_ct_get_nconns(int argc, const char *argv[], struct dpctl_params *dpctl_p) { struct dpif *dpif; - int error = dpctl_ct_open_dp(argc, argv, dpctl_p, &dpif, 2); + int error = opt_dpif_open(argc, argv, dpctl_p, &dpif, 2); if (!error) { uint32_t nconns; error = ct_dpif_get_nconns(dpif, &nconns); From patchwork Thu Jun 14 19:00:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Pettit X-Patchwork-Id: 929636 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 416CdZ6HdGz9s19 for ; Fri, 15 Jun 2018 05:01:22 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id E6B3AE28; Thu, 14 Jun 2018 19:00:54 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id C0DE9DE1 for ; Thu, 14 Jun 2018 19:00:52 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 2B816754 for ; Thu, 14 Jun 2018 19:00:51 +0000 (UTC) Received: from ubuntu-ct.localdomain (unknown [195.50.135.69]) (Authenticated sender: jpettit@ovn.org) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 8B4BE200011 for ; Thu, 14 Jun 2018 19:00:50 +0000 (UTC) From: Justin Pettit To: dev@openvswitch.org Date: Thu, 14 Jun 2018 12:00:45 -0700 Message-Id: <1529002847-108864-3-git-send-email-jpettit@ovn.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1529002847-108864-1-git-send-email-jpettit@ovn.org> References: <1529002847-108864-1-git-send-email-jpettit@ovn.org> X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH 3/5] dpctl: Prefer "--more" to indicate verbosity for "ct-stats-show". X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org The "ct-stats-show" used the keyword "verbose" to indicate verbosity, but the more standard way in OVS is to use "-m" or "--more". This commit continues to support the keyword method, but adds support for "-m" and "--more" and documents their use. Signed-off-by: Justin Pettit --- lib/dpctl.c | 6 ++++-- lib/dpctl.man | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/dpctl.c b/lib/dpctl.c index f522785a5f97..00f6f9cbead8 100644 --- a/lib/dpctl.c +++ b/lib/dpctl.c @@ -1377,16 +1377,18 @@ dpctl_ct_stats_show(int argc, const char *argv[], struct ct_dpif_entry cte; uint16_t zone, *pzone = NULL; int tot_bkts; - bool verbose = false; int lastargc = 0; int proto_stats[CT_STATS_MAX]; int tcp_conn_per_states[CT_DPIF_TCPS_MAX_NUM]; int error; + bool verbose = dpctl_p->verbosity; + while (argc > 1 && lastargc != argc) { lastargc = argc; if (!strncmp(argv[argc - 1], "verbose", 7)) { + /* Support "verbose" argument for backwards compatibility. */ verbose = true; argc--; } else if (!strncmp(argv[argc - 1], "zone=", 5)) { @@ -1958,7 +1960,7 @@ static const struct dpctl_command all_commands[] = { { "dump-conntrack", "[dp] [zone=N]", 0, 2, dpctl_dump_conntrack, DP_RO }, { "flush-conntrack", "[dp] [zone=N] [ct-tuple]", 0, 3, dpctl_flush_conntrack, DP_RW }, - { "ct-stats-show", "[dp] [zone=N] [verbose]", + { "ct-stats-show", "[dp] [zone=N]", 0, 3, dpctl_ct_stats_show, DP_RO }, { "ct-bkts", "[dp] [gt=N]", 0, 2, dpctl_ct_bkts, DP_RO }, { "ct-set-maxconns", "[dp] maxconns", 1, 2, dpctl_ct_set_maxconns, DP_RW }, diff --git a/lib/dpctl.man b/lib/dpctl.man index 3a1716fedb6c..51c401c31ae9 100644 --- a/lib/dpctl.man +++ b/lib/dpctl.man @@ -240,11 +240,11 @@ An example of an IPv6 TCP \fIct-tuple\fR: "ct_ipv6_src=fc00::1,ct_ipv6_dst=fc00::2,ct_nw_proto=6,ct_tp_src=1,ct_tp_dst=2" . .TP -\*(DX\fBct\-stats\-show\fR [\fIdp\fR] [\fBzone=\fIzone\fR] [\fBverbose\fR] +.DO "[\fB\-m\fR | \fB\-\-more\fR]" "\*(DX\fBct\-stats\-show\fR [\fIdp\fR] [\fBzone=\fIzone\fR]" Displays the number of connections grouped by protocol used by \fIdp\fR. If \fBzone=\fIzone\fR is specified, numbers refer to the connections in -\fBzone\fR. The \fBverbose\fR option allows to group by connection state -for each protocol. +\fBzone\fR. With \fB\-\-more\fR, groups by connection state for each +protocol. . .TP \*(DX\fBct\-bkts\fR [\fIdp\fR] [\fBgt=\fIThreshold\fR] From patchwork Thu Jun 14 19:00:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Pettit X-Patchwork-Id: 929639 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 416CgB0LvBz9s19 for ; Fri, 15 Jun 2018 05:02:46 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id B7BE3E46; Thu, 14 Jun 2018 19:00:57 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 8B95DDE1 for ; Thu, 14 Jun 2018 19:00:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 7B7296AA for ; Thu, 14 Jun 2018 19:00:52 +0000 (UTC) Received: from ubuntu-ct.localdomain (unknown [195.50.135.69]) (Authenticated sender: jpettit@ovn.org) by relay12.mail.gandi.net (Postfix) with ESMTPSA id DF40D200013 for ; Thu, 14 Jun 2018 19:00:50 +0000 (UTC) From: Justin Pettit To: dev@openvswitch.org Date: Thu, 14 Jun 2018 12:00:46 -0700 Message-Id: <1529002847-108864-4-git-send-email-jpettit@ovn.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1529002847-108864-1-git-send-email-jpettit@ovn.org> References: <1529002847-108864-1-git-send-email-jpettit@ovn.org> X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH 4/5] dpctl.man: Some minor cleanups to the dpctl man page. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Signed-off-by: Justin Pettit --- lib/dpctl.man | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/lib/dpctl.man b/lib/dpctl.man index 51c401c31ae9..a6917bd0b29b 100644 --- a/lib/dpctl.man +++ b/lib/dpctl.man @@ -217,7 +217,7 @@ do not apply specifically to one datapath. .DO "[\fB\-m\fR | \fB\-\-more\fR] [\fB\-s\fR | \fB\-\-statistics\fR]" "\*(DX\fBdump\-conntrack\fR" "[\fIdp\fR] [\fBzone=\fIzone\fR]" Prints to the console all the connection entries in the tracker used by \fIdp\fR. If \fBzone=\fIzone\fR is specified, only shows the connections -in \fBzone\fR. With \fB\-\-more\fR, some implementation specific details +in \fIzone\fR. With \fB\-\-more\fR, some implementation specific details are included. With \fB\-\-statistics\fR timeouts and timestamps are added to the output. . @@ -243,33 +243,32 @@ An example of an IPv6 TCP \fIct-tuple\fR: .DO "[\fB\-m\fR | \fB\-\-more\fR]" "\*(DX\fBct\-stats\-show\fR [\fIdp\fR] [\fBzone=\fIzone\fR]" Displays the number of connections grouped by protocol used by \fIdp\fR. If \fBzone=\fIzone\fR is specified, numbers refer to the connections in -\fBzone\fR. With \fB\-\-more\fR, groups by connection state for each +\fIzone\fR. With \fB\-\-more\fR, groups by connection state for each protocol. . .TP -\*(DX\fBct\-bkts\fR [\fIdp\fR] [\fBgt=\fIThreshold\fR] -For each ConnTracker bucket, displays the number of connections used +\*(DX\fBct\-bkts\fR [\fIdp\fR] [\fBgt=\fIthreshold\fR] +For each conntrack bucket, displays the number of connections used by \fIdp\fR. -If \fBgt=\fIThreshold\fR is specified, bucket numbers are displayed when -the number of connections in a bucket is greater than \fIThreshold\fR. +If \fBgt=\fIthreshold\fR is specified, bucket numbers are displayed when +the number of connections in a bucket is greater than \fIthreshold\fR. . .TP -\*(DX\fBct\-set\-maxconns\fR [\fIdp\fR] \fBparam\fR -Set the maximum limit of connection tracker connections. -Can be used to reduce the processing load on the system due to -connection tracking or simply limiting connection tracking. -If the number of connections is already beyond the new maximum limit -request for the number of connections then the new maximum limit will -be enforced when the number of connections decreases to that limit, which -normally happens due to connection expiry. Only supported for userspace -datapath. +\*(DX\fBct\-set\-maxconns\fR [\fIdp\fR] \fImaxconns\fR +Sets the maximum limit of connection tracker entries to \fImaxconns\fR +on \fIdp\fR. This can be used to reduce the processing load on the +system due to connection tracking or simply limiting connection +tracking. If the number of connections is already over the new maximum +limit request then the new maximum limit will be enforced when the +number of connections decreases to that limit, which normally happens +due to connection expiry. Only supported for userspace datapath. . .TP \*(DX\fBct\-get\-maxconns\fR [\fIdp\fR] -Read the maximum limit of connection tracker connections. +Prints the maximum limit of connection tracker entries on \fIdp\fR. Only supported for userspace datapath. . .TP \*(DX\fBct\-get\-nconns\fR [\fIdp\fR] -Read the current number of connection tracker connections. +Prints the current number of connection tracker entries on \fIdp\fR. Only supported for userspace datapath. From patchwork Thu Jun 14 19:00:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Pettit X-Patchwork-Id: 929638 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 416Cfk2nQlz9s19 for ; Fri, 15 Jun 2018 05:02:22 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id AD8D6E42; Thu, 14 Jun 2018 19:00:56 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 6F9A7E18 for ; Thu, 14 Jun 2018 19:00:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id D2E93754 for ; Thu, 14 Jun 2018 19:00:52 +0000 (UTC) Received: from ubuntu-ct.localdomain (unknown [195.50.135.69]) (Authenticated sender: jpettit@ovn.org) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 4D7BA200015 for ; Thu, 14 Jun 2018 19:00:51 +0000 (UTC) From: Justin Pettit To: dev@openvswitch.org Date: Thu, 14 Jun 2018 12:00:47 -0700 Message-Id: <1529002847-108864-5-git-send-email-jpettit@ovn.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1529002847-108864-1-git-send-email-jpettit@ovn.org> References: <1529002847-108864-1-git-send-email-jpettit@ovn.org> X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH 5/5] ovs-dpctl: Remove redundant documentation from man page. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Remove descriptions of options that are already described with the command. These options were not staying current with the commands that supported them. Signed-off-by: Justin Pettit --- utilities/ovs-dpctl.8.in | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/utilities/ovs-dpctl.8.in b/utilities/ovs-dpctl.8.in index f054bd2d78e0..e9cd09177fb6 100644 --- a/utilities/ovs-dpctl.8.in +++ b/utilities/ovs-dpctl.8.in @@ -51,22 +51,6 @@ The following commands manage datapaths. .so lib/dpctl.man . .SH OPTIONS -.IP "\fB\-s\fR" -.IQ "\fB\-\-statistics\fR" -Causes the \fBshow\fR command to print packet and byte counters for -each port within the datapaths that it shows. -. -.IP "\fB\-m\fR" -.IQ "\fB\-\-more\fR" -Increases verbosity of output for \fBdump\-flows\fR and -\fBget\-flow\fR. -. -.IP "\fB\-\-names\fR" -.IQ "\fB\-\-no-names\fR" -Enables or disables showing port names in place of numbers in output -for \fBdump\-flows\fR and \fBget\-flow\fR. By default, names are -shown if at least one \fB\-m\fR or \fB\-\-more\fR is specified. -. .IP "\fB\-t\fR" .IQ "\fB\-\-timeout=\fIsecs\fR" Limits \fBovs\-dpctl\fR runtime to approximately \fIsecs\fR seconds. If