Skip to content

Commit

Permalink
Merge pull request #460 from bisdn/jogo_fix_l2_move_learn
Browse files Browse the repository at this point in the history
fix setup learning for ports
  • Loading branch information
jklare authored Feb 14, 2025
2 parents ec5fba8 + 7170e72 commit 7737d74
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
6 changes: 6 additions & 0 deletions src/netlink/cnetlink.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1473,6 +1473,12 @@ void cnetlink::link_created(rtnl_link *link) noexcept {

port_man->set_offloaded(link, FLAGS_mark_fwd_offload);
swi->port_set_config(port_id, port_man->get_hwaddr(port_id), false);
swi->port_set_learn(
port_id, switch_interface::
SAI_BRIDGE_PORT_FDB_LEARNING_MODE_FDB_LOG_NOTIFICATION);
swi->port_set_move_learn(
port_id, switch_interface::
SAI_BRIDGE_PORT_FDB_LEARNING_MODE_FDB_LOG_NOTIFICATION);
} else {
LOG(WARNING) << __FUNCTION__ << ": ignoring link with lt=" << lt
<< " link:" << link;
Expand Down
8 changes: 0 additions & 8 deletions src/netlink/nbi_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,6 @@ void nbi_impl::port_notification(
case PORT_EVENT_TABLE:
switch (get_port_type(ntfy.port_id)) {
case nbi::port_type_physical:
swi->port_set_learn(
ntfy.port_id,
switch_interface::
SAI_BRIDGE_PORT_FDB_LEARNING_MODE_FDB_LOG_NOTIFICATION);
swi->port_set_move_learn(
ntfy.port_id,
switch_interface::
SAI_BRIDGE_PORT_FDB_LEARNING_MODE_FDB_LOG_NOTIFICATION);
port_man->create_portdev(ntfy.port_id, ntfy.name, ntfy.hwaddr, *this);
break;
default:
Expand Down
2 changes: 1 addition & 1 deletion src/of-dpa/controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ int controller::port_set_move_learn(
if (rv)
return rv;

return ofdpa->ofdpaPortSourceMacMoveLearningSet(port_id, l2_learn);
return ofdpa->ofdpaPortSourceMacMoveLearningSet(port_id, flags);
}

int controller::lag_create(uint32_t *lag_id, std::string name,
Expand Down

0 comments on commit 7737d74

Please sign in to comment.