From: Intel Date: Mon, 3 Jun 2013 00:00:00 +0000 (+0000) Subject: ethdev: set VMDq pool when adding mac address X-Git-Tag: spdx-start~11214 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=647ec408be749a7c7bbc815ceb24fedaa8e1a500;p=dpdk.git ethdev: set VMDq pool when adding mac address Signed-off-by: Intel --- diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index f7535c828d..4e8e73cfc3 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -530,11 +530,15 @@ rte_eth_dev_config_restore(uint8_t port_id) struct rte_eth_dev_info dev_info; struct ether_addr addr; uint16_t i; + uint32_t pool = 0; dev = &rte_eth_devices[port_id]; rte_eth_dev_info_get(port_id, &dev_info); + if (RTE_ETH_DEV_SRIOV(dev).active) + pool = RTE_ETH_DEV_SRIOV(dev).def_vmdq_idx; + /* replay MAC address configuration */ for (i = 0; i < dev_info.max_mac_addrs; i++) { addr = dev->data->mac_addrs[i]; @@ -545,7 +549,7 @@ rte_eth_dev_config_restore(uint8_t port_id) /* add address to the hardware */ if (*dev->dev_ops->mac_addr_add) - (*dev->dev_ops->mac_addr_add)(dev, &addr, i, 0); + (*dev->dev_ops->mac_addr_add)(dev, &addr, i, pool); else { PMD_DEBUG_TRACE("port %d: MAC address array not supported\n", port_id);