Re: [Qemu-devel] [RFC PATCH 2/2] virtio-net: introduce a new control to set macaddr

2013-01-16 Thread Michael S. Tsirkin
On Wed, Jan 16, 2013 at 01:23:26PM +0800, Amos Kong wrote: > On Thu, Jan 10, 2013 at 10:57:05PM +0800, Jason Wang wrote: > > On 01/10/2013 10:45 PM, ak...@redhat.com wrote: > > > From: Amos Kong > > > > > > Currently we write MAC address to pci config space byte by byte, > > > this means that we h

Re: [Qemu-devel] [RFC PATCH 2/2] virtio-net: introduce a new control to set macaddr

2013-01-15 Thread Amos Kong
On Thu, Jan 10, 2013 at 10:57:05PM +0800, Jason Wang wrote: > On 01/10/2013 10:45 PM, ak...@redhat.com wrote: > > From: Amos Kong > > > > Currently we write MAC address to pci config space byte by byte, > > this means that we have an intermediate step where mac is wrong. > > This patch introduced

Re: [Qemu-devel] [RFC PATCH 2/2] virtio-net: introduce a new control to set macaddr

2013-01-10 Thread Rusty Russell
"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); >>

[Qemu-devel] [RFC PATCH 2/2] virtio-net: introduce a new control to set macaddr

2013-01-10 Thread akong
From: Amos Kong Currently we write MAC address to pci config space byte by byte, this means that we have an intermediate step where mac is wrong. This patch introduced a new control command to set MAC address in one time. VIRTIO_NET_F_CTRL_MAC_ADDR is a new feature bit for compatibility. Signed

Re: [Qemu-devel] [RFC PATCH 2/2] virtio-net: introduce a new control to set macaddr

2013-01-10 Thread Michael S. Tsirkin
On Thu, Jan 10, 2013 at 10:45:41PM +0800, ak...@redhat.com wrote: > From: Amos Kong > > Currently we write MAC address to pci config space byte by byte, > this means that we have an intermediate step where mac is wrong. > This patch introduced a new control command to set MAC address > in one tim

Re: [Qemu-devel] [RFC PATCH 2/2] virtio-net: introduce a new control to set macaddr

2013-01-10 Thread Jason Wang
On 01/10/2013 10:45 PM, ak...@redhat.com wrote: > From: Amos Kong > > Currently we write MAC address to pci config space byte by byte, > this means that we have an intermediate step where mac is wrong. > This patch introduced a new control command to set MAC address > in one time. > > VIRTIO_NET_F