From patchwork Fri Aug 19 00:25:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesse Gross X-Patchwork-Id: 660598 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3sFkKR2fRcz9t24 for ; Fri, 19 Aug 2016 10:26:19 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 6AE9610B97; Thu, 18 Aug 2016 17:26:18 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e4.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id EEEF410B94 for ; Thu, 18 Aug 2016 17:26:16 -0700 (PDT) Received: from bar5.cudamail.com (unknown [192.168.21.12]) by mx1e4.cudamail.com (Postfix) with ESMTPS id 7DA021E00C4 for ; Thu, 18 Aug 2016 18:26:16 -0600 (MDT) X-ASG-Debug-ID: 1471566375-09eadd4c6778be0001-byXFYA Received: from mx1-pf2.cudamail.com ([192.168.24.2]) by bar5.cudamail.com with ESMTP id aQ0R0GZ7ebu978RM (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 18 Aug 2016 18:26:16 -0600 (MDT) X-Barracuda-Envelope-From: jesse@kernel.org X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.2 Received: from unknown (HELO mail.kernel.org) (198.145.29.136) by mx1-pf2.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 19 Aug 2016 00:26:15 -0000 Received-SPF: none (mx1-pf2.cudamail.com: domain at kernel.org does not designate permitted sender hosts) X-Barracuda-Apparent-Source-IP: 198.145.29.136 X-Barracuda-RBL-IP: 198.145.29.136 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9BE0E200F0 for ; Fri, 19 Aug 2016 00:26:14 +0000 (UTC) Received: from localhost.localdomain (c-71-202-123-143.hsd1.ca.comcast.net [71.202.123.143]) (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A004020454 for ; Fri, 19 Aug 2016 00:26:13 +0000 (UTC) X-CudaMail-Envelope-Sender: jesse@kernel.org From: Jesse Gross To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-E2-817080330 X-CudaMail-DTE: 081816 X-CudaMail-Originating-IP: 198.145.29.136 Date: Thu, 18 Aug 2016 17:25:25 -0700 X-ASG-Orig-Subj: [##CM-E2-817080330##][PATCH] match: Only print external tunnel flags. Message-Id: <1471566325-113956-1-git-send-email-jesse@kernel.org> X-Mailer: git-send-email 2.7.4 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP X-Barracuda-Connect: UNKNOWN[192.168.24.2] X-Barracuda-Start-Time: 1471566376 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Subject: [ovs-dev] [PATCH] match: Only print external tunnel flags. X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" Some tunnel flags are purely internal implementation details (primarily FLOW_TNL_F_UDPIF). These shouldn't be output when we format tunnel flows, so this masks them out. Signed-off-by: Jesse Gross Acked-by: Ben Pfaff --- lib/match.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/match.c b/lib/match.c index d5deb7d..d78e6a1 100644 --- a/lib/match.c +++ b/lib/match.c @@ -1035,9 +1035,9 @@ format_flow_tunnel(struct ds *s, const struct match *match) if (wc->masks.tunnel.ip_ttl) { ds_put_format(s, "tun_ttl=%"PRIu8",", tnl->ip_ttl); } - if (wc->masks.tunnel.flags) { + if (wc->masks.tunnel.flags & FLOW_TNL_F_MASK) { format_flags_masked(s, "tun_flags", flow_tun_flag_to_string, - tnl->flags, + tnl->flags & FLOW_TNL_F_MASK, wc->masks.tunnel.flags & FLOW_TNL_F_MASK, FLOW_TNL_F_MASK); ds_put_char(s, ',');