From: Alex Williamson <alex.williamson@hp.com>
To: dlaor@redhat.com
Cc: kvm <kvm@vger.kernel.org>, qemu-devel <qemu-devel@nongnu.org>,
Mark McLoughlin <markmc@redhat.com>
Subject: Re: [PATCH 1/5] virtio-net: Allow setting the MAC address via set_config
Date: Wed, 14 Jan 2009 08:34:58 -0700 [thread overview]
Message-ID: <1231947298.7109.262.camel@lappy> (raw)
In-Reply-To: <496DB8D1.2070101@redhat.com>
On Wed, 2009-01-14 at 12:05 +0200, Dor Laor wrote:
> Alex Williamson wrote:
> > +static void virtio_net_set_config(VirtIODevice *vdev, const uint8_t *config)
> > +{
> > + VirtIONet *n = to_virtio_net(vdev);
> > + struct virtio_net_config netcfg;
> > +
> > + memcpy(&netcfg, config, sizeof(netcfg));
> > +
> > + if (memcmp(netcfg.mac, n->mac, 6)) {
> > + memcpy(n->mac, netcfg.mac, 6);
> > + qemu_format_nic_info_str(n->vc, n->mac);
> > + }
> > +}
> > +
> >
>
> What if the guest will chose the host's mac?
> Thinking about it, I don't think we should test that.
> A concerned host mgmt app can add ebtables roles for such a case.
>
> Maybe we can optionally allow/deny it?
What's the topology you're thinking of that the virtio-net MAC is also
the host MAC? I typically use a bridge with a tap device, so the
virtio-net MAC is isolated from the host. Thanks,
Alex
--
Alex Williamson HP Open Source & Linux Org.
next prev parent reply other threads:[~2009-01-14 15:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-13 21:23 [PATCH 1/5] virtio-net: Allow setting the MAC address via set_config Alex Williamson
2009-01-14 10:05 ` Dor Laor
2009-01-14 15:34 ` Alex Williamson [this message]
2009-01-14 16:41 ` [Qemu-devel] " Jamie Lokier
2009-01-14 22:06 ` Dor Laor
2009-01-14 22:14 ` Paul Brook
2009-01-15 13:11 ` Jamie Lokier
2009-01-15 13:12 ` Jamie Lokier
2009-01-15 13:41 ` Avi Kivity
2009-01-18 9:37 ` Dor Laor
2009-01-18 9:42 ` Avi Kivity
2009-01-14 22:08 ` Dor Laor
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=1231947298.7109.262.camel@lappy \
--to=alex.williamson@hp.com \
--cc=dlaor@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=markmc@redhat.com \
--cc=qemu-devel@nongnu.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).