All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5][RFC] virtio-net: MAC filtering
@ 2009-01-07 17:37 ` Alex Williamson
  0 siblings, 0 replies; 18+ messages in thread
From: Alex Williamson @ 2009-01-07 17:37 UTC (permalink / raw)
  To: kvm, qemu-devel; +Cc: Mark McLoughlin

This series is based on some of the work Mark McLoughlin has been doing,
so isn't going to apply until that makes it into the tree.  The goal is
to enable MAC filtering at the qemu/kvm level for virtio-net packets.  I
start by adding the capability to set the MAC address, naming the bits
in the status field, enabling filtering, and finally adding a MAC table
for additional MAC addresses.  If this looks reasonable, I'll follow up
with VLAN filtering support.

A concern here is the growing size of the virtio-net I/O port space
config.  This series brings it up to 256 bytes with PCI resource
rounding.  The VLAN filter bitmap would increase that by another 512
bytes, making it 1kB and limiting us to something less than 64 such
devices per guest.  Is anyone worried?  Should filter tables live in
MMIO space for virtio devices?  I'll send out the guest side patches for
virtio-net in a separate thread.  Thanks,

Alex

-- 
Alex Williamson                             HP Open Source & Linux Org.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Qemu-devel] [PATCH 0/5][RFC] virtio-net: MAC filtering
@ 2009-01-07 17:37 ` Alex Williamson
  0 siblings, 0 replies; 18+ messages in thread
From: Alex Williamson @ 2009-01-07 17:37 UTC (permalink / raw)
  To: kvm, qemu-devel; +Cc: Mark McLoughlin

This series is based on some of the work Mark McLoughlin has been doing,
so isn't going to apply until that makes it into the tree.  The goal is
to enable MAC filtering at the qemu/kvm level for virtio-net packets.  I
start by adding the capability to set the MAC address, naming the bits
in the status field, enabling filtering, and finally adding a MAC table
for additional MAC addresses.  If this looks reasonable, I'll follow up
with VLAN filtering support.

A concern here is the growing size of the virtio-net I/O port space
config.  This series brings it up to 256 bytes with PCI resource
rounding.  The VLAN filter bitmap would increase that by another 512
bytes, making it 1kB and limiting us to something less than 64 such
devices per guest.  Is anyone worried?  Should filter tables live in
MMIO space for virtio devices?  I'll send out the guest side patches for
virtio-net in a separate thread.  Thanks,

Alex

-- 
Alex Williamson                             HP Open Source & Linux Org.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [PATCH 0/5][RFC] virtio-net: MAC filtering
  2009-01-07 17:37 ` [Qemu-devel] " Alex Williamson
@ 2009-01-09 19:27   ` Paul Brook
  -1 siblings, 0 replies; 18+ messages in thread
From: Paul Brook @ 2009-01-09 19:27 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alex Williamson, kvm, Mark McLoughlin

> A concern here is the growing size of the virtio-net I/O port space
> config.  This series brings it up to 256 bytes with PCI resource
> rounding.  The VLAN filter bitmap would increase that by another 512
> bytes, making it 1kB and limiting us to something less than 64 such
> devices per guest.  Is anyone worried?  Should filter tables live in
> MMIO space for virtio devices?  I'll send out the guest side patches for
> virtio-net in a separate thread.  Thanks,

This is one reason why IO ports are a reallybad idea. Use memory mapped 
register spaces like any other sane system and you won't have a problem.

Paul

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [PATCH 0/5][RFC] virtio-net: MAC filtering
@ 2009-01-09 19:27   ` Paul Brook
  0 siblings, 0 replies; 18+ messages in thread
From: Paul Brook @ 2009-01-09 19:27 UTC (permalink / raw)
  To: qemu-devel; +Cc: Mark McLoughlin, kvm, Alex Williamson

> A concern here is the growing size of the virtio-net I/O port space
> config.  This series brings it up to 256 bytes with PCI resource
> rounding.  The VLAN filter bitmap would increase that by another 512
> bytes, making it 1kB and limiting us to something less than 64 such
> devices per guest.  Is anyone worried?  Should filter tables live in
> MMIO space for virtio devices?  I'll send out the guest side patches for
> virtio-net in a separate thread.  Thanks,

This is one reason why IO ports are a reallybad idea. Use memory mapped 
register spaces like any other sane system and you won't have a problem.

Paul

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [PATCH 0/5][RFC] virtio-net: MAC filtering
  2009-01-09 19:27   ` Paul Brook
