Message ID | 20220826123500.3006444-1-dceara@redhat.com |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev] lb: Remove unused ovn_northd_lb_vip vip_port_str member. | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | success | apply and check: success |
ovsrobot/github-robot-_Build_and_Test | fail | github build: failed |
ovsrobot/github-robot-_ovn-kubernetes | success | github build: passed |
On Fri, Aug 26, 2022 at 2:35 PM Dumitru Ceara <dceara@redhat.com> wrote: > Signed-off-by: Dumitru Ceara <dceara@redhat.com> > --- > lib/lb.c | 5 +---- > lib/lb.h | 1 - > 2 files changed, 1 insertion(+), 5 deletions(-) > > diff --git a/lib/lb.c b/lib/lb.c > index 7b0ed1abe..580efe7f7 100644 > --- a/lib/lb.c > +++ b/lib/lb.c > @@ -103,7 +103,6 @@ void ovn_northd_lb_vip_init(struct ovn_northd_lb_vip > *lb_vip_nb, > const struct nbrec_load_balancer *nbrec_lb, > const char *vip_port_str, const char > *backend_ips) > { > - lb_vip_nb->vip_port_str = xstrdup(vip_port_str); > lb_vip_nb->backend_ips = xstrdup(backend_ips); > lb_vip_nb->n_backends = lb_vip->n_backends; > lb_vip_nb->backends_nb = xcalloc(lb_vip_nb->n_backends, > @@ -121,8 +120,7 @@ void ovn_northd_lb_vip_init(struct ovn_northd_lb_vip > *lb_vip_nb, > } > } else { > for (size_t j = 0; j < nbrec_lb->n_health_check; j++) { > - if (!strcmp(nbrec_lb->health_check[j]->vip, > - lb_vip_nb->vip_port_str)) { > + if (!strcmp(nbrec_lb->health_check[j]->vip, vip_port_str)) { > lb_health_check = nbrec_lb->health_check[j]; > break; > } > @@ -135,7 +133,6 @@ void ovn_northd_lb_vip_init(struct ovn_northd_lb_vip > *lb_vip_nb, > static > void ovn_northd_lb_vip_destroy(struct ovn_northd_lb_vip *vip) > { > - free(vip->vip_port_str); > free(vip->backend_ips); > for (size_t i = 0; i < vip->n_backends; i++) { > free(vip->backends_nb[i].svc_mon_src_ip); > diff --git a/lib/lb.h b/lib/lb.h > index 832ed31fb..4bcf123b3 100644 > --- a/lib/lb.h > +++ b/lib/lb.h > @@ -70,7 +70,6 @@ struct ovn_lb_backend { > > /* ovn-northd specific backend information. */ > struct ovn_northd_lb_vip { > - char *vip_port_str; > char *backend_ips; > struct ovn_northd_lb_backend *backends_nb; > size_t n_backends; > -- > 2.31.1 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > > Looks good to me, thanks. Acked-by: Ales Musil <amusil@redhat.com>
On Mon, Sep 19, 2022 at 2:06 AM Ales Musil <amusil@redhat.com> wrote: > > On Fri, Aug 26, 2022 at 2:35 PM Dumitru Ceara <dceara@redhat.com> wrote: > > > Signed-off-by: Dumitru Ceara <dceara@redhat.com> > > --- > > lib/lb.c | 5 +---- > > lib/lb.h | 1 - > > 2 files changed, 1 insertion(+), 5 deletions(-) > > > > diff --git a/lib/lb.c b/lib/lb.c > > index 7b0ed1abe..580efe7f7 100644 > > --- a/lib/lb.c > > +++ b/lib/lb.c > > @@ -103,7 +103,6 @@ void ovn_northd_lb_vip_init(struct ovn_northd_lb_vip > > *lb_vip_nb, > > const struct nbrec_load_balancer *nbrec_lb, > > const char *vip_port_str, const char > > *backend_ips) > > { > > - lb_vip_nb->vip_port_str = xstrdup(vip_port_str); > > lb_vip_nb->backend_ips = xstrdup(backend_ips); > > lb_vip_nb->n_backends = lb_vip->n_backends; > > lb_vip_nb->backends_nb = xcalloc(lb_vip_nb->n_backends, > > @@ -121,8 +120,7 @@ void ovn_northd_lb_vip_init(struct ovn_northd_lb_vip > > *lb_vip_nb, > > } > > } else { > > for (size_t j = 0; j < nbrec_lb->n_health_check; j++) { > > - if (!strcmp(nbrec_lb->health_check[j]->vip, > > - lb_vip_nb->vip_port_str)) { > > + if (!strcmp(nbrec_lb->health_check[j]->vip, vip_port_str)) { > > lb_health_check = nbrec_lb->health_check[j]; > > break; > > } > > @@ -135,7 +133,6 @@ void ovn_northd_lb_vip_init(struct ovn_northd_lb_vip > > *lb_vip_nb, > > static > > void ovn_northd_lb_vip_destroy(struct ovn_northd_lb_vip *vip) > > { > > - free(vip->vip_port_str); > > free(vip->backend_ips); > > for (size_t i = 0; i < vip->n_backends; i++) { > > free(vip->backends_nb[i].svc_mon_src_ip); > > diff --git a/lib/lb.h b/lib/lb.h > > index 832ed31fb..4bcf123b3 100644 > > --- a/lib/lb.h > > +++ b/lib/lb.h > > @@ -70,7 +70,6 @@ struct ovn_lb_backend { > > > > /* ovn-northd specific backend information. */ > > struct ovn_northd_lb_vip { > > - char *vip_port_str; > > char *backend_ips; > > struct ovn_northd_lb_backend *backends_nb; > > size_t n_backends; > > -- > > 2.31.1 > > > > _______________________________________________ > > dev mailing list > > dev@openvswitch.org > > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > > > > > Looks good to me, thanks. > > Acked-by: Ales Musil <amusil@redhat.com> Thanks. Applied to main. Numan > > -- > > Ales Musil > > Senior Software Engineer - OVN Core > > Red Hat EMEA <https://www.redhat.com> > > amusil@redhat.com IM: amusil > <https://red.ht/sig> > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev >
diff --git a/lib/lb.c b/lib/lb.c index 7b0ed1abe..580efe7f7 100644 --- a/lib/lb.c +++ b/lib/lb.c @@ -103,7 +103,6 @@ void ovn_northd_lb_vip_init(struct ovn_northd_lb_vip *lb_vip_nb, const struct nbrec_load_balancer *nbrec_lb, const char *vip_port_str, const char *backend_ips) { - lb_vip_nb->vip_port_str = xstrdup(vip_port_str); lb_vip_nb->backend_ips = xstrdup(backend_ips); lb_vip_nb->n_backends = lb_vip->n_backends; lb_vip_nb->backends_nb = xcalloc(lb_vip_nb->n_backends, @@ -121,8 +120,7 @@ void ovn_northd_lb_vip_init(struct ovn_northd_lb_vip *lb_vip_nb, } } else { for (size_t j = 0; j < nbrec_lb->n_health_check; j++) { - if (!strcmp(nbrec_lb->health_check[j]->vip, - lb_vip_nb->vip_port_str)) { + if (!strcmp(nbrec_lb->health_check[j]->vip, vip_port_str)) { lb_health_check = nbrec_lb->health_check[j]; break; } @@ -135,7 +133,6 @@ void ovn_northd_lb_vip_init(struct ovn_northd_lb_vip *lb_vip_nb, static void ovn_northd_lb_vip_destroy(struct ovn_northd_lb_vip *vip) { - free(vip->vip_port_str); free(vip->backend_ips); for (size_t i = 0; i < vip->n_backends; i++) { free(vip->backends_nb[i].svc_mon_src_ip); diff --git a/lib/lb.h b/lib/lb.h index 832ed31fb..4bcf123b3 100644 --- a/lib/lb.h +++ b/lib/lb.h @@ -70,7 +70,6 @@ struct ovn_lb_backend { /* ovn-northd specific backend information. */ struct ovn_northd_lb_vip { - char *vip_port_str; char *backend_ips; struct ovn_northd_lb_backend *backends_nb; size_t n_backends;
Signed-off-by: Dumitru Ceara <dceara@redhat.com> --- lib/lb.c | 5 +---- lib/lb.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-)