Re: [PATCH] virtio-net: Read MAC only after initializing MSI-X

2011-09-01 Thread Sasha Levin
I'm wondering if we can switch to using a linked list 'capabilities' structure similar to whats being done with PCI capabilities. Here are the pros and the cons as I see them: Pros: * Simpler code - currently before each access to the virtio config space we have to check whether MSI-X is on and

Re: [PATCH] virtio-net: Read MAC only after initializing MSI-X

2011-08-22 Thread Rusty Russell
On Mon, 22 Aug 2011 11:36:13 +0300, "Michael S. Tsirkin" wrote: > Yes. Or maybe 'WHEN' - since if MSI-X is disabled again, it moves back. > Let's update the spec to make it clearer? I left the language as is, but added a footnote at the end of the sentence: If MSI-X is enabled for the device, t

Re: [PATCH] virtio-net: Read MAC only after initializing MSI-X

2011-08-22 Thread Michael S. Tsirkin
On Mon, Aug 22, 2011 at 09:54:50AM +0930, Rusty Russell wrote: > On Fri, 19 Aug 2011 18:23:35 +0300, "Michael S. Tsirkin" > wrote: > > On Sat, Aug 13, 2011 at 11:51:01AM +0300, Sasha Levin wrote: > > > The MAC of a virtio-net device is located at the first field of the device > > > specific heade

Re: [PATCH] virtio-net: Read MAC only after initializing MSI-X

2011-08-21 Thread Rusty Russell
On Fri, 19 Aug 2011 18:23:35 +0300, "Michael S. Tsirkin" wrote: > On Sat, Aug 13, 2011 at 11:51:01AM +0300, Sasha Levin wrote: > > The MAC of a virtio-net device is located at the first field of the device > > specific header. This header is located at offset 20 if the device doesn't > > support

Re: [PATCH] virtio-net: Read MAC only after initializing MSI-X

2011-08-20 Thread Michael S. Tsirkin
On Fri, Aug 19, 2011 at 07:33:07PM +0300, Sasha Levin wrote: > On Fri, 2011-08-19 at 18:23 +0300, Michael S. Tsirkin wrote: > > On Sat, Aug 13, 2011 at 11:51:01AM +0300, Sasha Levin wrote: > > > The MAC of a virtio-net device is located at the first field of the device > > > specific header. This h

Re: [PATCH] virtio-net: Read MAC only after initializing MSI-X

2011-08-19 Thread Sasha Levin
On Fri, 2011-08-19 at 18:23 +0300, Michael S. Tsirkin wrote: > On Sat, Aug 13, 2011 at 11:51:01AM +0300, Sasha Levin wrote: > > The MAC of a virtio-net device is located at the first field of the device > > specific header. This header is located at offset 20 if the device doesn't > > support MSI-X

Re: [PATCH] virtio-net: Read MAC only after initializing MSI-X

2011-08-19 Thread Michael S. Tsirkin
On Sat, Aug 13, 2011 at 11:51:01AM +0300, Sasha Levin wrote: > The MAC of a virtio-net device is located at the first field of the device > specific header. This header is located at offset 20 if the device doesn't > support MSI-X or offset 24 if it does. > > Current code in virtnet_probe() used t

Re: [PATCH] virtio-net: Read MAC only after initializing MSI-X

2011-08-15 Thread Sasha Levin
On Mon, 2011-08-15 at 09:55 +0930, Rusty Russell wrote: > On Sun, 14 Aug 2011 16:57:32 +0300, Sasha Levin > wrote: > > On Sun, 2011-08-14 at 12:23 +0930, Rusty Russell wrote: > > > On Sat, 13 Aug 2011 11:51:01 +0300, Sasha Levin > > > wrote: > > > > The MAC of a virtio-net device is located at

Re: [PATCH] virtio-net: Read MAC only after initializing MSI-X

2011-08-14 Thread Rusty Russell
On Sun, 14 Aug 2011 16:57:32 +0300, Sasha Levin wrote: > On Sun, 2011-08-14 at 12:23 +0930, Rusty Russell wrote: > > On Sat, 13 Aug 2011 11:51:01 +0300, Sasha Levin > > wrote: > > > The MAC of a virtio-net device is located at the first field of the device > > > specific header. This header is l

Re: [PATCH] virtio-net: Read MAC only after initializing MSI-X

2011-08-14 Thread Sasha Levin
On Sun, 2011-08-14 at 12:23 +0930, Rusty Russell wrote: > On Sat, 13 Aug 2011 11:51:01 +0300, Sasha Levin > wrote: > > The MAC of a virtio-net device is located at the first field of the device > > specific header. This header is located at offset 20 if the device doesn't > > support MSI-X or off

Re: [PATCH] virtio-net: Read MAC only after initializing MSI-X

2011-08-13 Thread Rusty Russell
On Sat, 13 Aug 2011 11:51:01 +0300, Sasha Levin wrote: > The MAC of a virtio-net device is located at the first field of the device > specific header. This header is located at offset 20 if the device doesn't > support MSI-X or offset 24 if it does. Erk. This means, in general, we have to do vir

[PATCH] virtio-net: Read MAC only after initializing MSI-X

2011-08-13 Thread Sasha Levin
The MAC of a virtio-net device is located at the first field of the device specific header. This header is located at offset 20 if the device doesn't support MSI-X or offset 24 if it does. Current code in virtnet_probe() used to probe the MAC before checking for MSI-X, which means that the read wa