@ 2009-01-09 19:37     ` Avi Kivity
  -1 siblings, 0 replies; 18+ messages in thread
From: Avi Kivity @ 2009-01-09 19:37 UTC (permalink / raw)
  To: Paul Brook; +Cc: qemu-devel, Alex Williamson, kvm, Mark McLoughlin

Paul Brook wrote:
>> A concern here is the growing size of the virtio-net I/O port space
>> config.  This series brings it up to 256 bytes with PCI resource
>> rounding.  The VLAN filter bitmap would increase that by another 512
>> bytes, making it 1kB and limiting us to something less than 64 such
>> devices per guest.  Is anyone worried?  Should filter tables live in
>> MMIO space for virtio devices?  I'll send out the guest side patches for
>> virtio-net in a separate thread.  Thanks,
>>     
>
> This is one reason why IO ports are a reallybad idea. Use memory mapped 
> register spaces like any other sane system and you won't have a problem.
>   

mmio is slower for virtualization.  But I agree pio is baroque.

Luckily we didn't implement the 768 pci slot thing, that wouldn't have 
flown (for yet another reason).

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [PATCH 0/5][RFC] virtio-net: MAC filtering
@ 2009-01-09 19:37     ` Avi Kivity
  0 siblings, 0 replies; 18+ messages in thread
From: Avi Kivity @ 2009-01-09 19:37 UTC (permalink / raw)
  To: Paul Brook; +Cc: Mark McLoughlin, qemu-devel, Alex Williamson, kvm

Paul Brook wrote:
>> A concern here is the growing size of the virtio-net I/O port space
>> config.  This series brings it up to 256 bytes with PCI resource
>> rounding.  The VLAN filter bitmap would increase that by another 512
>> bytes, making it 1kB and limiting us to something less than 64 such
>> devices per guest.  Is anyone worried?  Should filter tables live in
>> MMIO space for virtio devices?  I'll send out the guest side patches for
>> virtio-net in a separate thread.  Thanks,
>>     
>
> This is one reason why IO ports are a reallybad idea. Use memory mapped 
> register spaces like any other sane system and you won't have a problem.
>   

mmio is slower for virtualization.  But I agree pio is baroque.

Luckily we didn't implement the 768 pci slot thing, that wouldn't have 
flown (for yet another reason).

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [PATCH 0/5][RFC] virtio-net: MAC filtering
  2009-01-09 19:27   ` Paul Brook
@ 2009-01-09 19:41     ` Anthony Liguori
  -1 siblings, 0 replies; 18+ messages in thread
From: Anthony Liguori @ 2009-01-09 19:41 UTC (permalink / raw)
  To: Paul Brook; +Cc: qemu-devel, Alex Williamson, kvm, Mark McLoughlin

Paul Brook wrote:
>> A concern here is the growing size of the virtio-net I/O port space
>> config.  This series brings it up to 256 bytes with PCI resource
>> rounding.  The VLAN filter bitmap would increase that by another 512
>> bytes, making it 1kB and limiting us to something less than 64 such
>> devices per guest.  Is anyone worried?  Should filter tables live in
>> MMIO space for virtio devices?  I'll send out the guest side patches for
>> virtio-net in a separate thread.  Thanks,
>>     
>
> This is one reason why IO ports are a reallybad idea. Use memory mapped 
> register spaces like any other sane system and you won't have a problem.
>   

IO ports are much faster for notification than MMIO in KVM which is why 
the space is currently IO ports.  It was never meant to hold very large 
amounts of data.

Regards,

Anthony Liguori

> Paul
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>   


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [PATCH 0/5][RFC] virtio-net: MAC filtering
@ 2009-01-09 19:41     ` Anthony Liguori
  0 siblings, 0 replies; 18+ messages in thread
From: Anthony Liguori @ 2009-01-09 19:41 UTC (permalink / raw)
  To: Paul Brook; +Cc: Mark McLoughlin, qemu-devel, Alex Williamson, kvm

Paul Brook wrote:
>> A concern here is the growing size of the virtio-net I/O port space
>> config.  This series brings it up to 256 bytes with PCI resource
>> rounding.  The VLAN filter bitmap would increase that by another 512
>> bytes, making it 1kB and limiting us to something less than 64 such
>> devices per guest.  Is anyone worried?  Should filter tables live in
>> MMIO space for virtio devices?  I'll send out the guest side patches for
>> virtio-net in a separate thread.  Thanks,
>>     
>
> This is one reason why IO ports are a reallybad idea. Use memory mapped 
> register spaces like any other sane system and you won't have a problem.
>   

IO ports are much faster for notification than MMIO in KVM which is why 
the space is currently IO ports.  It was never meant to hold very large 
amounts of data.

Regards,

Anthony Liguori

> Paul
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>   

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [PATCH 0/5][RFC] virtio-net: MAC filtering
  2009-01-09 19:41     ` Anthony Liguori
