bond: packet drops on VPP bond interface [VPP-1544] 29/17029/1
authorSteven <[email protected]>
Thu, 17 Jan 2019 23:11:29 +0000 (15:11 -0800)
committersteven luong <[email protected]>
Wed, 23 Jan 2019 22:40:17 +0000 (22:40 +0000)
commit38befb3a5355fbf9ae53df6fecbd684efdbbe5d3
tree6080d03d92b47e22708e0cbff9042d0603be54f0
parent0cb68778ecdf2d46a8cf3183356ef0ba6af1ed44
bond: packet drops on VPP bond interface [VPP-1544]

We register callback for VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION and
VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION to add and remove the slave
interface from the bond interface accordingly. For static bonding without
lacp, one would think that it is good enough to put the slave interface into
the ective slave set as soon as it is configured. Wrong, sometimes the slave
interface is configured to be part of the bonding without ever bringing up the
hardware carrier or setting the admin state to up. In that case, we send
traffic to the "dead" slave interface.

The fix is to make sure both the carrier and admin state are up before we put
the slave into the active set for forwarding traffic.

Change-Id: I93b1c36d5481ca76cc8b87e8ca1b375ca3bd453b
Signed-off-by: Steven <[email protected]>
(cherry picked from commit e43278f75fe3188551580c7d7991958805756e2f)
src/vnet/bonding/cli.c
src/vnet/bonding/node.c