diff mbox

[ovs-dev,1/2] ofproto: Log when learn limit reached.

Message ID 20170317183835.26684-1-joe@ovn.org
State Accepted
Headers show

Commit Message

Joe Stringer March 17, 2017, 6:38 p.m. UTC
This commit provides more visibility into conditions where learn limits
are reached when the functionality from patch 4c71600d2256
("ofp-actions: Add limit to learn action.") is used.

VMWare-BZ: #1832142
Signed-off-by: Joe Stringer <joe@ovn.org>
---
 ofproto/ofproto.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Ben Pfaff March 17, 2017, 11:04 p.m. UTC | #1
On Fri, Mar 17, 2017 at 11:38:34AM -0700, Joe Stringer wrote:
> This commit provides more visibility into conditions where learn limits
> are reached when the functionality from patch 4c71600d2256
> ("ofp-actions: Add limit to learn action.") is used.
> 
> VMWare-BZ: #1832142
> Signed-off-by: Joe Stringer <joe@ovn.org>

Acked-by: Ben Pfaff <blp@ovn.org>
Joe Stringer March 21, 2017, 1:12 a.m. UTC | #2
On 17 March 2017 at 16:04, Ben Pfaff <blp@ovn.org> wrote:
> On Fri, Mar 17, 2017 at 11:38:34AM -0700, Joe Stringer wrote:
>> This commit provides more visibility into conditions where learn limits
>> are reached when the functionality from patch 4c71600d2256
>> ("ofp-actions: Add limit to learn action.") is used.
>>
>> VMWare-BZ: #1832142
>> Signed-off-by: Joe Stringer <joe@ovn.org>
>
> Acked-by: Ben Pfaff <blp@ovn.org>

Thanks, applied.
diff mbox

Patch

diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index 09594f1010e1..c6d83d4e6b29 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -5129,6 +5129,12 @@  ofproto_flow_mod_learn(struct ofproto_flow_mod *ofm, bool keep_ref,
             ofproto_flow_mod_uninit(ofm);
         }
         ovs_mutex_unlock(&ofproto_mutex);
+
+        if (limited) {
+            static struct vlog_rate_limit learn_rl = VLOG_RATE_LIMIT_INIT(1, 5);
+            VLOG_INFO_RL(&learn_rl, "Learn limit for flow %"PRIu64" reached.",
+                         rule->flow_cookie);
+        }
     }
 
     if (!keep_ref && !limited) {