*/
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)
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++) {
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];
}
}
}