Message ID | 20241101132927.81337-5-dceara@redhat.com |
---|---|
State | Accepted |
Headers | show |
Series | controller: FDB/MAC_Binding learning/aging fixes. | expand |
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 |
Acked-by: Mark Michelson <mmichels@redhat.com> On 11/1/24 09:29, Dumitru Ceara wrote: > There's no point to process MAC binding updates for non-local datapaths. > If they were local before but not anymore we don't really have a reason > to send any buffered packets for them anymore. > > Fixes: bbd5e0d81c16 ("controller: improve buffered packets management") > Signed-off-by: Dumitru Ceara <dceara@redhat.com> > --- > controller/pinctrl.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/controller/pinctrl.c b/controller/pinctrl.c > index dfb2560a97..07cd140e02 100644 > --- a/controller/pinctrl.c > +++ b/controller/pinctrl.c > @@ -191,6 +191,7 @@ static void init_buffered_packets_ctx(void); > static void destroy_buffered_packets_ctx(void); > static void > run_buffered_binding(const struct sbrec_mac_binding_table *mac_binding_table, > + const struct hmap *local_datapaths, > struct ovsdb_idl_index *sbrec_port_binding_by_key, > struct ovsdb_idl_index *sbrec_datapath_binding_by_key, > struct ovsdb_idl_index *sbrec_port_binding_by_name, > @@ -4176,7 +4177,8 @@ pinctrl_run(struct ovsdb_idl_txn *ovnsb_idl_txn, > sbrec_port_binding_by_key, > sbrec_igmp_groups, > sbrec_ip_multicast_opts); > - run_buffered_binding(mac_binding_table, sbrec_port_binding_by_key, > + run_buffered_binding(mac_binding_table, local_datapaths, > + sbrec_port_binding_by_key, > sbrec_datapath_binding_by_key, > sbrec_port_binding_by_name, > sbrec_mac_binding_by_lport_ip); > @@ -4943,6 +4945,7 @@ run_put_mac_bindings(struct ovsdb_idl_txn *ovnsb_idl_txn, > > static void > run_buffered_binding(const struct sbrec_mac_binding_table *mac_binding_table, > + const struct hmap *local_datapaths, > struct ovsdb_idl_index *sbrec_port_binding_by_key, > struct ovsdb_idl_index *sbrec_datapath_binding_by_key, > struct ovsdb_idl_index *sbrec_port_binding_by_name, > @@ -4961,6 +4964,10 @@ run_buffered_binding(const struct sbrec_mac_binding_table *mac_binding_table, > continue; > } > > + if (!get_local_datapath(local_datapaths, smb->datapath->tunnel_key)) { > + continue; > + } > + > const struct sbrec_port_binding *pb = lport_lookup_by_name( > sbrec_port_binding_by_name, smb->logical_port); >
Acked-by: Mark Michelson <mmichels@redhat.com> On 11/1/24 09:29, Dumitru Ceara wrote: > There's no point to process MAC binding updates for non-local datapaths. > If they were local before but not anymore we don't really have a reason > to send any buffered packets for them anymore. > > Fixes: bbd5e0d81c16 ("controller: improve buffered packets management") > Signed-off-by: Dumitru Ceara <dceara@redhat.com> > --- > controller/pinctrl.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/controller/pinctrl.c b/controller/pinctrl.c > index dfb2560a97..07cd140e02 100644 > --- a/controller/pinctrl.c > +++ b/controller/pinctrl.c > @@ -191,6 +191,7 @@ static void init_buffered_packets_ctx(void); > static void destroy_buffered_packets_ctx(void); > static void > run_buffered_binding(const struct sbrec_mac_binding_table *mac_binding_table, > + const struct hmap *local_datapaths, > struct ovsdb_idl_index *sbrec_port_binding_by_key, > struct ovsdb_idl_index *sbrec_datapath_binding_by_key, > struct ovsdb_idl_index *sbrec_port_binding_by_name, > @@ -4176,7 +4177,8 @@ pinctrl_run(struct ovsdb_idl_txn *ovnsb_idl_txn, > sbrec_port_binding_by_key, > sbrec_igmp_groups, > sbrec_ip_multicast_opts); > - run_buffered_binding(mac_binding_table, sbrec_port_binding_by_key, > + run_buffered_binding(mac_binding_table, local_datapaths, > + sbrec_port_binding_by_key, > sbrec_datapath_binding_by_key, > sbrec_port_binding_by_name, > sbrec_mac_binding_by_lport_ip); > @@ -4943,6 +4945,7 @@ run_put_mac_bindings(struct ovsdb_idl_txn *ovnsb_idl_txn, > > static void > run_buffered_binding(const struct sbrec_mac_binding_table *mac_binding_table, > + const struct hmap *local_datapaths, > struct ovsdb_idl_index *sbrec_port_binding_by_key, > struct ovsdb_idl_index *sbrec_datapath_binding_by_key, > struct ovsdb_idl_index *sbrec_port_binding_by_name, > @@ -4961,6 +4964,10 @@ run_buffered_binding(const struct sbrec_mac_binding_table *mac_binding_table, > continue; > } > > + if (!get_local_datapath(local_datapaths, smb->datapath->tunnel_key)) { > + continue; > + } > + > const struct sbrec_port_binding *pb = lport_lookup_by_name( > sbrec_port_binding_by_name, smb->logical_port); >
diff --git a/controller/pinctrl.c b/controller/pinctrl.c index dfb2560a97..07cd140e02 100644 --- a/controller/pinctrl.c +++ b/controller/pinctrl.c @@ -191,6 +191,7 @@ static void init_buffered_packets_ctx(void); static void destroy_buffered_packets_ctx(void); static void run_buffered_binding(const struct sbrec_mac_binding_table *mac_binding_table, + const struct hmap *local_datapaths, struct ovsdb_idl_index *sbrec_port_binding_by_key, struct ovsdb_idl_index *sbrec_datapath_binding_by_key, struct ovsdb_idl_index *sbrec_port_binding_by_name, @@ -4176,7 +4177,8 @@ pinctrl_run(struct ovsdb_idl_txn *ovnsb_idl_txn, sbrec_port_binding_by_key, sbrec_igmp_groups, sbrec_ip_multicast_opts); - run_buffered_binding(mac_binding_table, sbrec_port_binding_by_key, + run_buffered_binding(mac_binding_table, local_datapaths, + sbrec_port_binding_by_key, sbrec_datapath_binding_by_key, sbrec_port_binding_by_name, sbrec_mac_binding_by_lport_ip); @@ -4943,6 +4945,7 @@ run_put_mac_bindings(struct ovsdb_idl_txn *ovnsb_idl_txn, static void run_buffered_binding(const struct sbrec_mac_binding_table *mac_binding_table, + const struct hmap *local_datapaths, struct ovsdb_idl_index *sbrec_port_binding_by_key, struct ovsdb_idl_index *sbrec_datapath_binding_by_key, struct ovsdb_idl_index *sbrec_port_binding_by_name, @@ -4961,6 +4964,10 @@ run_buffered_binding(const struct sbrec_mac_binding_table *mac_binding_table, continue; } + if (!get_local_datapath(local_datapaths, smb->datapath->tunnel_key)) { + continue; + } + const struct sbrec_port_binding *pb = lport_lookup_by_name( sbrec_port_binding_by_name, smb->logical_port);
There's no point to process MAC binding updates for non-local datapaths. If they were local before but not anymore we don't really have a reason to send any buffered packets for them anymore. Fixes: bbd5e0d81c16 ("controller: improve buffered packets management") Signed-off-by: Dumitru Ceara <dceara@redhat.com> --- controller/pinctrl.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)