@ 2009-01-09 19:56       ` Paul Brook
  -1 siblings, 0 replies; 18+ messages in thread
From: Paul Brook @ 2009-01-09 19:56 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel, Alex Williamson, kvm, Mark McLoughlin

> >> A concern here is the growing size of the virtio-net I/O port space
> >> config.  This series brings it up to 256 bytes with PCI resource
> >
> > This is one reason why IO ports are a reallybad idea. Use memory mapped
> > register spaces like any other sane system and you won't have a problem.
>
> IO ports are much faster for notification than MMIO in KVM which is why
> the space is currently IO ports.  It was never meant to hold very large
> amounts of data.

Huh, I'm surprised it makes any real difference. Other that initial setup, 
isn't it just used to "kick" the devieonce after new dscriptors have been 
added to the ring buffer? I'd expect to be a fairly expensive operation 
(bouncing back to userspace).

Paul

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [PATCH 0/5][RFC] virtio-net: MAC filtering
@ 2009-01-09 19:56       ` Paul Brook
  0 siblings, 0 replies; 18+ messages in thread
From: Paul Brook @ 2009-01-09 19:56 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Mark McLoughlin, qemu-devel, Alex Williamson, kvm

> >> A concern here is the growing size of the virtio-net I/O port space
> >> config.  This series brings it up to 256 bytes with PCI resource
> >
> > This is one reason why IO ports are a reallybad idea. Use memory mapped
> > register spaces like any other sane system and you won't have a problem.
>
> IO ports are much faster for notification than MMIO in KVM which is why
> the space is currently IO ports.  It was never meant to hold very large
> amounts of data.

Huh, I'm surprised it makes any real difference. Other that initial setup, 
isn't it just used to "kick" the devieonce after new dscriptors have been 
added to the ring buffer? I'd expect to be a fairly expensive operation 
(bouncing back to userspace).

Paul

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [PATCH 0/5][RFC] virtio-net: MAC filtering
  2009-01-09 19:56       ` Paul Brook
@ 2009-01-09 20:00         ` Anthony Liguori
  -1 siblings, 0 replies; 18+ messages in thread
From: Anthony Liguori @ 2009-01-09 20:00 UTC (permalink / raw)
  To: Paul Brook; +Cc: qemu-devel, Alex Williamson, kvm, Mark McLoughlin

Paul Brook wrote:
>>>> A concern here is the growing size of the virtio-net I/O port space
>>>> config.  This series brings it up to 256 bytes with PCI resource
>>>>         
>>> This is one reason why IO ports are a reallybad idea. Use memory mapped
>>> register spaces like any other sane system and you won't have a problem.
>>>       
>> IO ports are much faster for notification than MMIO in KVM which is why
>> the space is currently IO ports.  It was never meant to hold very large
>> amounts of data.
>>     
>
> Huh, I'm surprised it makes any real difference. Other that initial setup, 
> isn't it just used to "kick" the devieonce after new dscriptors have been 
> added to the ring buffer? I'd expect to be a fairly expensive operation 
> (bouncing back to userspace).
>   

It's about 2x as expensive to go to userspace but only probably 1.5x 
expensive to do MMIO compared to PIO.  In the grand scheme of things, 
I'm not sure that it matters that much.  It's relatively simple for 
someone to try out the change and do some benchmarking.

The tougher thing is providing backwards compatible support.

Regards,

Anthony Liguori

