From: David Ahern <dsahern@gmail.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: KVM mailing list <kvm@vger.kernel.org>
Subject: Re: pci passthrough - VF reset at boot is dropping assigned MAC
Date: Mon, 25 Apr 2011 12:04:30 -0600 [thread overview]
Message-ID: <4DB5B7AE.8010900@gmail.com> (raw)
In-Reply-To: <1303752659.3431.31.camel@x201>
On 04/25/11 11:30, Alex Williamson wrote:
> # 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,
>
> Alex
>
Ok, I was able to repeat the above commands from the host command line.
However, when qemu-kvm starts the MAC is reset.
# ip link show | less
2: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP
qlen 1000
link/ether 00:1b:21:98:b7:10 brd ff:ff:ff:ff:ff:ff
vf 0 MAC 02:12:34:56:80:20
--> that's the MAC address I set
I start qemu-kvm (unpatched version) and the host side sees the address
changed:
# ip link show | less
2: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP
qlen 1000
link/ether 00:1b:21:98:b7:10 brd ff:ff:ff:ff:ff:ff
vf 0 MAC 7a:17:3f:98:0f:db
Can you try that aspect on your end - seeing if the MAC address
maintains after starting qemu-kvm?
David
next prev parent reply other threads:[~2011-04-25 18:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-25 16:28 pci passthrough - VF reset at boot is dropping assigned MAC David Ahern
2011-04-25 16:37 ` Alex Williamson
2011-04-25 16:41 ` David Ahern
2011-04-25 17:30 ` Alex Williamson
2011-04-25 17:41 ` David Ahern
2011-04-25 18:04 ` David Ahern [this message]
2011-04-25 18:36 ` Alex Williamson
2011-04-25 19:12 ` David Ahern
2011-04-25 19:18 ` Alex Williamson
2011-04-25 20:29 ` David Ahern
2011-04-25 21:17 ` David Ahern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DB5B7AE.8010900@gmail.com \
--to=dsahern@gmail.com \
--cc=alex.williamson@redhat.com \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.