]> git.baikalelectronics.ru Git - kernel.git/commit
virtio-net: switch to use XPS to choose txq
authorJason Wang <jasowang@redhat.com>
Tue, 5 Nov 2013 10:19:45 +0000 (18:19 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Nov 2013 03:20:29 +0000 (22:20 -0500)
commit855983cf06fecf88cefbe299dc7b7e43aff24270
tree22cce2f2704f6673d37c720c7ebbfa1a98a4b7a2
parent0d278020470824bf52babc3d5ec1dbbc9d12b73e
virtio-net: switch to use XPS to choose txq

We used to use a percpu structure vq_index to record the cpu to queue
mapping, this is suboptimal since it duplicates the work of XPS and
loses all other XPS functionality such as allowing user to configure
their own transmission steering strategy.

So this patch switches to use XPS and suggest a default mapping when
the number of cpus is equal to the number of queues. With XPS support,
there's no need for keeping per-cpu vq_index and .ndo_select_queue(),
so they were removed also.

Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c