12 Replies Latest reply on Mar 27, 2016 11:51 PM by wb_Intel

    ixgbe driver does not support MAC address change


      My ESXi 5.5 system has Intel X540-t2 installed, and using ixgbe driver version 3.21.


      In the driver code, I can see the following lines, which shows it does not support MAC address change in ESXi 5.5, because if vfinfo[vf].pf_set_mac=true, when guest OS change its MAC, the ixgbe driver won't change it in vfinfo accordingly and will report error: VF attempted to set a new MAC address but it already has an administratively set MAC address


      int ixgbe_ndo_set_vf_mac(struct net_device *netdev, int vf, u8 *mac)


        s32 retval = 0;

        struct ixgbe_adapter *adapter = netdev_priv(netdev);

        if (!is_valid_ether_addr(mac) || (vf >= adapter->num_vfs))

            return -EINVAL;

        dev_info(pci_dev_to_dev(adapter->pdev), "setting MAC %pM on VF %d\n", mac, vf);

        dev_info(pci_dev_to_dev(adapter->pdev), "Reload the VF driver to make this change effective.\n");

        retval = ixgbe_set_vf_mac(adapter, vf, mac);

        if (retval >= 0) {

            /* pf_set_mac is used in ESX5.1 and base driver but not in ESX5.5 */

            adapter->vfinfo[vf].pf_set_mac = true;

            if (test_bit(__IXGBE_DOWN, &adapter->state)) {

                dev_warn(pci_dev_to_dev(adapter->pdev), "The VF MAC address has been set, but the PF device is not up.\n");

                dev_warn(pci_dev_to_dev(adapter->pdev), "Bring the PF device up before attempting to use the VF device.\n");


        } else {

            dev_warn(pci_dev_to_dev(adapter->pdev), "The VF MAC address was NOT set due to invalid or duplicate MAC address.\n");


        return retval;



      static int ixgbe_set_vf_mac_addr(struct ixgbe_adapter *adapter, u32 *msgbuf, u32 vf)


        u8 *new_mac = ((u8 *)(&msgbuf[1]));


        if (!is_valid_ether_addr(new_mac)) {

            e_warn(drv, "VF %d attempted to set invalid mac\n", vf);

            return -1;



        if (adapter->vfinfo[vf].pf_set_mac && memcmp(adapter->vfinfo[vf].vf_mac_addresses, new_mac, ETH_ALEN)) {

            u8 *pm = adapter->vfinfo[vf].vf_mac_addresses;

            e_warn(drv,  "VF %d attempted to set a new MAC address but it already has an administratively set MAC address %2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X\n",

                                  vf, pm[0], pm[1], pm[2], pm[3], pm[4], pm[5]);

            e_warn(drv, "Check the VF driver and if it is not using the correct MAC address you may need to reload the VF driver\n");

            return -1;


        return ixgbe_set_vf_mac(adapter, vf, new_mac) < 0;



      However, according to the VMware document, it should be supported.   Why this contradiction happens?