diff mbox series

[ovs-dev] ovsdb: omit_alert should implicitely turn off tracking.

Message ID 1521252163-101920-1-git-send-email-hzhou8@ebay.com
State Accepted
Headers show
Series [ovs-dev] ovsdb: omit_alert should implicitely turn off tracking. | expand

Commit Message

Han Zhou March 17, 2018, 2:02 a.m. UTC
OVSDB_IDL_TRACK is not valid without OVSDB_IDL_ALERT, so it should
be turned off as well in ovsdb_idl_omit_alert().

Signed-off-by: Han Zhou <hzhou8@ebay.com>
---
 lib/ovsdb-idl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Ben Pfaff April 1, 2018, 11:26 p.m. UTC | #1
On Fri, Mar 16, 2018 at 07:02:43PM -0700, Han Zhou wrote:
> OVSDB_IDL_TRACK is not valid without OVSDB_IDL_ALERT, so it should
> be turned off as well in ovsdb_idl_omit_alert().
> 
> Signed-off-by: Han Zhou <hzhou8@ebay.com>

Thanks for the patch.  It looks correct to me.

Before I apply it, does this fix any bugs (performance-wise or
otherwise) or is it just something you noticed while reading code?  If
it fixes something, then we should note it in the commit message.

Thanks,

Ben.
Han Zhou April 2, 2018, 3:32 a.m. UTC | #2
On Sun, Apr 1, 2018 at 4:26 PM, Ben Pfaff <blp@ovn.org> wrote:
>
> On Fri, Mar 16, 2018 at 07:02:43PM -0700, Han Zhou wrote:
> > OVSDB_IDL_TRACK is not valid without OVSDB_IDL_ALERT, so it should
> > be turned off as well in ovsdb_idl_omit_alert().
> >
> > Signed-off-by: Han Zhou <hzhou8@ebay.com>
>
> Thanks for the patch.  It looks correct to me.
>
> Before I apply it, does this fix any bugs (performance-wise or
> otherwise) or is it just something you noticed while reading code?  If
> it fixes something, then we should note it in the commit message.
>
> Thanks,
>
> Ben.

Hi Ben, I didn't see any bug yet, but it will be useful for the
ovn-controller incremental processing patch I am working on. Since this is
pretty small, I submitted separately.

Thanks,
Han
Ben Pfaff April 3, 2018, 6:15 p.m. UTC | #3
On Sun, Apr 01, 2018 at 08:32:02PM -0700, Han Zhou wrote:
> On Sun, Apr 1, 2018 at 4:26 PM, Ben Pfaff <blp@ovn.org> wrote:
> >
> > On Fri, Mar 16, 2018 at 07:02:43PM -0700, Han Zhou wrote:
> > > OVSDB_IDL_TRACK is not valid without OVSDB_IDL_ALERT, so it should
> > > be turned off as well in ovsdb_idl_omit_alert().
> > >
> > > Signed-off-by: Han Zhou <hzhou8@ebay.com>
> >
> > Thanks for the patch.  It looks correct to me.
> >
> > Before I apply it, does this fix any bugs (performance-wise or
> > otherwise) or is it just something you noticed while reading code?  If
> > it fixes something, then we should note it in the commit message.
> >
> > Thanks,
> >
> > Ben.
> 
> Hi Ben, I didn't see any bug yet, but it will be useful for the
> ovn-controller incremental processing patch I am working on. Since this is
> pretty small, I submitted separately.

Thanks.

I would like to apply it but it appears to need a rebase.

Thanks,

Ben.
Han Zhou April 4, 2018, 5:27 p.m. UTC | #4
On Tue, Apr 3, 2018 at 11:15 AM, Ben Pfaff <blp@ovn.org> wrote:
>
> On Sun, Apr 01, 2018 at 08:32:02PM -0700, Han Zhou wrote:
> > On Sun, Apr 1, 2018 at 4:26 PM, Ben Pfaff <blp@ovn.org> wrote:
> > >
> > > On Fri, Mar 16, 2018 at 07:02:43PM -0700, Han Zhou wrote:
> > > > OVSDB_IDL_TRACK is not valid without OVSDB_IDL_ALERT, so it should
> > > > be turned off as well in ovsdb_idl_omit_alert().
> > > >
> > > > Signed-off-by: Han Zhou <hzhou8@ebay.com>
> > >
> > > Thanks for the patch.  It looks correct to me.
> > >
> > > Before I apply it, does this fix any bugs (performance-wise or
> > > otherwise) or is it just something you noticed while reading code?  If
> > > it fixes something, then we should note it in the commit message.
> > >
> > > Thanks,
> > >
> > > Ben.
> >
> > Hi Ben, I didn't see any bug yet, but it will be useful for the
> > ovn-controller incremental processing patch I am working on. Since this
is
> > pretty small, I submitted separately.
>
> Thanks.
>
> I would like to apply it but it appears to need a rebase.
>
Hi Ben,

I just rebased: https://patchwork.ozlabs.org/patch/895079/
Please take a look.

Thanks,
Han
diff mbox series

Patch

diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c
index 642ce66..5848326 100644
--- a/lib/ovsdb-idl.c
+++ b/lib/ovsdb-idl.c
@@ -1252,7 +1252,7 @@  ovsdb_idl_send_cond_change(struct ovsdb_idl *idl)
     idl->cond_changed = false;
 }
 
-/* Turns off OVSDB_IDL_ALERT for 'column' in 'idl'.
+/* Turns off OVSDB_IDL_ALERT and OVSDB_IDL_TRACK for 'column' in 'idl'.
  *
  * This function should be called between ovsdb_idl_create() and the first call
  * to ovsdb_idl_run().
@@ -1261,7 +1261,7 @@  void
 ovsdb_idl_omit_alert(struct ovsdb_idl *idl,
                      const struct ovsdb_idl_column *column)
 {
-    *ovsdb_idl_get_mode(idl, column) &= ~OVSDB_IDL_ALERT;
+    *ovsdb_idl_get_mode(idl, column) &= ~(OVSDB_IDL_ALERT | OVSDB_IDL_TRACK);
 }
 
 /* Sets the mode for 'column' in 'idl' to 0.  See the big comment above