[ovs-dev,v2,ovn,1/3] ofctrl: Avoid recomputing match hash in ofctrl_dup_flow().
diff mbox series

Message ID 20190823112319.30602.12918.stgit@dceara.remote.csb
State Accepted
Headers show
Series
  • ovn-controller: Logical flow processing optimizations
Related show

Commit Message

Dumitru Ceara Aug. 23, 2019, 11:23 a.m. UTC
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
---
 controller/ofctrl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Numan Siddique Aug. 28, 2019, 12:33 p.m. UTC | #1
On Fri, Aug 23, 2019 at 4:54 PM Dumitru Ceara <dceara@redhat.com> wrote:

> Signed-off-by: Dumitru Ceara <dceara@redhat.com>
>

Thanks. I applied this patch to master.

Numan


> ---
>  controller/ofctrl.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/controller/ofctrl.c b/controller/ofctrl.c
> index 8928205..3131baf 100644
> --- a/controller/ofctrl.c
> +++ b/controller/ofctrl.c
> @@ -743,7 +743,7 @@ ofctrl_dup_flow(struct ovn_flow *src)
>      dst->ofpacts = xmemdup(src->ofpacts, src->ofpacts_len);
>      dst->ofpacts_len = src->ofpacts_len;
>      dst->sb_uuid = src->sb_uuid;
> -    dst->match_hmap_node.hash = ovn_flow_match_hash(dst);
> +    dst->match_hmap_node.hash = src->match_hmap_node.hash;
>      dst->uuid_hindex_node.hash = uuid_hash(&src->sb_uuid);
>      return dst;
>  }
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>

Patch
diff mbox series

diff --git a/controller/ofctrl.c b/controller/ofctrl.c
index 8928205..3131baf 100644
--- a/controller/ofctrl.c
+++ b/controller/ofctrl.c
@@ -743,7 +743,7 @@  ofctrl_dup_flow(struct ovn_flow *src)
     dst->ofpacts = xmemdup(src->ofpacts, src->ofpacts_len);
     dst->ofpacts_len = src->ofpacts_len;
     dst->sb_uuid = src->sb_uuid;
-    dst->match_hmap_node.hash = ovn_flow_match_hash(dst);
+    dst->match_hmap_node.hash = src->match_hmap_node.hash;
     dst->uuid_hindex_node.hash = uuid_hash(&src->sb_uuid);
     return dst;
 }