From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: pci passthrough - VF reset at boot is dropping assigned MAC Date: Mon, 25 Apr 2011 11:41:42 -0600 Message-ID: <4DB5B256.5070902@gmail.com> References: <4DB5A13B.4050804@gmail.com> <1303749455.3431.21.camel@x201> <4DB5A44F.6040304@gmail.com> <1303752659.3431.31.camel@x201> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: KVM mailing list To: Alex Williamson Return-path: Received: from mail-px0-f179.google.com ([209.85.212.179]:38126 "EHLO mail-px0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758664Ab1DYRlv (ORCPT ); Mon, 25 Apr 2011 13:41:51 -0400 Received: by pxi2 with SMTP id 2so1979679pxi.10 for ; Mon, 25 Apr 2011 10:41:50 -0700 (PDT) In-Reply-To: <1303752659.3431.31.camel@x201> Sender: kvm-owner@vger.kernel.org List-ID: On 04/25/11 11:30, Alex Williamson wrote: > So yes, it does change. However, if I set the VF mac instead of using a > randomly generated one, I get: > > # modprobe -r igbvf > # ip link set eth2 vf 6 mac 02:00:10:91:73:01 > # modprobe igbvf > # dmesg | grep "igbvf 0000\:01\:11.5\: Address\:" > igbvf 0000:01:11.5: Address: d2:c8:17:d6:97:f7 > igbvf 0000:01:11.5: Address: 4e:ee:2a:d8:12:7c > igbvf 0000:01:11.5: Address: 02:00:10:91:73:01 > # modprobe -r igbvf > # echo 1 > /sys/bus/pci/devices/0000:01:11.5/reset > # modprobe igbvf > # dmesg | grep "igbvf 0000\:01\:11.5\: Address\:" > igbvf 0000:01:11.5: Address: d2:c8:17:d6:97:f7 > igbvf 0000:01:11.5: Address: 4e:ee:2a:d8:12:7c > igbvf 0000:01:11.5: Address: 02:00:10:91:73:01 > igbvf 0000:01:11.5: Address: 02:00:10:91:73:01 > > So now it sticks. You're going to get random mac addresses on the VFs > every time you reload the igb driver (ie. ever boot) anyway (at least > with these sr-iov cards), so if you need consistent macs, they probably > need to be set before launching the VM anyway. Thanks, You lost me on this. I do not have the igbvf driver loaded in the host, only the guest. I am setting the MAC address for the VF in the host before launching the VM. The host's igb driver gets loaded at boot only. David > > Alex >