From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39369) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TviPa-0004jV-B7 for qemu-devel@nongnu.org; Thu, 17 Jan 2013 00:53:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TviPZ-0007SE-CC for qemu-devel@nongnu.org; Thu, 17 Jan 2013 00:53:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:27592) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TviPZ-0007S8-4u for qemu-devel@nongnu.org; Thu, 17 Jan 2013 00:53:13 -0500 Date: Thu, 17 Jan 2013 13:45:11 +0800 From: Amos Kong Message-ID: <20130117054511.GA12468@t430s.redhat.com> References: <1358315821-29519-1-git-send-email-akong@redhat.com> <1358317007-29972-1-git-send-email-akong@redhat.com> <87mww8y5bb.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87mww8y5bb.fsf@rustcorp.com.au> Subject: Re: [Qemu-devel] [QEMU PATCH v2] virtio-net: introduce a new macaddr control List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Rusty Russell Cc: virtualization@lists.linux-foundation.org, stefanha@redhat.com, qemu-devel@nongnu.org, kvm@vger.kernel.org, mst@redhat.com On Thu, Jan 17, 2013 at 11:49:20AM +1030, Rusty Russell wrote: > akong@redhat.com 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? No, only info string of net client relies on n->mac > If so, OK, we'll fix them all together. If not, this introduces a new > one. > > Cheers, > Rusty.