virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Amos Kong <akong@redhat.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: virtualization@lists.linux-foundation.org, qemu-devel@nongnu.org,
	stefanha@redhat.com, "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [RFC qemu PATCH] only writing out the last byte of MAC makes it have effect
Date: Mon, 25 Mar 2013 10:23:57 +0800	[thread overview]
Message-ID: <20130325022357.GA2899@t430s.nay.redhat.com> (raw)
In-Reply-To: <87hak4ffxu.fsf@rustcorp.com.au>

On Fri, Mar 22, 2013 at 10:45:09AM +1030, Rusty Russell wrote:
> "Michael S. Tsirkin" <mst@redhat.com> writes:
> > On Thu, Mar 21, 2013 at 02:44:50PM +0800, Amos Kong wrote:
> >> The lengcy guests don't have mac programming command, we don't know when
> >> it's safe to use MAC. This patch changed qemu to makes MAC change effect
> >> when the last byte of MAC is written to config space.
> >> 
> >> MAC address takes first 6 bytes of config space of virtio-net, the addr
> >> is 5 when the last byte is written in virtio_config_writeb().
> >> 
> >> MAC change will effect when n->mac is updated in virtio_net_set_config().
> >> 
> >> Signed-off-by: Amos Kong <akong@redhat.com>
> >
> > Let's see what Rusty says about the spec change.
> 
> Implementation notes like this belong as a footnote, eg:
> 
>         For older systems, it is recommended and typical that the device
>         write byte 5 of the mac address last, so devices can use that as
>         a trigger to commit the mac address change.
> 
> Now, is this a real, or theoretical issue?  Have we seen this problem in
> practice, or should we continue to ignore it?

Hi Rusty, Michael

I didn't touch any problem. MST, and you?

In Linux guest, we should disable the interface before changing mac address.
 ifconfig eth0 down
 ifconfig eth0 hw ether 10:12:13:14:15:16
 ifconfig eth0 up
 
In Windows 7 guest, after changing mac address in register table,
re-enabling interface to make it effect.
 reg add HKLM SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0001] /v NetworkAddress /d 0123456789AB
 netsh interface set interface "Local Area Connection" DISABLED
 netsh interface set interface "Local Area Connection" ENABLED


So when we change the mac address, guest os always disable interface
to receive all packages. It seems the theoretical issue doesn't exist?

> Cheers,
> Rusty.
> 

-- 
			Amos.

  reply	other threads:[~2013-03-25  2:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-21  3:02 [RFC virt-spec PATCH] only writing out the last byte of MAC makes it have effect Amos Kong
2013-03-21  6:44 ` [RFC qemu " Amos Kong
2013-03-21 10:51   ` Michael S. Tsirkin
2013-03-22  0:15     ` Rusty Russell
2013-03-25  2:23       ` Amos Kong [this message]
2013-03-25  6:58         ` [Qemu-devel] " Michael S. Tsirkin
2013-04-08  7:05           ` Amos Kong
2013-03-21 10:53 ` [RFC virt-spec " Michael S. Tsirkin

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=20130325022357.GA2899@t430s.nay.redhat.com \
    --to=akong@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rusty@rustcorp.com.au \
    --cc=stefanha@redhat.com \
    --cc=virtualization@lists.linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).