From patchwork Fri Apr 28 21:45:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Stringer X-Patchwork-Id: 756608 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.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 3wF6nW6N9vz9s7l for ; Sat, 29 Apr 2017 07:45:51 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id E23E6C17; Fri, 28 Apr 2017 21:45:33 +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 E2B0AC17 for ; Fri, 28 Apr 2017 21:45:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 575BC140 for ; Fri, 28 Apr 2017 21:45:32 +0000 (UTC) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by relay7-d.mail.gandi.net (Postfix) with ESMTPS id 34E23D15 for ; Fri, 28 Apr 2017 23:45:31 +0200 (CEST) Received: from mfilter10-d.gandi.net (mfilter10-d.gandi.net [217.70.178.139]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id 2407EA80CF for ; Fri, 28 Apr 2017 23:45:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter10-d.gandi.net Received: from relay3-d.mail.gandi.net ([IPv6:::ffff:217.70.183.195]) by mfilter10-d.gandi.net (mfilter10-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id 9hCaDToZ3JGj for ; Fri, 28 Apr 2017 23:45:29 +0200 (CEST) X-Originating-IP: 208.91.1.34 Received: from carno.eng.vmware.com (unknown [208.91.1.34]) (Authenticated sender: joe@ovn.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 15B6FA80C2 for ; Fri, 28 Apr 2017 23:45:28 +0200 (CEST) From: Joe Stringer To: dev@openvswitch.org Date: Fri, 28 Apr 2017 14:45:21 -0700 Message-Id: <20170428214521.28320-1-joe@ovn.org> X-Mailer: git-send-email 2.11.1 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_SORBS_SPAM 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] ofp-actions: Document that learn(limit=0) is no limit. 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: Joe Stringer Acked-by: Jarno Rajahalme --- include/openvswitch/ofp-actions.h | 2 +- lib/ofp-actions.c | 3 ++- utilities/ovs-ofctl.8.in | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/openvswitch/ofp-actions.h b/include/openvswitch/ofp-actions.h index e7529bfd61d2..324aac89289d 100644 --- a/include/openvswitch/ofp-actions.h +++ b/include/openvswitch/ofp-actions.h @@ -762,7 +762,7 @@ struct ofpact_learn { uint16_t fin_idle_timeout; /* Idle timeout after FIN, if nonzero. */ uint16_t fin_hard_timeout; /* Hard timeout after FIN, if nonzero. */ /* If the number of flows on 'table_id' with 'cookie' exceeds this, - * the action will not add a new flow. */ + * the action will not add a new flow. 0 indicates unlimited. */ uint32_t limit; /* Used only if 'flags' has NX_LEARN_F_WRITE_RESULT. If the execution * failed to install a new flow because 'limit' is exceeded, diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c index be8cc20fdfd5..61e98601f117 100644 --- a/lib/ofp-actions.c +++ b/lib/ofp-actions.c @@ -4328,7 +4328,8 @@ OFP_ASSERT(sizeof(struct nx_action_learn) == 32); struct nx_action_learn2 { struct nx_action_learn up; /* The wire format includes nx_action_learn. */ - ovs_be32 limit; /* Maximum number of learned flows. */ + ovs_be32 limit; /* Maximum number of learned flows. + * 0 indicates unlimited. */ /* Where to store the result. */ ovs_be16 result_dst_ofs; /* Starting bit offset in destination. */ diff --git a/utilities/ovs-ofctl.8.in b/utilities/ovs-ofctl.8.in index 2e6679ebe98c..5525bc0bcbff 100644 --- a/utilities/ovs-ofctl.8.in +++ b/utilities/ovs-ofctl.8.in @@ -1466,7 +1466,7 @@ This flag was added in Open vSwitch 2.4. .IP \fBlimit=\fInumber\fR If the number of flows in table \fBtable\fR with cookie id \fBcookie\fR exceeds \fInumber\fR, a new flow will not be learned by this action. By default -there's no limit. +there's no limit. limit=0 is a long-hand for no limit. . .IP This flag was added in Open vSwitch 2.8.