diff mbox series

[ovs-dev] controller: Remove unused shash from update_ct_zone

Message ID 20221012080736.29568-1-amusil@redhat.com
State Accepted
Headers show
Series [ovs-dev] controller: Remove unused shash from update_ct_zone | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes success github build: passed

Commit Message

Ales Musil Oct. 12, 2022, 8:07 a.m. UTC
Signed-off-by: Ales Musil <amusil@redhat.com>
---
 controller/ovn-controller.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Mark Michelson Oct. 12, 2022, 7:32 p.m. UTC | #1
Wow, this shash has been unused since branch-21.06 . Good find!

Acked-by: Mark Michelson <mmichels@redhat.com>

On 10/12/22 04:07, Ales Musil wrote:
> Signed-off-by: Ales Musil <amusil@redhat.com>
> ---
>   controller/ovn-controller.c | 4 ----
>   1 file changed, 4 deletions(-)
> 
> diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
> index 9969d317f..8895c7a2b 100644
> --- a/controller/ovn-controller.c
> +++ b/controller/ovn-controller.c
> @@ -667,7 +667,6 @@ update_ct_zones(const struct shash *binding_lports,
>       }
>   
>       /* Local patched datapath (gateway routers) need zones assigned. */
> -    struct shash all_lds = SHASH_INITIALIZER(&all_lds);
>       const struct local_datapath *ld;
>       HMAP_FOR_EACH (ld, hmap_node, local_datapaths) {
>           /* XXX Add method to limit zone assignment to logical router
> @@ -676,8 +675,6 @@ update_ct_zones(const struct shash *binding_lports,
>           char *snat = alloc_nat_zone_key(&ld->datapath->header_.uuid, "snat");
>           sset_add(&all_users, dnat);
>           sset_add(&all_users, snat);
> -        shash_add(&all_lds, dnat, ld);
> -        shash_add(&all_lds, snat, ld);
>   
>           int req_snat_zone = get_snat_ct_zone(ld->datapath);
>           if (req_snat_zone >= 0) {
> @@ -760,7 +757,6 @@ update_ct_zones(const struct shash *binding_lports,
>   
>       simap_destroy(&req_snat_zones);
>       sset_destroy(&all_users);
> -    shash_destroy(&all_lds);
>   }
>   
>   static void
Numan Siddique Oct. 18, 2022, 11:48 p.m. UTC | #2
On Wed, Oct 12, 2022 at 3:32 PM Mark Michelson <mmichels@redhat.com> wrote:
>
> Wow, this shash has been unused since branch-21.06 . Good find!
>
> Acked-by: Mark Michelson <mmichels@redhat.com>

Thanks.  Applied to the main branch.

Numan

>
> On 10/12/22 04:07, Ales Musil wrote:
> > Signed-off-by: Ales Musil <amusil@redhat.com>
> > ---
> >   controller/ovn-controller.c | 4 ----
> >   1 file changed, 4 deletions(-)
> >
> > diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
> > index 9969d317f..8895c7a2b 100644
> > --- a/controller/ovn-controller.c
> > +++ b/controller/ovn-controller.c
> > @@ -667,7 +667,6 @@ update_ct_zones(const struct shash *binding_lports,
> >       }
> >
> >       /* Local patched datapath (gateway routers) need zones assigned. */
> > -    struct shash all_lds = SHASH_INITIALIZER(&all_lds);
> >       const struct local_datapath *ld;
> >       HMAP_FOR_EACH (ld, hmap_node, local_datapaths) {
> >           /* XXX Add method to limit zone assignment to logical router
> > @@ -676,8 +675,6 @@ update_ct_zones(const struct shash *binding_lports,
> >           char *snat = alloc_nat_zone_key(&ld->datapath->header_.uuid, "snat");
> >           sset_add(&all_users, dnat);
> >           sset_add(&all_users, snat);
> > -        shash_add(&all_lds, dnat, ld);
> > -        shash_add(&all_lds, snat, ld);
> >
> >           int req_snat_zone = get_snat_ct_zone(ld->datapath);
> >           if (req_snat_zone >= 0) {
> > @@ -760,7 +757,6 @@ update_ct_zones(const struct shash *binding_lports,
> >
> >       simap_destroy(&req_snat_zones);
> >       sset_destroy(&all_users);
> > -    shash_destroy(&all_lds);
> >   }
> >
> >   static void
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
diff mbox series

Patch

diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
index 9969d317f..8895c7a2b 100644
--- a/controller/ovn-controller.c
+++ b/controller/ovn-controller.c
@@ -667,7 +667,6 @@  update_ct_zones(const struct shash *binding_lports,
     }
 
     /* Local patched datapath (gateway routers) need zones assigned. */
-    struct shash all_lds = SHASH_INITIALIZER(&all_lds);
     const struct local_datapath *ld;
     HMAP_FOR_EACH (ld, hmap_node, local_datapaths) {
         /* XXX Add method to limit zone assignment to logical router
@@ -676,8 +675,6 @@  update_ct_zones(const struct shash *binding_lports,
         char *snat = alloc_nat_zone_key(&ld->datapath->header_.uuid, "snat");
         sset_add(&all_users, dnat);
         sset_add(&all_users, snat);
-        shash_add(&all_lds, dnat, ld);
-        shash_add(&all_lds, snat, ld);
 
         int req_snat_zone = get_snat_ct_zone(ld->datapath);
         if (req_snat_zone >= 0) {
@@ -760,7 +757,6 @@  update_ct_zones(const struct shash *binding_lports,
 
     simap_destroy(&req_snat_zones);
     sset_destroy(&all_users);
-    shash_destroy(&all_lds);
 }
 
 static void