On Wed, 17 Jun 2015 18:22:12 -0400 Liang-Min Larry Wang <liang-min.wang at intel.com> wrote:
> int > +rte_eth_dev_default_mac_addr_set(uint8_t port_id, struct ether_addr *addr) > +{ > + struct rte_eth_dev *dev; > + > + if (!rte_eth_dev_is_valid_port(port_id)) { > + PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id); > + return -ENODEV; > + } > + > + if (!is_valid_assigned_ether_addr(addr)) > + return -EINVAL; > + > + dev = &rte_eth_devices[port_id]; > + FUNC_PTR_OR_ERR_RET(*dev->dev_ops->mac_addr_set, -ENOTSUP); > + > + /* Update default address in NIC data structure */ > + ether_addr_copy(addr, &dev->data->mac_addrs[0]); > + > + (*dev->dev_ops->mac_addr_set)(dev, addr); Would it be possible to directly set mac_addr[0] if device does not provide a device driver specific override?