From 6ccd29f2901f53b6ae7f22b800b8eeecc367f605 Mon Sep 17 00:00:00 2001 From: Rubens Figueiredo Date: Wed, 16 Dec 2020 18:09:01 +0100 Subject: [PATCH] baseboxd: fix whitespace --- src/netlink/cnetlink.cc | 91 ++++++++++++++++++++-------------------- src/netlink/nbi_impl.cc | 2 +- src/netlink/nl_bond.cc | 12 +++--- src/netlink/nl_bridge.cc | 39 ++++++++--------- src/netlink/nl_l3.cc | 4 +- src/netlink/nl_vlan.cc | 45 ++++++++++---------- src/netlink/nl_vlan.h | 11 +++-- src/netlink/nl_vxlan.cc | 60 +++++++++++++------------- src/of-dpa/controller.cc | 6 +-- 9 files changed, 136 insertions(+), 134 deletions(-) diff --git a/src/netlink/cnetlink.cc b/src/netlink/cnetlink.cc index a03ba8c75..227ebdbd7 100644 --- a/src/netlink/cnetlink.cc +++ b/src/netlink/cnetlink.cc @@ -257,11 +257,12 @@ struct rtnl_link *cnetlink::get_link(int ifindex, int family) const { rtnl_link_set_family(filter.get(), family); // search link by filter - nl_cache_foreach_filter(caches[NL_LINK_CACHE], OBJ_CAST(filter.get()), - [](struct nl_object *obj, void *arg) { - *static_cast(arg) = obj; - }, - &_link); + nl_cache_foreach_filter( + caches[NL_LINK_CACHE], OBJ_CAST(filter.get()), + [](struct nl_object *obj, void *arg) { + *static_cast(arg) = obj; + }, + &_link); if (_link == nullptr) { // check the garbage @@ -280,9 +281,8 @@ struct rtnl_link *cnetlink::get_link(int ifindex, int family) const { return _link; } -void cnetlink::get_bridge_ports(int br_ifindex, - std::deque *link_list) const - noexcept { +void cnetlink::get_bridge_ports( + int br_ifindex, std::deque *link_list) const noexcept { assert(link_list); if (!bridge) @@ -295,17 +295,16 @@ void cnetlink::get_bridge_ports(int br_ifindex, rtnl_link_set_family(filter.get(), AF_BRIDGE); rtnl_link_set_master(filter.get(), br_ifindex); - nl_cache_foreach_filter(caches[NL_LINK_CACHE], OBJ_CAST(filter.get()), - [](struct nl_object *obj, void *arg) { - assert(arg); - auto *list = - static_cast *>(arg); + nl_cache_foreach_filter( + caches[NL_LINK_CACHE], OBJ_CAST(filter.get()), + [](struct nl_object *obj, void *arg) { + assert(arg); + auto *list = static_cast *>(arg); - VLOG(3) << __FUNCTION__ << ": found bridge port " - << obj; - list->push_back(LINK_CAST(obj)); - }, - link_list); + VLOG(3) << __FUNCTION__ << ": found bridge port " << obj; + list->push_back(LINK_CAST(obj)); + }, + link_list); // check the garbage for (auto &obj : nl_objs) { @@ -348,8 +347,8 @@ int cnetlink::add_l3_addr(struct rtnl_addr *a) { int cnetlink::del_l3_addr(struct rtnl_addr *a) { return l3->del_l3_addr(a); } -void cnetlink::get_vlans(int ifindex, std::deque *vlan_list) const - noexcept { +void cnetlink::get_vlans(int ifindex, + std::deque *vlan_list) const noexcept { assert(vlan_list); std::unique_ptr filter(rtnl_link_alloc(), @@ -360,19 +359,18 @@ void cnetlink::get_vlans(int ifindex, std::deque *vlan_list) const rtnl_link_set_type(filter.get(), "vlan"); rtnl_link_set_link(filter.get(), ifindex); - nl_cache_foreach_filter(caches[NL_LINK_CACHE], OBJ_CAST(filter.get()), - [](struct nl_object *obj, void *arg) { - assert(arg); - auto *list = - static_cast *>(arg); - uint16_t vid; - - VLOG(3) << __FUNCTION__ << ": found vlan interface " - << obj; - vid = rtnl_link_vlan_get_id(LINK_CAST(obj)); - list->push_back(vid); - }, - vlan_list); + nl_cache_foreach_filter( + caches[NL_LINK_CACHE], OBJ_CAST(filter.get()), + [](struct nl_object *obj, void *arg) { + assert(arg); + auto *list = static_cast *>(arg); + uint16_t vid; + + VLOG(3) << __FUNCTION__ << ": found vlan interface " << obj; + vid = rtnl_link_vlan_get_id(LINK_CAST(obj)); + list->push_back(vid); + }, + vlan_list); } struct rtnl_neigh *cnetlink::get_neighbour(int ifindex, @@ -447,14 +445,14 @@ int cnetlink::get_port_id(int ifindex) const { int port_id = tap_man->get_port_id(ifindex); if (port_id > 0) - return port_id; + return port_id; return bond->get_lag_id(ifindex); } int cnetlink::get_ifindex_by_port_id(uint32_t port_id) const { - return tap_man->get_ifindex(port_id); + return tap_man->get_ifindex(port_id); } uint16_t cnetlink::get_vrf_table_id(rtnl_link *link) { @@ -1103,36 +1101,39 @@ void cnetlink::link_updated(rtnl_link *old_link, rtnl_link *new_link) noexcept { << OBJ_CAST( get_link_by_ifindex(rtnl_link_get_master(new_link)).get()); // Lookup l3 addresses to delete - // We can delete the addresses on the interface because we will later receive a - // notification readding the addresses, that time with the correct VRF + // We can delete the addresses on the interface because we will later + // receive a notification readding the addresses, that time with the correct + // VRF std::deque addresses; get_l3_addrs(old_link, &addresses); for (auto i : addresses) l3->del_l3_addr(i); vlan->vrf_attach(old_link, new_link); - } break; + } break; case LT_VRF_SLAVE: { if (lt_new == LT_VLAN) { LOG(INFO) << __FUNCTION__ << ": freed vrf slave interface " << OBJ_CAST(old_link); // Lookup l3 addresses to delete - // We can delete the addresses on the interface because we will later receive a - // notification readding the addresses, that time with the correct VRF + // We can delete the addresses on the interface because we will later + // receive a notification readding the addresses, that time with the + // correct VRF std::deque addresses; get_l3_addrs(old_link, &addresses); - // delete l3 addresses no longer associated with vrf - for (auto i: addresses) - l3->del_l3_addr(i); + // delete l3 addresses no longer associated with vrf + for (auto i : addresses) + l3->del_l3_addr(i); vlan->vrf_detach(old_link, new_link); } else if (lt_new == LT_VRF_SLAVE) { LOG(INFO) << __FUNCTION__ << ": link updated " << OBJ_CAST(new_link); vlan->vrf_attach(old_link, new_link); } // TODO handle LT_TAP/LT_BOND, currently unimplemented - // happens when a bond/tap interface enslaved directly to a VRF and you set nomaster - } break; + // happens when a bond/tap interface enslaved directly to a VRF and you set + // nomaster + } break; case LT_TUN: if (lt_new == LT_BOND_SLAVE) { // XXX link enslaved diff --git a/src/netlink/nbi_impl.cc b/src/netlink/nbi_impl.cc index 8d83f791e..ff7fc9a61 100644 --- a/src/netlink/nbi_impl.cc +++ b/src/netlink/nbi_impl.cc @@ -38,7 +38,7 @@ void nbi_impl::port_notification( switch (get_port_type(ntfy.port_id)) { case nbi::port_type_physical: tap_man->change_port_status(ntfy.name, ntfy.status); - tap_man->set_port_speed(ntfy.name, ntfy.speed, ntfy.duplex); + tap_man->set_port_speed(ntfy.name, ntfy.speed, ntfy.duplex); break; default: LOG(ERROR) << __FUNCTION__ << ": unknown port"; diff --git a/src/netlink/nl_bond.cc b/src/netlink/nl_bond.cc index cc8ec5ac8..d707e654f 100644 --- a/src/netlink/nl_bond.cc +++ b/src/netlink/nl_bond.cc @@ -60,8 +60,8 @@ std::set nl_bond::get_members(rtnl_link *bond) { std::set nl_bond::get_members_by_port_id(uint32_t port_id) { auto mem_it = lag_members.find(port_id); if (mem_it == lag_members.end()) { - LOG(WARNING) << __FUNCTION__ << ": lag does not exist for port_id=" - << port_id; + LOG(WARNING) << __FUNCTION__ + << ": lag does not exist for port_id=" << port_id; return {}; } @@ -339,11 +339,11 @@ int nl_bond::remove_lag_member(rtnl_link *bond, rtnl_link *link) { nl->get_vlans(rtnl_link_get_ifindex(bond), &vlans); - if (lm_rv->second.empty()) - remove_l3_address(bond); + if (lm_rv->second.empty()) + remove_l3_address(bond); - if (nl->is_bridge_interface(bond)) - swi->ofdpa_stg_state_port_set(port_id, "forward"); + if (nl->is_bridge_interface(bond)) + swi->ofdpa_stg_state_port_set(port_id, "forward"); for (auto vid : vlans) { swi->ingress_port_vlan_remove(port_id, vid, false); diff --git a/src/netlink/nl_bridge.cc b/src/netlink/nl_bridge.cc index d53e5f642..3ea33b1ea 100644 --- a/src/netlink/nl_bridge.cc +++ b/src/netlink/nl_bridge.cc @@ -371,7 +371,7 @@ void nl_bridge::update_vlans(rtnl_link *old_link, rtnl_link *new_link) { uint32_t b = new_br_vlan->vlan_bitmap[k]; uint32_t vlan_diff = a ^ b; -#if 0 // untagged change not yet implemented +#if 0 // untagged change not yet implemented uint32_t c = old_br_vlan->untagged_bitmap[k]; uint32_t d = new_br_vlan->untagged_bitmap[k]; uint32_t untagged_diff = c ^ d; @@ -391,8 +391,8 @@ void nl_bridge::update_vlans(rtnl_link *old_link, rtnl_link *new_link) { if (new_br_vlan->untagged_bitmap[k] & 1 << (j - 1)) { egress_untagged = true; -#if 0 // untagged change not yet implemented - // clear untagged_diff bit +#if 0 // untagged change not yet implemented + // clear untagged_diff bit untagged_diff &= ~((uint32_t)1 << (j - 1)); #endif // 0 } @@ -434,7 +434,7 @@ void nl_bridge::update_vlans(rtnl_link *old_link, rtnl_link *new_link) { VLOG(3) << __FUNCTION__ << ": add vid=" << vid << " on pport_no=" << pport_no << " link: " << OBJ_CAST(_link); - vlan->add_bridge_vlan(_link, vid, new_br_vlan->pvid == vid, + vlan->add_bridge_vlan(_link, vid, new_br_vlan->pvid == vid, !egress_untagged); } } @@ -465,12 +465,13 @@ void nl_bridge::update_vlans(rtnl_link *old_link, rtnl_link *new_link) { rtnl_neigh_set_flags(filter.get(), NTF_MASTER | NTF_EXT_LEARNED); rtnl_neigh_set_state(filter.get(), NUD_REACHABLE); - nl_cache_foreach_filter(l2_cache.get(), OBJ_CAST(filter.get()), - [](struct nl_object *o, void *arg) { - VLOG(3) << "l2_cache remove object " << o; - nl_cache_remove(o); - }, - nullptr); + nl_cache_foreach_filter( + l2_cache.get(), OBJ_CAST(filter.get()), + [](struct nl_object *o, void *arg) { + VLOG(3) << "l2_cache remove object " << o; + nl_cache_remove(o); + }, + nullptr); vlan->remove_bridge_vlan(_link, vid, new_br_vlan->pvid == vid, !egress_untagged); @@ -531,14 +532,14 @@ std::deque nl_bridge::get_fdb_entries_of_port(rtnl_link *br_port, VLOG(3) << __FUNCTION__ << ": searching for " << OBJ_CAST(filter.get()); std::deque neighs; - nl_cache_foreach_filter(nl->get_cache(cnetlink::NL_NEIGH_CACHE), - OBJ_CAST(filter.get()), - [](struct nl_object *o, void *arg) { - auto *neighs = (std::deque *)arg; - neighs->push_back(NEIGH_CAST(o)); - VLOG(3) << "needs to be updated " << o; - }, - &neighs); + nl_cache_foreach_filter( + nl->get_cache(cnetlink::NL_NEIGH_CACHE), OBJ_CAST(filter.get()), + [](struct nl_object *o, void *arg) { + auto *neighs = (std::deque *)arg; + neighs->push_back(NEIGH_CAST(o)); + VLOG(3) << "needs to be updated " << o; + }, + &neighs); return neighs; } @@ -645,7 +646,7 @@ void nl_bridge::update_access_ports(rtnl_link *vxlan_link, rtnl_link *br_link, vxlan->delete_access_port(_br_port, pport_no, vid, true); vlan->add_bridge_vlan(_br_port, vid, br_port_vlans->pvid == vid, - !untagged); + !untagged); auto neighs = get_fdb_entries_of_port(_br_port, vid); for (auto n : neighs) { diff --git a/src/netlink/nl_l3.cc b/src/netlink/nl_l3.cc index e08f7620b..6d676557b 100644 --- a/src/netlink/nl_l3.cc +++ b/src/netlink/nl_l3.cc @@ -1328,8 +1328,8 @@ int nl_l3::get_l3_interface_id(int ifindex, const struct nl_addr *s_mac, *l3_interface_id = i->second.l3_interface_id; VLOG(2) << __FUNCTION__ << ": l3_interface_id " << *l3_interface_id - << " found for port " << port_id << ", src_mac " << src_mac - << ", dst_mac " << dst_mac << ", vid " << vid; + << " found for port " << port_id << ", src_mac " << src_mac + << ", dst_mac " << dst_mac << ", vid " << vid; return 0; } } diff --git a/src/netlink/nl_vlan.cc b/src/netlink/nl_vlan.cc index ba35b9fe8..b51fe113a 100644 --- a/src/netlink/nl_vlan.cc +++ b/src/netlink/nl_vlan.cc @@ -41,8 +41,7 @@ int nl_vlan::add_vlan(rtnl_link *link, uint16_t vid, bool tagged) { int rv = swi->ingress_port_vlan_add(port_id, vid, !tagged, vrf_id); if (rv < 0) { - LOG(ERROR) << __FUNCTION__ - << ": failed to setup ingress vlan " << vid + LOG(ERROR) << __FUNCTION__ << ": failed to setup ingress vlan " << vid << (tagged ? " (tagged)" : " (untagged)") << " on port_id=" << port_id << "; rv=" << rv; return rv; @@ -53,11 +52,10 @@ int nl_vlan::add_vlan(rtnl_link *link, uint16_t vid, bool tagged) { for (auto mem : members) { rv = swi->ingress_port_vlan_add(mem, vid, !tagged, vrf_id); if (rv < 0) { - LOG(ERROR) << __FUNCTION__ - << ": failed to setup ingress vlan " << vid - << (tagged ? " (tagged)" : " (untagged)") + LOG(ERROR) << __FUNCTION__ << ": failed to setup ingress vlan " << vid + << (tagged ? " (tagged)" : " (untagged)") << " on port_id=" << port_id << "; rv=" << rv; - break; + break; } } @@ -73,8 +71,7 @@ int nl_vlan::add_vlan(rtnl_link *link, uint16_t vid, bool tagged) { rv = swi->egress_port_vlan_add(port_id, vid, !tagged); if (rv < 0) { - LOG(ERROR) << __FUNCTION__ - << ": failed to setup egress vlan " << vid + LOG(ERROR) << __FUNCTION__ << ": failed to setup egress vlan " << vid << (tagged ? " (tagged)" : " (untagged)") << " on port_id=" << port_id << "; rv=" << rv; (void)swi->ingress_port_vlan_remove(port_id, vid, !tagged); @@ -101,11 +98,10 @@ int nl_vlan::add_vlan(rtnl_link *link, uint16_t vid, bool tagged) { for (auto mem : members) { rv = swi->egress_port_vlan_add(mem, vid, !tagged); if (rv < 0) { - LOG(ERROR) << __FUNCTION__ - << ": failed to setup egress vlan " << vid - << (tagged ? " (tagged)" : " (untagged)") + LOG(ERROR) << __FUNCTION__ << ": failed to setup egress vlan " << vid + << (tagged ? " (tagged)" : " (untagged)") << " on port_id=" << port_id << "; rv=" << rv; - break; + break; } } @@ -126,7 +122,7 @@ int nl_vlan::add_vlan(rtnl_link *link, uint16_t vid, bool tagged) { // add vid at ingress int nl_vlan::add_ingress_vlan(uint32_t port_id, uint16_t vid, bool tagged, - uint16_t vrf_id) { + uint16_t vrf_id) { int rv; @@ -246,7 +242,7 @@ int nl_vlan::add_bridge_vlan(rtnl_link *link, uint16_t vid, bool pvid, uint16_t vrf_id = get_vrf_id(vid, link); VLOG(2) << __FUNCTION__ << ": add vid=" << vid << " pvid=" << pvid - << " tagged=" << tagged << " vrf=" << vrf_id; + << " tagged=" << tagged << " vrf=" << vrf_id; if (!is_vid_valid(vid)) { LOG(ERROR) << __FUNCTION__ << ": invalid vid " << vid; @@ -266,16 +262,16 @@ int nl_vlan::add_bridge_vlan(rtnl_link *link, uint16_t vid, bool pvid, rv = swi->ingress_port_vlan_add(port_id, vid, pvid, vrf_id); if (rv < 0) { - swi->egress_bridge_port_vlan_remove(port_id, vid); - return rv; + swi->egress_bridge_port_vlan_remove(port_id, vid); + return rv; } if (nbi::get_port_type(port_id) == nbi::port_type_lag) { auto members = nl->get_bond_members_by_port_id(port_id); for (auto mem : members) { - swi->egress_bridge_port_vlan_add(mem, vid, !tagged); - swi->ingress_port_vlan_add(mem, vid, pvid, vrf_id); + swi->egress_bridge_port_vlan_add(mem, vid, !tagged); + swi->ingress_port_vlan_add(mem, vid, pvid, vrf_id); } if (rv < 0) { @@ -293,7 +289,7 @@ void nl_vlan::remove_bridge_vlan(rtnl_link *link, uint16_t vid, bool pvid, uint16_t vrf_id = get_vrf_id(vid, link); VLOG(2) << __FUNCTION__ << ": remove vid=" << vid << " pvid=" << pvid - << " tagged=" << tagged << " vrf=" << vrf_id; + << " tagged=" << tagged << " vrf=" << vrf_id; if (!is_vid_valid(vid)) { LOG(ERROR) << __FUNCTION__ << ": invalid vid " << vid; @@ -311,8 +307,8 @@ void nl_vlan::remove_bridge_vlan(rtnl_link *link, uint16_t vid, bool pvid, auto members = nl->get_bond_members_by_port_id(port_id); for (auto mem : members) { - swi->egress_bridge_port_vlan_remove(mem, vid); - swi->ingress_port_vlan_remove(mem, vid, pvid, vrf_id); + swi->egress_bridge_port_vlan_remove(mem, vid); + swi->ingress_port_vlan_remove(mem, vid, pvid, vrf_id); } } @@ -395,7 +391,8 @@ void nl_vlan::vrf_attach(rtnl_link *old_link, rtnl_link *new_link) { add_ingress_vlan(nl->get_port_id(link.get()), vid, true, vrf); } - VLOG(1) << __FUNCTION__ << ": attached=" << OBJ_CAST(new_link) << " to VRF id=" << vrf; + VLOG(1) << __FUNCTION__ << ": attached=" << OBJ_CAST(new_link) + << " to VRF id=" << vrf; } void nl_vlan::vrf_detach(rtnl_link *old_link, rtnl_link *new_link) { @@ -423,9 +420,9 @@ void nl_vlan::vrf_detach(rtnl_link *old_link, rtnl_link *new_link) { add_ingress_vlan(nl->get_port_id(link.get()), vid, true); } - VLOG(1) << __FUNCTION__ << ": detached=" << OBJ_CAST(new_link) << " to VRF id=" << vrf->second; + VLOG(1) << __FUNCTION__ << ": detached=" << OBJ_CAST(new_link) + << " to VRF id=" << vrf->second; vlan_vrf.erase(vrf); - } } // namespace basebox diff --git a/src/netlink/nl_vlan.h b/src/netlink/nl_vlan.h index 0989821eb..90c13bb4d 100644 --- a/src/netlink/nl_vlan.h +++ b/src/netlink/nl_vlan.h @@ -23,10 +23,13 @@ class nl_vlan { int add_vlan(rtnl_link *link, uint16_t vid, bool tagged); int remove_vlan(rtnl_link *link, uint16_t vid, bool tagged); - int add_ingress_vlan(uint32_t port_id, uint16_t vid, bool tagged, uint16_t vrf_id=0); - int remove_ingress_vlan(uint32_t port_id, uint16_t vid, bool tagged, uint16_t vrf_id=0); - int add_bridge_vlan(rtnl_link *link, uint16_t vid, bool pvid, bool tagged); - void remove_bridge_vlan(rtnl_link *link, uint16_t vid, bool pvid, bool tagged); + int add_ingress_vlan(uint32_t port_id, uint16_t vid, bool tagged, + uint16_t vrf_id = 0); + int remove_ingress_vlan(uint32_t port_id, uint16_t vid, bool tagged, + uint16_t vrf_id = 0); + int add_bridge_vlan(rtnl_link *link, uint16_t vid, bool pvid, bool tagged); + void remove_bridge_vlan(rtnl_link *link, uint16_t vid, bool pvid, + bool tagged); uint16_t get_vid(rtnl_link *link); diff --git a/src/netlink/nl_vxlan.cc b/src/netlink/nl_vxlan.cc index 7a55182b2..bbeaa857f 100644 --- a/src/netlink/nl_vxlan.cc +++ b/src/netlink/nl_vxlan.cc @@ -201,14 +201,14 @@ int nl_vxlan::init() { } std::deque vxlan_links; - nl_cache_foreach_filter(c, OBJ_CAST(link_filter.get()), - [](struct nl_object *obj, void *arg) { - LOG(INFO) << "found link " << obj; - auto vxlan_links = - static_cast *>(arg); - vxlan_links->push_back(LINK_CAST(obj)); - }, - &vxlan_links); + nl_cache_foreach_filter( + c, OBJ_CAST(link_filter.get()), + [](struct nl_object *obj, void *arg) { + LOG(INFO) << "found link " << obj; + auto vxlan_links = static_cast *>(arg); + vxlan_links->push_back(LINK_CAST(obj)); + }, + &vxlan_links); for (auto link : vxlan_links) { rv = create_vni(link); @@ -239,14 +239,14 @@ int nl_vxlan::init() { rtnl_neigh_set_family(neigh_filter.get(), AF_BRIDGE); c = nl->get_cache(cnetlink::NL_NEIGH_CACHE); - nl_cache_foreach_filter(c, OBJ_CAST(neigh_filter.get()), - [](struct nl_object *obj, void *arg) { - LOG(INFO) << "found neigh " << obj; - auto neighs = - static_cast *>(arg); - neighs->push_back(NEIGH_CAST(obj)); - }, - &neighs); + nl_cache_foreach_filter( + c, OBJ_CAST(neigh_filter.get()), + [](struct nl_object *obj, void *arg) { + LOG(INFO) << "found neigh " << obj; + auto neighs = static_cast *>(arg); + neighs->push_back(NEIGH_CAST(obj)); + }, + &neighs); for (auto neigh : neighs) { auto br_link = nl->get_link(rtnl_link_get_ifindex(link), AF_BRIDGE); @@ -656,20 +656,20 @@ int nl_vxlan::create_endpoint(rtnl_link *vxlan_link, rtnl_link *br_link, rtnl_neigh_set_family(neigh_filter.get(), AF_BRIDGE); auto c = nl->get_cache(cnetlink::NL_NEIGH_CACHE); - nl_cache_foreach_filter(c, OBJ_CAST(neigh_filter.get()), - [](struct nl_object *obj, void *arg) { - auto n = NEIGH_CAST(obj); - - // ignore remotes - if (nl_addr_iszero(rtnl_neigh_get_lladdr(n))) - return; - - VLOG(3) << "found neigh for endpoint " << obj; - auto neighs = - static_cast *>(arg); - neighs->push_back(n); - }, - &neighs); + nl_cache_foreach_filter( + c, OBJ_CAST(neigh_filter.get()), + [](struct nl_object *obj, void *arg) { + auto n = NEIGH_CAST(obj); + + // ignore remotes + if (nl_addr_iszero(rtnl_neigh_get_lladdr(n))) + return; + + VLOG(3) << "found neigh for endpoint " << obj; + auto neighs = static_cast *>(arg); + neighs->push_back(n); + }, + &neighs); for (auto neigh : neighs) { rv = add_l2_neigh(neigh, lport_id, tunnel_id); diff --git a/src/of-dpa/controller.cc b/src/of-dpa/controller.cc index 52c91f2f8..80032a1c3 100644 --- a/src/of-dpa/controller.cc +++ b/src/of-dpa/controller.cc @@ -255,7 +255,8 @@ void controller::handle_error_message(rofl::crofdpt &dpt, VLOG(1) << __FUNCTION__ << ": dpid=" << dpt.get_dpid() << " pkt received: " << std::endl << msg; - LOG(WARNING) << __FUNCTION__ << ": " << (((uint32_t)msg.get_err_type() << 16) | msg.get_err_code()); + LOG(WARNING) << __FUNCTION__ << ": " + << (((uint32_t)msg.get_err_type() << 16) | msg.get_err_code()); VLOG(1) << __FUNCTION__ << msg; } @@ -873,8 +874,7 @@ int controller::l2_multicast_group_remove(uint32_t port, uint16_t vid, ? fm_driver.group_id_l2_trunk_interface(port, vid) : fm_driver.group_id_l2_interface(port, vid); - auto set_it = - it->l2_interface.find(group_id); + auto set_it = it->l2_interface.find(group_id); if (set_it == it->l2_interface.end()) { LOG(ERROR) << __FUNCTION__ << ": interface group not found"; return -EINVAL;