On Thu, Dec 1, 2016 at 4:34 PM, Ben Pfaff <[email protected]> wrote: > Nothing used these, except to initialize and free them. 'logical_port' > wasn't meaningful in any case, it was just the name of the first logical > port encountered from a particular logical datapath when traversing the > database's Port_Binding table, which isn't in a meaningful order. >
I have long considered the 'uuid' in local_datapath dangerous, due to the first logical port encountered issue that you mention. Since incremental processing disappeared, it has not been doing any harm. I agree that it is safer to remove it. Acked-by: Mickey Spiegel <[email protected]> > > Signed-off-by: Ben Pfaff <[email protected]> > --- > v1->v2: I found some more members that were unused. > > ovn/controller/binding.c | 2 -- > ovn/controller/ovn-controller.c | 1 - > ovn/controller/ovn-controller.h | 3 --- > 3 files changed, 6 deletions(-) > > diff --git a/ovn/controller/binding.c b/ovn/controller/binding.c > index d7b175e..fb76032 100644 > --- a/ovn/controller/binding.c > +++ b/ovn/controller/binding.c > @@ -114,8 +114,6 @@ add_local_datapath(struct hmap *local_datapaths, > } > > struct local_datapath *ld = xzalloc(sizeof *ld); > - ld->logical_port = xstrdup(binding_rec->logical_port); > - memcpy(&ld->uuid, &binding_rec->header_.uuid, sizeof ld->uuid); > hmap_insert(local_datapaths, &ld->hmap_node, > binding_rec->datapath->tunnel_key); > } > diff --git a/ovn/controller/ovn-controller.c b/ovn/controller/ovn- > controller.c > index 52eb491..45537de 100644 > --- a/ovn/controller/ovn-controller.c > +++ b/ovn/controller/ovn-controller.c > @@ -566,7 +566,6 @@ main(int argc, char *argv[]) > struct local_datapath *cur_node, *next_node; > HMAP_FOR_EACH_SAFE (cur_node, next_node, hmap_node, > &local_datapaths) { > hmap_remove(&local_datapaths, &cur_node->hmap_node); > - free(cur_node->logical_port); > free(cur_node); > } > hmap_destroy(&local_datapaths); > diff --git a/ovn/controller/ovn-controller.h b/ovn/controller/ovn- > controller.h > index 78c8b08..8a3e855 100644 > --- a/ovn/controller/ovn-controller.h > +++ b/ovn/controller/ovn-controller.h > @@ -53,9 +53,6 @@ struct ct_zone_pending_entry { > * the localnet port */ > struct local_datapath { > struct hmap_node hmap_node; > - struct hmap_node uuid_hmap_node; > - struct uuid uuid; > - char *logical_port; > const struct sbrec_port_binding *localnet_port; > }; > > -- > 2.10.2 > > _______________________________________________ > dev mailing list > [email protected] > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
