Skip to content

Commit

Permalink
pinctrl: Skip non-local mac bindings in run_buffered_binding().
Browse files Browse the repository at this point in the history
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: bbd5e0d ("controller: improve buffered packets management")
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
Acked-by: Mark Michelson <mmichels@redhat.com>
Acked-by: Ales Musil <amusil@redhat.com>
(cherry picked from commit a86dcfb)
  • Loading branch information
dceara committed Nov 4, 2024
1 parent ea35347 commit 6448f5e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion controller/pinctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand All @@ -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);

Expand Down

0 comments on commit 6448f5e

Please sign in to comment.