Re: [PATCHv4] virtio-spec: virtio network device multiqueue support

2012-09-19 Thread Michael S. Tsirkin
On Wed, Sep 19, 2012 at 11:10:10AM +0930, Rusty Russell wrote: Tom Herbert therb...@google.com writes: On Tue, Sep 11, 2012 at 10:49 PM, Rusty Russell ru...@rustcorp.com.auwrote: Perhaps Tom can explain how we avoid out-of-order receive for the accelerated RFS case? It's not clear to

Re: [PATCHv4] virtio-spec: virtio network device multiqueue support

2012-09-18 Thread Rusty Russell
Tom Herbert therb...@google.com writes: On Tue, Sep 11, 2012 at 10:49 PM, Rusty Russell ru...@rustcorp.com.auwrote: Perhaps Tom can explain how we avoid out-of-order receive for the accelerated RFS case? It's not clear to me, but we need to be able to do that for virtio-net if it implements

Re: [PATCHv4] virtio-spec: virtio network device multiqueue support

2012-09-13 Thread Tom Herbert
On Tue, Sep 11, 2012 at 10:49 PM, Rusty Russell ru...@rustcorp.com.auwrote: Jason Wang jasow...@redhat.com writes: On 09/10/2012 02:33 PM, Michael S. Tsirkin wrote: A final addition: what you suggest above would be TX follows RX, right? BTW, yes. But it's a weird way to express what the

Re: [PATCHv4] virtio-spec: virtio network device multiqueue support

2012-09-13 Thread Tom Herbert
On Wed, Sep 12, 2012 at 12:57 AM, Michael S. Tsirkin m...@redhat.com wrote: On Wed, Sep 12, 2012 at 03:19:11PM +0930, Rusty Russell wrote: Jason Wang jasow...@redhat.com writes: On 09/10/2012 02:33 PM, Michael S. Tsirkin wrote: A final addition: what you suggest above would be TX follows

Re: [PATCHv4] virtio-spec: virtio network device multiqueue support

2012-09-12 Thread Rusty Russell
Jason Wang jasow...@redhat.com writes: On 09/10/2012 02:33 PM, Michael S. Tsirkin wrote: A final addition: what you suggest above would be TX follows RX, right? BTW, yes. But it's a weird way to express what the nic is doing. It is in anticipation of something like that, that I made

Re: [PATCHv4] virtio-spec: virtio network device multiqueue support

2012-09-12 Thread Michael S. Tsirkin
On Wed, Sep 12, 2012 at 03:19:11PM +0930, Rusty Russell wrote: Jason Wang jasow...@redhat.com writes: On 09/10/2012 02:33 PM, Michael S. Tsirkin wrote: A final addition: what you suggest above would be TX follows RX, right? BTW, yes. But it's a weird way to express what the nic is

Re: [PATCHv4] virtio-spec: virtio network device multiqueue support

2012-09-12 Thread Ben Hutchings
On Wed, 2012-09-12 at 07:40 -0700, Tom Herbert wrote: On Wed, Sep 12, 2012 at 12:57 AM, Michael S. Tsirkin m...@redhat.com wrote: On Wed, Sep 12, 2012 at 03:19:11PM +0930, Rusty Russell wrote: [...] Perhaps Tom can explain how we avoid out-of-order receive for the accelerated RFS case?

Re: [PATCHv4] virtio-spec: virtio network device multiqueue support

2012-09-11 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: In other words RPS is a hack to speed up networking on cheapo hardware, this is one of the reasons it is off by default. Good hardware has multiple receive queues. We can implement a good one so we do not need RPS. Also not all guest OS-es support

Re: [PATCHv4] virtio-spec: virtio network device multiqueue support

2012-09-10 Thread Michael S. Tsirkin
On Mon, Sep 10, 2012 at 11:42:25AM +0930, Rusty Russell wrote: OK, I read the spec (pasted below for easy of reading), but I'm still confused over how this will work. I thought normal net drivers have the hardware provide an rxhash for each packet, and we map that to CPU to queue the packet

Re: [PATCHv4] virtio-spec: virtio network device multiqueue support

2012-09-10 Thread Michael S. Tsirkin
On Mon, Sep 10, 2012 at 09:16:29AM +0300, Michael S. Tsirkin wrote: On Mon, Sep 10, 2012 at 11:42:25AM +0930, Rusty Russell wrote: OK, I read the spec (pasted below for easy of reading), but I'm still confused over how this will work. I thought normal net drivers have the hardware

Re: [PATCHv4] virtio-spec: virtio network device multiqueue support

2012-09-10 Thread Michael S. Tsirkin
On Mon, Sep 10, 2012 at 09:27:38AM +0300, Michael S. Tsirkin wrote: On Mon, Sep 10, 2012 at 09:16:29AM +0300, Michael S. Tsirkin wrote: On Mon, Sep 10, 2012 at 11:42:25AM +0930, Rusty Russell wrote: OK, I read the spec (pasted below for easy of reading), but I'm still confused over how

Re: [PATCHv4] virtio-spec: virtio network device multiqueue support

2012-09-10 Thread Jason Wang
On 09/10/2012 02:33 PM, Michael S. Tsirkin wrote: On Mon, Sep 10, 2012 at 09:27:38AM +0300, Michael S. Tsirkin wrote: On Mon, Sep 10, 2012 at 09:16:29AM +0300, Michael S. Tsirkin wrote: On Mon, Sep 10, 2012 at 11:42:25AM +0930, Rusty Russell wrote: OK, I read the spec (pasted below for easy

Re: [PATCHv4] virtio-spec: virtio network device multiqueue support

2012-09-10 Thread Rick Jones
On 09/09/2012 07:12 PM, Rusty Russell wrote: OK, I read the spec (pasted below for easy of reading), but I'm still confused over how this will work. I thought normal net drivers have the hardware provide an rxhash for each packet, and we map that to CPU to queue the packet on[1]. We hope that

[PATCHv4] virtio-spec: virtio network device multiqueue support

2012-09-09 Thread Michael S. Tsirkin
Add multiqueue support to virtio network device. Add a new feature flag VIRTIO_NET_F_MULTIQUEUE for this feature, a +new configuration field max_virtqueue_pairs to detect supported number +of virtqueues as well as a new command VIRTIO_NET_CTRL_STEERING to +program packet steering. Signed-off-by:

Re: [PATCHv4] virtio-spec: virtio network device multiqueue support

2012-09-09 Thread Rusty Russell
OK, I read the spec (pasted below for easy of reading), but I'm still confused over how this will work. I thought normal net drivers have the hardware provide an rxhash for each packet, and we map that to CPU to queue the packet on[1]. We hope that the receiving process migrates to that CPU, so