[ovs-dev,ovn] Remove ageing check in run_put_mac_binding
diff mbox series

Message ID 1679a0e2264b4ed8c116c6f2658fa38e7ea71723.1566492618.git.lorenzo.bianconi@redhat.com
State Accepted
Headers show
Series
  • [ovs-dev,ovn] Remove ageing check in run_put_mac_binding
Related show

Commit Message

Lorenzo Bianconi Aug. 22, 2019, 4:51 p.m. UTC
Remove ageing check in run_put_mac_binding routine on mac-binding info
since if ovn-controller main thread is heavy loaded the info will be
discarded and the mac_binding table will not never be updated

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
---
 controller/pinctrl.c | 7 -------
 1 file changed, 7 deletions(-)

Comments

Numan Siddique Aug. 22, 2019, 5:42 p.m. UTC | #1
On Thu, Aug 22, 2019 at 10:22 PM Lorenzo Bianconi <
lorenzo.bianconi@redhat.com> wrote:

> Remove ageing check in run_put_mac_binding routine on mac-binding info
> since if ovn-controller main thread is heavy loaded the info will be
> discarded and the mac_binding table will not never be updated
>
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
>

LGTM. Thanks for the patch.

Acked-by: Numan Siddique <nusiddiq@redhat.com>

Numan


> ---
>  controller/pinctrl.c | 7 -------
>  1 file changed, 7 deletions(-)
>
> diff --git a/controller/pinctrl.c b/controller/pinctrl.c
> index 365a0d16d..21ed75fee 100644
> --- a/controller/pinctrl.c
> +++ b/controller/pinctrl.c
> @@ -2549,8 +2549,6 @@ pinctrl_destroy(void)
>  struct put_mac_binding {
>      struct hmap_node hmap_node; /* In 'put_mac_bindings'. */
>
> -    long long int timestamp;    /* In milliseconds. */
> -
>      /* Key. */
>      uint32_t dp_key;
>      uint32_t port_key;
> @@ -2624,7 +2622,6 @@ pinctrl_handle_put_mac_binding(const struct flow *md,
>          pmb->port_key = port_key;
>          pmb->ip_key = ip_key;
>      }
> -    pmb->timestamp = time_msec();
>      pmb->mac = headers->dl_src;
>
>      /* We can send the buffered packet once the main ovn-controller
> @@ -2672,10 +2669,6 @@ run_put_mac_binding(struct ovsdb_idl_txn
> *ovnsb_idl_txn,
>                      struct ovsdb_idl_index *sbrec_mac_binding_by_lport_ip,
>                      const struct put_mac_binding *pmb)
>  {
> -    if (time_msec() > pmb->timestamp + 1000) {
> -        return;
> -    }
> -
>      /* Convert logical datapath and logical port key into lport. */
>      const struct sbrec_port_binding *pb = lport_lookup_by_key(
>          sbrec_datapath_binding_by_key, sbrec_port_binding_by_key,
> --
> 2.21.0
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
Ben Pfaff Aug. 22, 2019, 10:47 p.m. UTC | #2
On Thu, Aug 22, 2019 at 06:51:40PM +0200, Lorenzo Bianconi wrote:
> Remove ageing check in run_put_mac_binding routine on mac-binding info
> since if ovn-controller main thread is heavy loaded the info will be
> discarded and the mac_binding table will not never be updated
> 
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

I applied this to master and branch-2.12.

Lorenzo, I think that I applied the patches you asked for today in the
IRC meeting, but I also lost the transcript of that meeting and so I
might need a reminder.
Lorenzo Bianconi Aug. 23, 2019, 7:10 a.m. UTC | #3
> On Thu, Aug 22, 2019 at 06:51:40PM +0200, Lorenzo Bianconi wrote:
> > Remove ageing check in run_put_mac_binding routine on mac-binding info
> > since if ovn-controller main thread is heavy loaded the info will be
> > discarded and the mac_binding table will not never be updated
> > 
> > Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
> 
> I applied this to master and branch-2.12.
> 
> Lorenzo, I think that I applied the patches you asked for today in the
> IRC meeting, but I also lost the transcript of that meeting and so I
> might need a reminder.

Hi Ben,

yes all pending patches now are in ovs-master/ovs-2.12. Thx.

Regards,
Lorenzo

Patch
diff mbox series

diff --git a/controller/pinctrl.c b/controller/pinctrl.c
index 365a0d16d..21ed75fee 100644
--- a/controller/pinctrl.c
+++ b/controller/pinctrl.c
@@ -2549,8 +2549,6 @@  pinctrl_destroy(void)
 struct put_mac_binding {
     struct hmap_node hmap_node; /* In 'put_mac_bindings'. */
 
-    long long int timestamp;    /* In milliseconds. */
-
     /* Key. */
     uint32_t dp_key;
     uint32_t port_key;
@@ -2624,7 +2622,6 @@  pinctrl_handle_put_mac_binding(const struct flow *md,
         pmb->port_key = port_key;
         pmb->ip_key = ip_key;
     }
-    pmb->timestamp = time_msec();
     pmb->mac = headers->dl_src;
 
     /* We can send the buffered packet once the main ovn-controller
@@ -2672,10 +2669,6 @@  run_put_mac_binding(struct ovsdb_idl_txn *ovnsb_idl_txn,
                     struct ovsdb_idl_index *sbrec_mac_binding_by_lport_ip,
                     const struct put_mac_binding *pmb)
 {
-    if (time_msec() > pmb->timestamp + 1000) {
-        return;
-    }
-
     /* Convert logical datapath and logical port key into lport. */
     const struct sbrec_port_binding *pb = lport_lookup_by_key(
         sbrec_datapath_binding_by_key, sbrec_port_binding_by_key,