From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rusty Russell Subject: Re: [RFC PATCH 2/2] virtio-net: introduce a new control to set macaddr Date: Fri, 11 Jan 2013 11:13:04 +1030 Message-ID: <87ip741rdz.fsf@rustcorp.com.au> References: <1357829141-25455-1-git-send-email-akong@redhat.com> <1357829141-25455-3-git-send-email-akong@redhat.com> <20130110152649.GF30731@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, qemu-devel@nongnu.org To: "Michael S. Tsirkin" , akong@redhat.com Return-path: Received: from ozlabs.org ([203.10.76.45]:45789 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752023Ab3AKDzp (ORCPT ); Thu, 10 Jan 2013 22:55:45 -0500 In-Reply-To: <20130110152649.GF30731@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: "Michael S. Tsirkin" writes: >> + if (virtio_has_feature(vdev, VIRTIO_NET_F_MAC)) { >> + /* Set MAC address by writing config space */ >> vdev->config->set(vdev, offsetof(struct virtio_net_config, mac), >> dev->dev_addr, dev->addr_len); >> + } >> > > By the way, why don't we fail the command if VIRTIO_NET_F_MAC is off? > Rusty? Looked back through the history for this one. I think the theory is that if the guest doesn't set VIRTIO_NET_F_MAC, it means it doesn't care: it's up to the guest. Cheers, Rusty.