From patchwork Wed Nov 25 07:57:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 548422 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (li376-54.members.linode.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 168EC1402A9 for ; Wed, 25 Nov 2015 18:57:17 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b=x0SyTxZ9; dkim-atps=neutral Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id BF2B810B06; Tue, 24 Nov 2015 23:57:16 -0800 (PST) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e3.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 3BB7C10B00 for ; Tue, 24 Nov 2015 23:57:15 -0800 (PST) Received: from bar5.cudamail.com (localhost [127.0.0.1]) by mx1e3.cudamail.com (Postfix) with ESMTPS id B66054200C3 for ; Wed, 25 Nov 2015 00:57:14 -0700 (MST) X-ASG-Debug-ID: 1448438233-09eadd53d23a2a70001-byXFYA Received: from mx1-pf1.cudamail.com ([192.168.24.1]) by bar5.cudamail.com with ESMTP id OWWlrGvWJjCH4m4m (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 25 Nov 2015 00:57:13 -0700 (MST) X-Barracuda-Envelope-From: simon.horman@netronome.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.1 Received: from unknown (HELO mail-pa0-f44.google.com) (209.85.220.44) by mx1-pf1.cudamail.com with ESMTPS (RC4-SHA encrypted); 25 Nov 2015 07:57:12 -0000 Received-SPF: none (mx1-pf1.cudamail.com: domain at netronome.com does not designate permitted sender hosts) X-Barracuda-RBL-Trusted-Forwarder: 209.85.220.44 Received: by pacdm15 with SMTP id dm15so49692774pac.3 for ; Tue, 24 Nov 2015 23:57:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=IJEaIwXWo49xlHH0gGiO4RJiKzkmiloMJMpcF6D8bSQ=; b=x0SyTxZ9uC9GhpY7mAIFpTHAEZfY7RMiMYTq7pvf3vJlPVfTToE9tw5tSeKM98KR/p sH/ovYfA8whVIF7CDq4By+pePonS8q8M5p3gH28yAmYhQTEm8g0WItThIdMrgFvy1m/B r738aeVaLtlZnw3Kc+MDbfu4pLhIoULTA5Xmt3naUwTPAcJifIchv11lO3g2pb1ugH2h NoZNMgSoHyBWzDzUO8GkWNpWZAdDbTcVlbHWKnB4xidTALycV6yz58SJnZ8N/fCaD8zW Jvp/B1AuxgHeoJEGcm+9uUMID9+Vr9worbitTqwYY9KUbZRzsDiLnWllbes10EDmXewl HKHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=IJEaIwXWo49xlHH0gGiO4RJiKzkmiloMJMpcF6D8bSQ=; b=RGrNqtAVEOEiPc2BAo2Eziausaq5j8XmknLVj/pSl23guoCe3vdmf1/foVWMTxYgf6 ENzx0oXiA0BHy8eI/ySkTaKxNz6obgLkJuBt8VxQaPr0YHI2B8i8fYNKqitusm9QF5d1 ulpRbBQpePhrGj41OnWGDgJ31pJfklQOdS+h0qsiIrdcnE70iKzt2b6Wij8hPv6uh2bF 5PHa/E8H0PVIPDAd1Ph7PKY6w+7e/gQVePp1Zo1wMJk431s9ylNnaf7Bd+FcNUPoBj1M xFj16Wj/3mBFQryQM3JMgQASid3QwyDLzBOv782zjkYuL2CZe6bf+yy1dvc2D3MyngXK mv2w== X-Gm-Message-State: ALoCoQmnDT05nJJIomcb8l+YSgeNxFB/L9A2Iautf/YTApoq2hR3FcVP4JL6TPmXb4QtpMtntUkH X-Received: by 10.66.254.39 with SMTP id af7mr49595276pad.43.1448438230626; Tue, 24 Nov 2015 23:57:10 -0800 (PST) Received: from vergenet.net (reginn.isobedori.kobe.vergenet.net. [2001:470:4832:303:d63d:7eff:fe99:ac9d]) by smtp.gmail.com with ESMTPSA id fn4sm19369523pab.46.2015.11.24.23.57.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Nov 2015 23:57:09 -0800 (PST) Date: Wed, 25 Nov 2015 16:57:02 +0900 X-Barracuda-Apparent-Source-IP: 2001:470:4832:303:d63d:7eff:fe99:ac9d X-CudaMail-Envelope-Sender: simon.horman@netronome.com From: Simon Horman To: Ben Pfaff X-CudaMail-MID: CM-E1-1124001564 X-CudaMail-DTE: 112515 X-CudaMail-Originating-IP: 209.85.220.44 Message-ID: <20151125075700.GD2142@vergenet.net> X-ASG-Orig-Subj: [##CM-E1-1124001564##]Re: [ovs-dev] [PATCH] ofp-util: Add "check_overlap" and "reset_counts" to stateful flags. References: <1443552640-22689-1-git-send-email-blp@nicira.com> <20151125072228.GC2142@vergenet.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20151125072228.GC2142@vergenet.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-GBUdb-Analysis: 0, 209.85.220.44, Ugly c=0.480569 p=-0.528302 Source Normal X-MessageSniffer-Rules: 0-0-0-7794-c X-Barracuda-Connect: UNKNOWN[192.168.24.1] X-Barracuda-Start-Time: 1448438233 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.60 X-Barracuda-Spam-Status: No, SCORE=0.60 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=4.0 tests=BSF_RULE_7582B, DKIM_SIGNED, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.24704 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 0.50 BSF_RULE_7582B Custom Rule 7582B 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS Cc: dev@openvswitch.org Subject: Re: [ovs-dev] [PATCH] ofp-util: Add "check_overlap" and "reset_counts" to stateful 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: , Errors-To: dev-bounces@openvswitch.org Sender: "dev" On Wed, Nov 25, 2015 at 04:22:28PM +0900, Simon Horman wrote: > On Tue, Sep 29, 2015 at 11:50:40AM -0700, Ben Pfaff wrote: > > The OpenFlow specification implies that every flag is part of the flow > > state, even though that isn't really meaningful for OFPFF_CHECK_OVERLAP > > or OFPFF_RESET_COUNTS. This commit adds them to the flow state (reported > > in flow stats replies). > > > > Found by OFTest. > > > > Signed-off-by: Ben Pfaff > > Well that is the silliest thing I have seen all day. > Do you know of any plan to resolve this in future Open Flow versions? > > Reviewed-by: Simon Horman Oops, I spoke slightly to soon. I think the test you add is slightly misleading as it seems to me that flags have been exposed since OF1.3 rather than OF1.4. The following incremental change to that test, though verbose, illustrates that. Signed-off-by: Simon Horman diff --git a/tests/ofproto.at b/tests/ofproto.at index bc7a53c7a5e7..30b1cfa90e4d 100644 --- a/tests/ofproto.at +++ b/tests/ofproto.at @@ -842,16 +842,32 @@ AT_CLEANUP AT_SETUP([ofproto - add-flow and flags]) OVS_VSWITCHD_START AT_CHECK([ovs-ofctl -F openflow10 add-flow br0 check_overlap,in_port=1,actions=drop]) -# Prior to OF1.4, flow dumps didn't include a "flags" field. +# Prior to OF1.3, flow dumps didn't include a "flags" field. AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | ofctl_strip], [0], [dnl OFPST_FLOW reply: in_port=1 actions=drop ]) -# OF1.4 makes the flags visible. +AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip], [0], [dnl +OFPST_FLOW reply (OF1.1): + in_port=1 actions=drop +]) +AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip], [0], [dnl +OFPST_FLOW reply (OF1.2): + in_port=1 actions=drop +]) +# OF1.3 makes the flags visible. +AT_CHECK([ovs-ofctl -O OpenFlow13 dump-flows br0 | ofctl_strip], [0], [dnl +OFPST_FLOW reply (OF1.3): + check_overlap reset_counts in_port=1 actions=drop +]) AT_CHECK([ovs-ofctl -O OpenFlow14 dump-flows br0 | ofctl_strip], [0], [dnl OFPST_FLOW reply (OF1.4): check_overlap reset_counts in_port=1 actions=drop ]) +AT_CHECK([ovs-ofctl -O OpenFlow15 dump-flows br0 | ofctl_strip], [0], [dnl +OFPST_FLOW reply (OF1.5): + check_overlap reset_counts in_port=1 actions=drop +]) OVS_VSWITCHD_STOP AT_CLEANUP