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)
commit9bb8ca86075f37d3c169b9c46f8e7c6d3165e18f
tree22cce2f2704f6673d37c720c7ebbfa1a98a4b7a2
parent249a3630c48e5df8f8706d4cdf90bddf2b737c5d
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