aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/bonding/node.c
diff options
context:
space:
mode:
authorSteven <sluong@cisco.com>2018-04-23 17:06:24 -0700
committerChris Luke <chris_luke@comcast.com>2018-04-24 10:59:37 +0000
commit42c6599bf3057a7e8f4f00f5b6a9dd72af48d283 (patch)
treed86150c22a8440285f59c4deefdb8eeb454b7bd8 /src/vnet/bonding/node.c
parentb0a517b6c881ad82ac15e52e832056314216058d (diff)
lacp: deleting the bond subinterface may cause lacp to lose the partner [VPP-1251]
Problem: When the bond subinterface is removed, it was observed that we lost the lacp partner. Show hardware shows rx counter goes up, but show interface does not for the slave interfaces. Cause: We reset the interface promiscuous mode when the bond subinterface is deleted. This causes dpdk not to accept any packet. Leave the interface in promiscuous mode fixes the problem. Other fixes: There are few places we use hw_if_index as if they are sw_if_index. But they don't necessarily have the same value. As soon as a subinterface is created, they start to diverge. The fix is to use the correct API for the hw_if_index and sw_if_index. Change-Id: I1e6b8bca0a4aae396d217a141271cbf968500c91 Signed-off-by: Steven <sluong@cisco.com>
Diffstat (limited to 'src/vnet/bonding/node.c')
-rw-r--r--src/vnet/bonding/node.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/vnet/bonding/node.c b/src/vnet/bonding/node.c
index b831d40540e..65d3ba10470 100644
--- a/src/vnet/bonding/node.c
+++ b/src/vnet/bonding/node.c
@@ -483,9 +483,8 @@ bond_hw_interface_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags)
slave_if_t *sif;
vnet_sw_interface_t *sw;
vlib_main_t *vm = bm->vlib_main;
- vnet_interface_main_t *im = &vnm->interface_main;
- sw = pool_elt_at_index (im->sw_interfaces, hw_if_index);
+ sw = vnet_get_hw_sw_interface (vnm, hw_if_index);
sif = bond_get_slave_by_sw_if_index (sw->sw_if_index);
if (sif)
{