[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [QEMU PATCH v2] virtio-net: introduce a new macaddr con
From: |
Amos Kong |
Subject: |
Re: [Qemu-devel] [QEMU PATCH v2] virtio-net: introduce a new macaddr control |
Date: |
Fri, 18 Jan 2013 10:43:06 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Jan 17, 2013 at 02:13:08PM +0200, Michael S. Tsirkin wrote:
> On Thu, Jan 17, 2013 at 11:49:20AM +1030, Rusty Russell wrote:
> > address@hidden writes:
> > > @@ -349,6 +351,14 @@ static int virtio_net_handle_mac(VirtIONet *n,
> > > uint8_t cmd,
> > > {
> > > struct virtio_net_ctrl_mac mac_data;
> > >
> > > + if (cmd == VIRTIO_NET_CTRL_MAC_ADDR_SET && elem->out_num == 2 &&
> > > + elem->out_sg[1].iov_len == ETH_ALEN) {
> > > + /* Set MAC address */
> > > + memcpy(n->mac, elem->out_sg[1].iov_base,
> > > elem->out_sg[1].iov_len);
> > > + qemu_format_nic_info_str(&n->nic->nc, n->mac);
> > > + return VIRTIO_NET_OK;
> > > + }
> >
> > Does the rest of the net device still rely on the layout of descriptors?
> > If so, OK, we'll fix them all together. If not, this introduces a new
> > one.
> >
> > Cheers,
> > Rusty.
>
> The following fixes all existing users.
> Got to deal with some urgent stuff so did not test yet -
> Amos, would you like to include this in your patchset
> and build on it, test it all together?
No problem.
> If not I'll get to it next week.
>
> --->
>
> virtio-net: remove layout assumptions for ctrl vq
>
> Signed-off-by: Michael S. Tsirkin <address@hidden>
...