> Paul
>   


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [PATCH 0/5][RFC] virtio-net: MAC filtering
@ 2009-01-09 20:00         ` Anthony Liguori
  0 siblings, 0 replies; 18+ messages in thread
From: Anthony Liguori @ 2009-01-09 20:00 UTC (permalink / raw)
  To: Paul Brook; +Cc: Mark McLoughlin, qemu-devel, Alex Williamson, kvm

Paul Brook wrote:
>>>> A concern here is the growing size of the virtio-net I/O port space
>>>> config.  This series brings it up to 256 bytes with PCI resource
>>>>         
>>> This is one reason why IO ports are a reallybad idea. Use memory mapped
>>> register spaces like any other sane system and you won't have a problem.
>>>       
>> IO ports are much faster for notification than MMIO in KVM which is why
>> the space is currently IO ports.  It was never meant to hold very large
>> amounts of data.
>>     
>
> Huh, I'm surprised it makes any real difference. Other that initial setup, 
> isn't it just used to "kick" the devieonce after new dscriptors have been 
> added to the ring buffer? I'd expect to be a fairly expensive operation 
> (bouncing back to userspace).
>   

It's about 2x as expensive to go to userspace but only probably 1.5x 
expensive to do MMIO compared to PIO.  In the grand scheme of things, 
I'm not sure that it matters that much.  It's relatively simple for 
someone to try out the change and do some benchmarking.

The tougher thing is providing backwards compatible support.

Regards,

Anthony Liguori

> Paul
>   

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [PATCH 0/5][RFC] virtio-net: MAC filtering
  2009-01-09 19:41     ` Anthony Liguori
@ 2009-01-11  8:32       ` Avi Kivity
  -1 siblings, 0 replies; 18+ messages in thread
From: Avi Kivity @ 2009-01-11  8:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paul Brook, Mark McLoughlin, Alex Williamson, kvm

Anthony Liguori wrote:
> Paul Brook wrote:
>>> A concern here is the growing size of the virtio-net I/O port space
>>> config.  This series brings it up to 256 bytes with PCI resource
>>> rounding.  The VLAN filter bitmap would increase that by another 512
>>> bytes, making it 1kB and limiting us to something less than 64 such
>>> devices per guest.  Is anyone worried?  Should filter tables live in
>>> MMIO space for virtio devices?  I'll send out the guest side patches 
>>> for
>>> virtio-net in a separate thread.  Thanks,
>>>     
>>
>> This is one reason why IO ports are a reallybad idea. Use memory 
>> mapped register spaces like any other sane system and you won't have 
>> a problem.
>>   
>
> IO ports are much faster for notification than MMIO in KVM which is 
> why the space is currently IO ports.  It was never meant to hold very 
> large amounts of data.

We can, btw, fix the mmio speed issue by adding two new hypercalls: 
mmio_read() and mmio_write().  We could then hook <asm/io.h> to use the 
hypercalls instead of reading directly.  This would speed up most 
emulated devices, not just virtio.

I don't know whether Windows drivers access mmio using helpers or directly.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [PATCH 0/5][RFC] virtio-net: MAC filtering
@ 2009-01-11  8:32       ` Avi Kivity
  0 siblings, 0 replies; 18+ messages in thread
From: Avi Kivity @ 2009-01-11  8:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: Mark McLoughlin, Paul Brook, Alex Williamson, kvm

Anthony Liguori wrote:
> Paul Brook wrote:
>>> A concern here is the growing size of the virtio-net I/O port space
>>> config.  This series brings it up to 256 bytes with PCI resource
>>> rounding.  The VLAN filter bitmap would increase that by another 512
>>> bytes, making it 1kB and limiting us to something less than 64 such
>>> devices per guest.  Is anyone worried?  Should filter tables live in
>>> MMIO space for virtio devices?  I'll send out the guest side patches 
>>> for
>>> virtio-net in a separate thread.  Thanks,
>>>     
>>
>> This is one reason why IO ports are a reallybad idea. Use memory 
>> mapped register spaces like any other sane system and you won't have 
>> a problem.
>>   
>
> IO ports are much faster for notification than MMIO in KVM which is 
> why the space is currently IO ports.  It was never meant to hold very 
> large amounts of data.

We can, btw, fix the mmio speed issue by adding two new hypercalls: 
mmio_read() and mmio_write().  We could then hook <asm/io.h> to use the 
hypercalls instead of reading directly.  This would speed up most 
emulated devices, not just virtio.

I don't know whether Windows drivers access mmio using helpers or directly.

-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 0/5] virtio-net: MAC filtering
  2009-01-07 17:37 ` [Qemu-devel] " Alex Williamson
@ 2009-01-13 21:23   ` Alex Williamson
  -1 siblings, 0 replies; 18+ messages in thread
