2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 22:35:15 +00:00

ofp-actions: Document that learn(limit=0) is no limit.

The documentation was unclear that specifying a limit of 0 is the same
as specifying no limit. Controllers that wish to set a learn limit so
that no more than 0 flows are learned may omit the learn action.

Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Jarno Rajahalme <jarno@ovn.org>
This commit is contained in:
Joe Stringer
2017-04-28 14:45:21 -07:00
parent 4e3000a09f
commit 1746822c44
3 changed files with 4 additions and 3 deletions

View File

@@ -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,

View File

@@ -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. */

View File

@@ -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.