From patchwork Fri Aug 25 22:51:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yi-Hung Wei X-Patchwork-Id: 806060 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; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="gGealYWM"; dkim-atps=neutral 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 3xfGjv6gwpz9t43 for ; Sat, 26 Aug 2017 08:56:19 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id C0257B16; Fri, 25 Aug 2017 22:51:44 +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 B0EB2ACC for ; Fri, 25 Aug 2017 22:51:37 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pg0-f66.google.com (mail-pg0-f66.google.com [74.125.83.66]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 6C817D4 for ; Fri, 25 Aug 2017 22:51:37 +0000 (UTC) Received: by mail-pg0-f66.google.com with SMTP id t3so1519426pgt.5 for ; Fri, 25 Aug 2017 15:51:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UORwvwxTbflaRxYhi7r9naWAV7L6+2FxiHQEl8xSjUA=; b=gGealYWMPO9UtnlY0P0VeCAl3KymcBS0xv6y3noMk0P/MKWmbi80qd5TEj9F2n7bBd MgTjc19G+5WeJIcLAlrI97I6JCYSawJgZDYpPCR3J0CdMzAXQJvi7r4q46Oo3K2DthgR 9WzKsGz1ZfCHS9qZH00gCMfBiqE7kmW4Y0tLVbmjaOItT8gK8HMr0PSoEqaeUP/gr9Ot ltOZaOoyzhfvZk/Pfez0IMufCePrydXVPT4ln+lvlJixRxCqIw58PKAuiHUYdRyhmjSg fEOGohnoAZVubQPk6o8/CdzLSmWrDWiyxHcn5niBtErLO8wzNWc8nLdmfGvNSj2WQVHm /v9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UORwvwxTbflaRxYhi7r9naWAV7L6+2FxiHQEl8xSjUA=; b=PspIoQI9dEq0RfP1P1u4uDyrNC2iX6AT2UvRVXeV9fIzxaTwI694AJ4lyIOv2Nsplh JDo6Y1ywXSuiV0U/akBDbGTpb62WyPLmWHZ7kyBUqneZDdic/L4EN+KLyuToHqxoGAuQ 42rAQmy7+oX0Q0ls58bl2TSTDfLIP0G2y2bxIBVPLOYAKzZjZ0DIS6B6lBCELjna2FEl Hl12WUzz1RlxKqbdidER0gFMhZmmTuNYGUv4jowKRap8zDjgR3JiBUh+GQgt5CAQlVk4 IyNqvU6+2/fNtCR9GvIy6LWByUK+cKx9yliajc6HDhC5V+dNtnozl04vE5IIpTcdgWAa afCg== X-Gm-Message-State: AHYfb5i1l4XZqDHG+Am/mpRMtiyP/Ij4jf0ffuPIcDuP/dHqs+YYnJK2 ANqdXMpm2TXziU5pPBc= X-Received: by 10.84.210.65 with SMTP id z59mr26971plh.450.1503701496859; Fri, 25 Aug 2017 15:51:36 -0700 (PDT) Received: from vm-01.vmware.com ([208.91.2.1]) by smtp.gmail.com with ESMTPSA id b68sm12678154pfd.33.2017.08.25.15.51.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 25 Aug 2017 15:51:36 -0700 (PDT) From: Yi-Hung Wei To: dev@openvswitch.org Date: Fri, 25 Aug 2017 15:51:18 -0700 Message-Id: <1503701479-43894-9-git-send-email-yihung.wei@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503701479-43894-1-git-send-email-yihung.wei@gmail.com> References: <1503701479-43894-1-git-send-email-yihung.wei@gmail.com> X-Spam-Status: No, score=0.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH 8/9] ofproto/trace: Change delimiter of ct_state in --ct-next 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 This patch changes the delimiter of ct_state in --ct-next from comma or space to vertical bar. The new format will be easier to parse when the --ct-next options support more ct_fields such as ct_mark and ct_label. Signed-off-by: Yi-Hung Wei Reviewed-by: Greg Rose --- ofproto/ofproto-dpif-trace.c | 2 +- ofproto/ofproto-unixctl.man | 6 +++--- tests/ofproto-dpif.at | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ofproto/ofproto-dpif-trace.c b/ofproto/ofproto-dpif-trace.c index 9303ea18c237..d00d41a89cab 100644 --- a/ofproto/ofproto-dpif-trace.c +++ b/ofproto/ofproto-dpif-trace.c @@ -199,7 +199,7 @@ parse_oftrace_options(int argc, const char *argv[], } uint32_t ct_state; - if (!parse_ct_state(argv[++k], 0, ", ", &ct_state, &ds)) { + if (!parse_ct_state(argv[++k], 0, "|", &ct_state, &ds)) { return ds_steal_cstr(&ds); } if (!validate_ct_state(ct_state, &ds)) { diff --git a/ofproto/ofproto-unixctl.man b/ofproto/ofproto-unixctl.man index f511c392b548..abc9481f0faf 100644 --- a/ofproto/ofproto-unixctl.man +++ b/ofproto/ofproto-unixctl.man @@ -55,8 +55,8 @@ wildcards.) \fIbridge\fR names of the bridge through which When the traced flow triggers conntrack actions, \fBofproto/trace\fR will automatically trace the forked packet processing pipeline with user specified ct_state. This option sets the ct_state flags that the -conntrack module will report. The \fIflags\fR must be a comma- or -space-separated list of the following connection tracking flags: +conntrack module will report. The \fIflags\fR must be a vertical +bar separated list of the following connection tracking flags: . .RS .IP \(bu @@ -89,7 +89,7 @@ changed. . .IP When --ct-next is unspecified, or when there are fewer --ct-next options than -ct actions, the \fIflags\fR default to trk,new. +ct actions, the \fIflags\fR default to trk|new. . .RE . diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index c76ea4eee1cc..7353cbd6289a 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -9862,7 +9862,7 @@ AT_CHECK([tail -1 stdout], [0], [Datapath actions: ct(commit,zone=2),4 ]) -AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,tcp' --ct-next 'trk,est' --ct-next 'trk,est' ], [0], [stdout]) +AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,tcp' --ct-next 'trk|est' --ct-next 'trk|est' ], [0], [stdout]) AT_CHECK([tail -1 stdout], [0], [Datapath actions: 3 ])