Re: [PATCH] virtio-spec: set mac address by a new vq command

2013-01-16 Thread Amos Kong
On Wed, Jan 16, 2013 at 11:22:23AM +0200, Michael S. Tsirkin wrote: > On Wed, Jan 16, 2013 at 10:13:28AM +0100, Stefan Hajnoczi wrote: > > On Wed, Jan 16, 2013 at 03:33:24PM +0800, ak...@redhat.com wrote: > > > +\change_inserted -1930653948 1358320004 > > > +The command VIRTIO_NET_CTRL_MAC_ADDR_SET

Re: [Qemu-devel] [QEMU PATCH v2] virtio-net: introduce a new macaddr control

2013-01-16 Thread Amos Kong
On Thu, Jan 17, 2013 at 11:49:20AM +1030, Rusty Russell wrote: > ak...@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->ou

Re: [RFCv2 00/12] Introduce host-side virtio queue and CAIF Virtio.

2013-01-16 Thread Rusty Russell
"Michael S. Tsirkin" writes: > On Wed, Jan 16, 2013 at 01:43:32PM +1030, Rusty Russell wrote: >> "Michael S. Tsirkin" writes: >> >> +static int resize_iovec(struct vringh_iov *iov, gfp_t gfp) >> >> +{ >> >> + struct iovec *new; >> >> + unsigned int new_num = iov->max * 2; >> > >> > We must limit

Re: [QEMU PATCH v2] virtio-net: introduce a new macaddr control

2013-01-16 Thread Rusty Russell
ak...@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) { > +/*

[PATCH] virtio: suppress kmemleak false positive

2013-01-16 Thread Alexandru Copot
While doing simple IPv6 tests in KVM virtual machines, (add an IPv6 address to eth0) kmemleak complains about an unreferenced object: unreferenced object 0x88001e804120 (size 32): comm "softirq", pid 0, jiffies 4294900928 (age 631.544s) hex dump (first 32 bytes): 28 cb fd 1d 00 00 00 0

Re: [PATCH] virtio-spec: set mac address by a new vq command

2013-01-16 Thread Michael S. Tsirkin
On Wed, Jan 16, 2013 at 10:13:28AM +0100, Stefan Hajnoczi wrote: > On Wed, Jan 16, 2013 at 03:33:24PM +0800, ak...@redhat.com wrote: > > +\change_inserted -1930653948 1358320004 > > +The command VIRTIO_NET_CTRL_MAC_ADDR_SET is used to set > > +\begin_inset Quotes eld > > +\end_inset > > + > > +phy

Re: [PATCH] virtio-spec: set mac address by a new vq command

2013-01-16 Thread Stefan Hajnoczi
On Wed, Jan 16, 2013 at 03:33:24PM +0800, ak...@redhat.com wrote: > +\change_inserted -1930653948 1358320004 > +The command VIRTIO_NET_CTRL_MAC_ADDR_SET is used to set > +\begin_inset Quotes eld > +\end_inset > + > +physical > +\begin_inset Quotes erd > +\end_inset > + > + address of the network c

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 PATCH v2] virtio-net: introduce a new macaddr control

2013-01-16 Thread Michael S. Tsirkin
On Wed, Jan 16, 2013 at 09:59:14AM +0100, Stefan Hajnoczi wrote: > On Wed, Jan 16, 2013 at 02:37:34PM +0800, Jason Wang wrote: > > On Wednesday, January 16, 2013 02:16:47 PM ak...@redhat.com wrote: > > > From: Amos Kong > > > > > > In virtio-net guest driver, currently we write MAC address to > >

Re: [QEMU PATCH v2] virtio-net: introduce a new macaddr control

2013-01-16 Thread Stefan Hajnoczi
On Wed, Jan 16, 2013 at 02:37:34PM +0800, Jason Wang wrote: > On Wednesday, January 16, 2013 02:16:47 PM ak...@redhat.com wrote: > > From: Amos Kong > > > > In virtio-net guest driver, currently we write MAC address to > > pci config space byte by byte, this means that we have an > > intermediate

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

2013-01-16 Thread Michael S. Tsirkin
On Wed, Jan 16, 2013 at 04:24:47PM +0800, Amos Kong wrote: > On Wed, Jan 16, 2013 at 02:20:39PM +0800, Jason Wang wrote: > > On Wednesday, January 16, 2013 01:57:01 PM ak...@redhat.com wrote: > > > From: Amos Kong > > > > > > Currently we write MAC address to pci config space byte by byte, > > >

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

2013-01-16 Thread Amos Kong
On Wed, Jan 16, 2013 at 02:20:39PM +0800, Jason Wang wrote: > On Wednesday, January 16, 2013 01:57:01 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. > > Th

Re: [QEMU PATCH v2] virtio-net: introduce a new macaddr control

2013-01-16 Thread Michael S. Tsirkin
On Wed, Jan 16, 2013 at 02:37:34PM +0800, Jason Wang wrote: > On Wednesday, January 16, 2013 02:16:47 PM ak...@redhat.com wrote: > > From: Amos Kong > > > > In virtio-net guest driver, currently we write MAC address to > > pci config space byte by byte, this means that we have an > > intermediate

Re: [RFCv2 00/12] Introduce host-side virtio queue and CAIF Virtio.

2013-01-16 Thread Michael S. Tsirkin
On Wed, Jan 16, 2013 at 01:43:32PM +1030, Rusty Russell wrote: > "Michael S. Tsirkin" writes: > >> +static int resize_iovec(struct vringh_iov *iov, gfp_t gfp) > >> +{ > >> + struct iovec *new; > >> + unsigned int new_num = iov->max * 2; > > > > We must limit this I think, this is coming > > from