aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vnet/vnet/devices/dpdk/device.c12
-rw-r--r--vnet/vnet/devices/dpdk/init.c18
2 files changed, 18 insertions, 12 deletions
diff --git a/vnet/vnet/devices/dpdk/device.c b/vnet/vnet/devices/dpdk/device.c
index 35cf87f0008..27e352294b9 100644
--- a/vnet/vnet/devices/dpdk/device.c
+++ b/vnet/vnet/devices/dpdk/device.c
@@ -1094,6 +1094,18 @@ dpdk_interface_admin_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags)
*/
if (xd->pmd != VNET_DPDK_PMD_VMXNET3)
rte_eth_dev_stop (xd->device_index);
+
+ /* For bonded interface, stop slave links */
+ if (xd->pmd == VNET_DPDK_PMD_BOND)
+ {
+ u8 slink[16];
+ int nlink = rte_eth_bond_slaves_get(xd->device_index, slink, 16);
+ while (nlink >=1)
+ {
+ u8 dpdk_port = slink[--nlink];
+ rte_eth_dev_stop (dpdk_port);
+ }
+ }
}
if (rv < 0)
diff --git a/vnet/vnet/devices/dpdk/init.c b/vnet/vnet/devices/dpdk/init.c
index d78f893f4fe..6ac5dbec9d1 100644
--- a/vnet/vnet/devices/dpdk/init.c
+++ b/vnet/vnet/devices/dpdk/init.c
@@ -1541,12 +1541,12 @@ dpdk_process (vlib_main_t * vm,
dpdk_update_link_state (xd, now);
}
-{ // Extra set up for bond interfaces:
- // 1. Setup MACs for bond interfaces and their slave links which was set
- // in dpdk_port_setup() but needs to be done again here to take effect.
- // 2. Set max L3 packet size of each bond interface to the lowerst value of
- // its slave links
- // 3. Set up info for bond interface related CLI support.
+{ /*
+ * Extra set up for bond interfaces:
+ * 1. Setup MACs for bond interfaces and their slave links which was set
+ * in dpdk_port_setup() but needs to be done again here to take effect.
+ * 2. Set up info for bond interface related CLI support.
+ */
int nports = rte_eth_dev_count();
if (nports > 0) {
for (i = 0; i < nports; i++) {
@@ -1592,12 +1592,6 @@ dpdk_process (vlib_main_t * vm,
ssi = vnet_get_sw_interface(vnm, sdev->vlib_sw_if_index);
shi->bond_info = VNET_HW_INTERFACE_BOND_INFO_SLAVE;
ssi->flags |= VNET_SW_INTERFACE_FLAG_BOND_SLAVE;
- /* Set l3 packet size allowed as the lowest of slave */
- if (bhi->max_l3_packet_bytes[VLIB_RX] >
- shi->max_l3_packet_bytes[VLIB_RX])
- bhi->max_l3_packet_bytes[VLIB_RX] =
- bhi->max_l3_packet_bytes[VLIB_TX] =
- shi->max_l3_packet_bytes[VLIB_RX];
}
}
}