[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: |
Rusty Russell |
Subject: |
Re: [Qemu-devel] [QEMU PATCH v2] virtio-net: introduce a new macaddr control |
Date: |
Thu, 17 Jan 2013 11:49:20 +1030 |
User-agent: |
Notmuch/0.14 (http://notmuchmail.org) Emacs/23.4.1 (i686-pc-linux-gnu) |
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.
- [Qemu-devel] [PATCH v2 2/2] virtio-net: introduce a new control to set macaddr, (continued)
- [Qemu-devel] [PATCH v2 1/2] move virtnet_send_command() above virtnet_set_mac_address(), akong, 2013/01/16
- [Qemu-devel] [QEMU PATCH v2] virtio-net: introduce a new macaddr control, akong, 2013/01/16
- Re: [Qemu-devel] [QEMU PATCH v2] virtio-net: introduce a new macaddr control,
Rusty Russell <=
- Re: [Qemu-devel] [QEMU PATCH v2] virtio-net: introduce a new macaddr control, Michael S. Tsirkin, 2013/01/17
- Re: [Qemu-devel] [QEMU PATCH v2] virtio-net: introduce a new macaddr control, Amos Kong, 2013/01/17