Run VPP's checkstyle to reformat the code
This commit is contained in:
@ -59,8 +59,8 @@ lcp_itf_pair_sync_state (lcp_itf_pair_t *lip)
|
||||
}
|
||||
|
||||
LCP_IF_INFO ("sync_state: %U flags %u sup-flags %u mtu %u sup-mtu %u",
|
||||
format_lcp_itf_pair, lip, sw->flags, sup_sw->flags,
|
||||
sw->mtu[VNET_MTU_L3], sup_sw->mtu[VNET_MTU_L3]);
|
||||
format_lcp_itf_pair, lip, sw->flags, sup_sw->flags,
|
||||
sw->mtu[VNET_MTU_L3], sup_sw->mtu[VNET_MTU_L3]);
|
||||
|
||||
/* Linux will not allow children to be admin-up if their parent is
|
||||
* admin-down. If child is up but parent is not, force it down.
|
||||
@ -69,11 +69,10 @@ lcp_itf_pair_sync_state (lcp_itf_pair_t *lip)
|
||||
|
||||
if (state && !(sup_sw->flags & VNET_SW_INTERFACE_FLAG_ADMIN_UP))
|
||||
{
|
||||
LCP_IF_WARN (
|
||||
"sync_state: %U flags %u sup-flags %u mtu %u sup-mtu %u: "
|
||||
"forcing state to sup-flags to satisfy netlink",
|
||||
format_lcp_itf_pair, lip, sw->flags, sup_sw->flags,
|
||||
sw->mtu[VNET_MTU_L3], sup_sw->mtu[VNET_MTU_L3]);
|
||||
LCP_IF_WARN ("sync_state: %U flags %u sup-flags %u mtu %u sup-mtu %u: "
|
||||
"forcing state to sup-flags to satisfy netlink",
|
||||
format_lcp_itf_pair, lip, sw->flags, sup_sw->flags,
|
||||
sw->mtu[VNET_MTU_L3], sup_sw->mtu[VNET_MTU_L3]);
|
||||
state = 0;
|
||||
}
|
||||
lcp_itf_set_link_state (lip, state);
|
||||
@ -90,9 +89,9 @@ lcp_itf_pair_sync_state (lcp_itf_pair_t *lip)
|
||||
if (sup_sw->mtu[VNET_MTU_L3] < sw->mtu[VNET_MTU_L3])
|
||||
{
|
||||
LCP_IF_WARN ("sync_state: %U flags %u mtu %u sup-mtu %u: "
|
||||
"clamping to sup-mtu to satisfy netlink",
|
||||
format_lcp_itf_pair, lip, sw->flags,
|
||||
sw->mtu[VNET_MTU_L3], sup_sw->mtu[VNET_MTU_L3]);
|
||||
"clamping to sup-mtu to satisfy netlink",
|
||||
format_lcp_itf_pair, lip, sw->flags, sw->mtu[VNET_MTU_L3],
|
||||
sup_sw->mtu[VNET_MTU_L3]);
|
||||
mtu = sup_sw->mtu[VNET_MTU_L3];
|
||||
}
|
||||
|
||||
@ -164,7 +163,7 @@ lcp_itf_pair_sync_state_hw (vnet_hw_interface_t *hi)
|
||||
if (!hi)
|
||||
return;
|
||||
LCP_IF_DBG ("sync_state_hw: hi %U", format_vnet_sw_if_index_name,
|
||||
vnet_get_main (), hi->hw_if_index);
|
||||
vnet_get_main (), hi->hw_if_index);
|
||||
|
||||
vnet_hw_interface_walk_sw (vnet_get_main (), hi->hw_if_index,
|
||||
lcp_itf_pair_walk_sync_state_hw_cb, NULL);
|
||||
@ -180,14 +179,14 @@ lcp_itf_admin_state_change (vnet_main_t * vnm, u32 sw_if_index, u32 flags)
|
||||
if (!lcp_sync ())
|
||||
return 0;
|
||||
|
||||
LCP_IF_DBG ("admin_state_change: sw %U %u",
|
||||
format_vnet_sw_if_index_name, vnm, sw_if_index,
|
||||
flags);
|
||||
LCP_IF_DBG ("admin_state_change: sw %U %u", format_vnet_sw_if_index_name,
|
||||
vnm, sw_if_index, flags);
|
||||
|
||||
// Sync interface state changes into host
|
||||
lip = lcp_itf_pair_get (lcp_itf_pair_find_by_phy (sw_if_index));
|
||||
if (!lip) return NULL;
|
||||
LCP_IF_INFO ("admin_state_change: %U flags %u", format_lcp_itf_pair, lip, flags);
|
||||
LCP_IF_INFO ("admin_state_change: %U flags %u", format_lcp_itf_pair, lip,
|
||||
flags);
|
||||
|
||||
if (vnet_sw_interface_is_sub (vnm, sw_if_index))
|
||||
{
|
||||
@ -208,8 +207,8 @@ lcp_itf_admin_state_change (vnet_main_t * vnm, u32 sw_if_index, u32 flags)
|
||||
if (!hi)
|
||||
return NULL;
|
||||
LCP_IF_DBG ("admin_state_change: si %U hi %U, syncing children",
|
||||
format_vnet_sw_if_index_name, vnm, si->sw_if_index,
|
||||
format_vnet_sw_if_index_name, vnm, hi->sw_if_index);
|
||||
format_vnet_sw_if_index_name, vnm, si->sw_if_index,
|
||||
format_vnet_sw_if_index_name, vnm, hi->sw_if_index);
|
||||
|
||||
lcp_itf_pair_sync_state_hw (hi);
|
||||
|
||||
@ -227,7 +226,7 @@ lcp_itf_mtu_change (vnet_main_t *vnm, u32 sw_if_index, u32 flags)
|
||||
return NULL;
|
||||
|
||||
LCP_IF_DBG ("mtu_change: sw %U %u", format_vnet_sw_if_index_name, vnm,
|
||||
sw_if_index, flags);
|
||||
sw_if_index, flags);
|
||||
|
||||
if (vnet_sw_interface_is_sub (vnm, sw_if_index))
|
||||
{
|
||||
@ -251,8 +250,8 @@ lcp_itf_mtu_change (vnet_main_t *vnm, u32 sw_if_index, u32 flags)
|
||||
if (!hi)
|
||||
return NULL;
|
||||
LCP_IF_DBG ("mtu_change: si %U hi %U, syncing children",
|
||||
format_vnet_sw_if_index_name, vnm, si->sw_if_index,
|
||||
format_vnet_sw_if_index_name, vnm, hi->sw_if_index);
|
||||
format_vnet_sw_if_index_name, vnm, si->sw_if_index,
|
||||
format_vnet_sw_if_index_name, vnm, hi->sw_if_index);
|
||||
|
||||
lcp_itf_pair_sync_state_hw (hi);
|
||||
|
||||
@ -412,8 +411,8 @@ lcp_itf_ip4_add_del_interface_addr (ip4_main_t *im, uword opaque,
|
||||
return;
|
||||
|
||||
LCP_IF_DBG ("ip4_addr_%s: si:%U %U/%u", is_del ? "del" : "add",
|
||||
format_vnet_sw_if_index_name, vnet_get_main (),
|
||||
sw_if_index, format_ip4_address, address, address_length);
|
||||
format_vnet_sw_if_index_name, vnet_get_main (), sw_if_index,
|
||||
format_ip4_address, address, address_length);
|
||||
|
||||
lip = lcp_itf_pair_get (lcp_itf_pair_find_by_phy (sw_if_index));
|
||||
if (!lip)
|
||||
@ -428,8 +427,8 @@ lcp_itf_ip4_add_del_interface_addr (ip4_main_t *im, uword opaque,
|
||||
}
|
||||
|
||||
LCP_IF_DBG ("ip4_addr_%s: %U ip4 %U/%u", is_del ? "del" : "add",
|
||||
format_lcp_itf_pair, lip, format_ip4_address, address,
|
||||
address_length);
|
||||
format_lcp_itf_pair, lip, format_ip4_address, address,
|
||||
address_length);
|
||||
|
||||
if (is_del)
|
||||
vnet_netlink_del_ip4_addr (lip->lip_vif_index, address, address_length);
|
||||
@ -461,8 +460,8 @@ lcp_itf_ip6_add_del_interface_addr (ip6_main_t *im, uword opaque,
|
||||
return;
|
||||
|
||||
LCP_IF_DBG ("ip6_addr_%s: si:%U %U/%u", is_del ? "del" : "add",
|
||||
format_vnet_sw_if_index_name, vnet_get_main (),
|
||||
sw_if_index, format_ip6_address, address, address_length);
|
||||
format_vnet_sw_if_index_name, vnet_get_main (), sw_if_index,
|
||||
format_ip6_address, address, address_length);
|
||||
|
||||
lip = lcp_itf_pair_get (lcp_itf_pair_find_by_phy (sw_if_index));
|
||||
if (!lip)
|
||||
@ -476,8 +475,8 @@ lcp_itf_ip6_add_del_interface_addr (ip6_main_t *im, uword opaque,
|
||||
clib_setns (vif_ns_fd);
|
||||
}
|
||||
LCP_IF_DBG ("ip6_addr_%s: %U ip4 %U/%u", is_del ? "del" : "add",
|
||||
format_lcp_itf_pair, lip, format_ip6_address, address,
|
||||
address_length);
|
||||
format_lcp_itf_pair, lip, format_ip6_address, address,
|
||||
address_length);
|
||||
if (is_del)
|
||||
vnet_netlink_del_ip6_addr (lip->lip_vif_index, address, address_length);
|
||||
else
|
||||
@ -510,9 +509,9 @@ lcp_itf_interface_add_del (vnet_main_t *vnm, u32 sw_if_index, u32 is_create)
|
||||
return NULL;
|
||||
|
||||
LCP_IF_DBG ("interface_%s: sw %U parent %U", is_create ? "add" : "del",
|
||||
format_vnet_sw_if_index_name, vnet_get_main (),
|
||||
sw->sw_if_index, format_vnet_sw_if_index_name,
|
||||
vnet_get_main (), sw->sup_sw_if_index);
|
||||
format_vnet_sw_if_index_name, vnet_get_main (), sw->sw_if_index,
|
||||
format_vnet_sw_if_index_name, vnet_get_main (),
|
||||
sw->sup_sw_if_index);
|
||||
|
||||
if (is_create)
|
||||
{
|
||||
|
Reference in New Issue
Block a user