From: Laszlo Ersek <lersek@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] virtio-net: revert mac on reset
Date: Wed, 16 Jan 2013 14:44:50 +0100 [thread overview]
Message-ID: <50F6AED2.1080402@redhat.com> (raw)
In-Reply-To: <20130116114521.GA20630@redhat.com>
On 01/16/13 12:45, Michael S. Tsirkin wrote:
> Once guest overrides virtio net primary mac,
> it retains the value set until qemu exit.
> This is inconsistent with standard nic behaviour.
> To fix, revert the mac to the original value on reset.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> hw/virtio-net.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/virtio-net.c b/hw/virtio-net.c
> index 3bb01b1..4d80a25 100644
> --- a/hw/virtio-net.c
> +++ b/hw/virtio-net.c
> @@ -199,6 +199,7 @@ static void virtio_net_reset(VirtIODevice *vdev)
> n->mac_table.multi_overflow = 0;
> n->mac_table.uni_overflow = 0;
> memset(n->mac_table.macs, 0, MAC_TABLE_ENTRIES * ETH_ALEN);
> + memcpy(&n->mac[0], &n->nic->conf->macaddr, sizeof(n->mac));
> memset(n->vlans, 0, MAX_VLAN >> 3);
> }
>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
prev parent reply other threads:[~2013-01-16 13:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-16 11:45 [Qemu-devel] [PATCH] virtio-net: revert mac on reset Michael S. Tsirkin
2013-01-16 13:29 ` Stefan Hajnoczi
2013-01-16 13:44 ` Laszlo Ersek [this message]
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=50F6AED2.1080402@redhat.com \
--to=lersek@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/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.