On Tue, Apr 23, 2024 at 7:53 AM Xavier Simonart <[email protected]> wrote: > > If iface-id-ver was wrong and modified to a correct value, > the port was correctly claimed, but the flows were not installed > by I+P. > > Signed-off-by: Xavier Simonart <[email protected]>
Acked-by: Numan Siddique <[email protected]> Numan > --- > controller/binding.c | 14 ++++++++++++++ > tests/ovn.at | 2 ++ > 2 files changed, 16 insertions(+) > > diff --git a/controller/binding.c b/controller/binding.c > index 8ac2ce3e2..c9658cb2a 100644 > --- a/controller/binding.c > +++ b/controller/binding.c > @@ -757,6 +757,8 @@ update_active_pb_ras_pd(const struct sbrec_port_binding > *pb, > } > } > > +static bool is_ext_id_changed(const struct smap *a, const struct smap *b, > + const char *key); > static struct local_binding *local_binding_create( > const char *name, const struct ovsrec_interface *); > static void local_binding_add(struct shash *local_bindings, > @@ -2311,6 +2313,18 @@ consider_iface_claim(const struct ovsrec_interface > *iface_rec, > return true; > } > > + /* Check if iface-id-ver just becomes correct */ > + struct smap *external_ids_old = > + shash_find_data(b_ctx_in->iface_table_external_ids_old, > + iface_rec->name); > + > + if (external_ids_old && > + is_ext_id_changed(&iface_rec->external_ids, > + external_ids_old, > + "iface-id-ver")) { > + b_ctx_out->local_lports_changed = true; > + } > + > /* If multiple bindings to the same port, remove the "old" binding. > * This ensures that change tracking is correct. > */ > diff --git a/tests/ovn.at b/tests/ovn.at > index e81cd4f45..f974cbb15 100644 > --- a/tests/ovn.at > +++ b/tests/ovn.at > @@ -33239,6 +33239,8 @@ check as hv1 ovs-vsctl set interface vif11 > external_ids:iface-id-ver=foo > > wait_for_ports_up sw0-port1 > > +CHECK_FLOWS_AFTER_RECOMPUTE([hv1], [hv1]) > + > AT_CHECK([as hv1 ovn-appctl -t ovn-controller debug/dump-local-bindings], > [0], [dnl > Local bindings: > name: [[sw0-port1]], OVS interface name : [[vif11]], num binding lports : > [[1]] > -- > 2.31.1 > > _______________________________________________ > 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