From: Alex Williamson @ 2009-01-13 21:23 UTC (permalink / raw)
  To: kvm; +Cc: qemu-devel, Mark McLoughlin

Here's an update to the patches I sent last week.  The goal of this
series is to add MAC setting and filtering support to the virtio-net
backend in qemu/kvm.

This version now makes use of a virtqueue for outbound commands from the
guest driver.  This allows us to support numerous features without
trying to pack them into the virtio-net I/O port config space.  A
separate patch series shows the guest driver changes to enable this.
Please comment.  Thanks,

Alex

-- 
Alex Williamson                             HP Open Source & Linux Org.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Qemu-devel] [PATCH 0/5] virtio-net: MAC filtering
@ 2009-01-13 21:23   ` Alex Williamson
  0 siblings, 0 replies; 18+ messages in thread
From: Alex Williamson @ 2009-01-13 21:23 UTC (permalink / raw)
  To: kvm; +Cc: Mark McLoughlin, qemu-devel

Here's an update to the patches I sent last week.  The goal of this
series is to add MAC setting and filtering support to the virtio-net
backend in qemu/kvm.

This version now makes use of a virtqueue for outbound commands from the
guest driver.  This allows us to support numerous features without
trying to pack them into the virtio-net I/O port config space.  A
separate patch series shows the guest driver changes to enable this.
Please comment.  Thanks,

Alex

-- 
Alex Williamson                             HP Open Source & Linux Org.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/5] virtio-net: MAC filtering
  2009-01-13 21:23   ` [Qemu-devel] " Alex Williamson
@ 2009-01-13 21:54     ` Anthony Liguori
  -1 siblings, 0 replies; 18+ messages in thread
From: Anthony Liguori @ 2009-01-13 21:54 UTC (permalink / raw)
  To: Alex Williamson; +Cc: kvm, qemu-devel, Mark McLoughlin

Alex Williamson wrote:
> Here's an update to the patches I sent last week.  The goal of this
> series is to add MAC setting and filtering support to the virtio-net
> backend in qemu/kvm.
>
> This version now makes use of a virtqueue for outbound commands from the
> guest driver.  This allows us to support numerous features without
> trying to pack them into the virtio-net I/O port config space.  A
> separate patch series shows the guest driver changes to enable this.
> Please comment.  Thanks,
>   

The backend bits look good to me.

Regards,

Anthony Liguori

> Alex
>
>   


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Qemu-devel] Re: [PATCH 0/5] virtio-net: MAC filtering
@ 2009-01-13 21:54     ` Anthony Liguori
  0 siblings, 0 replies; 18+ messages in thread
From: Anthony Liguori @ 2009-01-13 21:54 UTC (permalink / raw)
  To: Alex Williamson; +Cc: Mark McLoughlin, qemu-devel, kvm

Alex Williamson wrote:
> Here's an update to the patches I sent last week.  The goal of this
> series is to add MAC setting and filtering support to the virtio-net
> backend in qemu/kvm.
>
> This version now makes use of a virtqueue for outbound commands from the
> guest driver.  This allows us to support numerous features without
> trying to pack them into the virtio-net I/O port config space.  A
> separate patch series shows the guest driver changes to enable this.
> Please comment.  Thanks,
>   

The backend bits look good to me.

Regards,

Anthony Liguori

> Alex
>
>   

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2009-01-13 21:54 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-07 17:37 [PATCH 0/5][RFC] virtio-net: MAC filtering Alex Williamson
2009-01-07 17:37 ` [Qemu-devel] " Alex Williamson
2009-01-09 19:27 ` Paul Brook
2009-01-09 19:27   ` Paul Brook
2009-01-09 19:37   ` Avi Kivity
2009-01-09 19:37     ` Avi Kivity
2009-01-09 19:41   ` Anthony Liguori
2009-01-09 19:41     ` Anthony Liguori
2009-01-09 19:56     ` Paul Brook
2009-01-09 19:56       ` Paul Brook
2009-01-09 20:00       ` Anthony Liguori
2009-01-09 20:00         ` Anthony Liguori
2009-01-11  8:32     ` Avi Kivity
2009-01-11  8:32       ` Avi Kivity
2009-01-13 21:23 ` [PATCH 0/5] " Alex Williamson
2009-01-13 21:23   ` [Qemu-devel] " Alex Williamson
2009-01-13 21:54   ` Anthony Liguori
2009-01-13 21:54     ` [Qemu-devel] " Anthony Liguori

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.