diff mbox series

[ovs-dev] lflow.c: Use warn level log for a lflow that has neither dp nor dpg.

Message ID 20210422041120.3231414-1-hzhou@ovn.org
State Accepted
Headers show
Series [ovs-dev] lflow.c: Use warn level log for a lflow that has neither dp nor dpg. | expand

Commit Message

Han Zhou April 22, 2021, 4:11 a.m. UTC
This should not happen in normal cases, so at least should be a WARN.

Signed-off-by: Han Zhou <hzhou@ovn.org>
---
 controller/lflow.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Dumitru Ceara April 28, 2021, 8:04 a.m. UTC | #1
On 4/22/21 6:11 AM, Han Zhou wrote:
> This should not happen in normal cases, so at least should be a WARN.
> 
> Signed-off-by: Han Zhou <hzhou@ovn.org>
> ---

Looks good to me, thanks!

Acked-by: Dumitru Ceara <dceara@redhat.com>
Han Zhou April 28, 2021, 10:32 p.m. UTC | #2
On Wed, Apr 28, 2021 at 1:04 AM Dumitru Ceara <dceara@redhat.com> wrote:
>
> On 4/22/21 6:11 AM, Han Zhou wrote:
> > This should not happen in normal cases, so at least should be a WARN.
> >
> > Signed-off-by: Han Zhou <hzhou@ovn.org>
> > ---
>
> Looks good to me, thanks!
>
> Acked-by: Dumitru Ceara <dceara@redhat.com>
>
Thanks Dumitru. I applied this to master.
diff mbox series

Patch

diff --git a/controller/lflow.c b/controller/lflow.c
index 680b8cca1..b8424e1fb 100644
--- a/controller/lflow.c
+++ b/controller/lflow.c
@@ -916,8 +916,9 @@  consider_logical_flow(const struct sbrec_logical_flow *lflow,
     bool ret = true;
 
     if (!dp_group && !dp) {
-        VLOG_DBG("lflow "UUID_FMT" has no datapath binding, skip",
-                 UUID_ARGS(&lflow->header_.uuid));
+        static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);
+        VLOG_WARN_RL(&rl, "lflow "UUID_FMT" has no datapath binding, skip",
+                     UUID_ARGS(&lflow->header_.uuid));
         return true;
     }
     ovs_assert(!dp_group || !dp);