aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/device.c
diff options
context:
space:
mode:
authorSteve Shin <jonshin@cisco.com>2017-04-22 06:58:23 -0700
committerSteve Shin <jonshin@cisco.com>2017-04-22 06:58:23 -0700
commitbc66a9122f73b97ca1ae60f1df47b39c141be3ae (patch)
treeb19de0de241ede85479daac5b24924acc673d221 /src/plugins/dpdk/device/device.c
parent77819f6ab4ac6525b51b92c78ea29e4b832a225b (diff)
Fix multicast enable on the bonded interface
Multicast enable flag should be set when the bonded interface is up. This flag allows multicast packets to be processed from the slave devices of the bonded interface. Also promiscuous mode for all-multicast should be correctly displayed as part of 'show hardware detail' output. Change-Id: Ief0157c4c030a28afb9c45ebf3d6a12710083724 Signed-off-by: Steve Shin <jonshin@cisco.com>
Diffstat (limited to 'src/plugins/dpdk/device/device.c')
-rw-r--r--src/plugins/dpdk/device/device.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/dpdk/device/device.c b/src/plugins/dpdk/device/device.c
index e84d524f720..48f3237b6a8 100644
--- a/src/plugins/dpdk/device/device.c
+++ b/src/plugins/dpdk/device/device.c
@@ -649,6 +649,18 @@ dpdk_interface_admin_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags)
rte_eth_promiscuous_disable (xd->device_index);
rte_eth_allmulticast_enable (xd->device_index);
+
+ 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_allmulticast_enable (dpdk_port);
+ }
+ }
+
xd->flags |= DPDK_DEVICE_FLAG_ADMIN_UP;
dpdk_update_counters (xd, now);
dpdk_update_link_state (xd, now);