diff options
author | Steve Shin <jonshin@cisco.com> | 2018-03-30 00:40:40 -0700 |
---|---|---|
committer | John Lo <loj@cisco.com> | 2018-03-30 13:33:40 +0000 |
commit | c1613a72a7ef5443319a868879804bb53714068d (patch) | |
tree | ec9c14f32999b3ab4fd6962d9a57afe7970111b4 /src/plugins/dpdk/device | |
parent | 30684ac044bbb8e11ef100a24c01eb37ba7a8876 (diff) |
dpdk: fix crash due to incorrect xd->flags value with slave's link toggling
xd->flags is set incorrectly when a slave link is down in bonded interface mode.
This can result in VPP crash when data traffic flows to the interface.
Change-Id: Ideb9f5231db1211e8452c52fde646d681310c951
Signed-off-by: Steve Shin <jonshin@cisco.com>
Diffstat (limited to 'src/plugins/dpdk/device')
-rw-r--r-- | src/plugins/dpdk/device/common.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/dpdk/device/common.c b/src/plugins/dpdk/device/common.c index e8f33cf22e0..3f113aaf22f 100644 --- a/src/plugins/dpdk/device/common.c +++ b/src/plugins/dpdk/device/common.c @@ -280,8 +280,11 @@ dpdk_port_state_callback_inline (dpdk_portid_t port_id, vl_api_force_rpc_call_main_thread (garp_na_proc_callback, (u8 *) & bd_port, sizeof (uword)); } - xd->flags |= link_up ? - DPDK_DEVICE_FLAG_BOND_SLAVE_UP : ~DPDK_DEVICE_FLAG_BOND_SLAVE_UP; + + if (link_up) + xd->flags |= DPDK_DEVICE_FLAG_BOND_SLAVE_UP; + else + xd->flags &= ~DPDK_DEVICE_FLAG_BOND_SLAVE_UP; } else /* Should not happen as callback not setup for "normal" links */ { |