]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
virtio_net: multiqueue support
authorJason Wang <jasowang@redhat.com>
Fri, 7 Dec 2012 07:04:56 +0000 (07:04 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 9 Dec 2012 05:30:55 +0000 (00:30 -0500)
commit986a4f4d452dec004697f667439d27c3fda9c928
tree7c6d697cb47a069e0dc52d99fe2199e27f003c43
parente9d7417b97f420fa70e3e198f2603a0375fb80a7
virtio_net: multiqueue support

This patch adds the multiqueue (VIRTIO_NET_F_MQ) support to virtio_net
driver. VIRTIO_NET_F_MQ capable device could allow the driver to do packet
transmission and reception through multiple queue pairs and does the packet
steering to get better performance. By default, one one queue pair is used, user
could change the number of queue pairs by ethtool in the next patch.

When multiple queue pairs is used and the number of queue pairs is equal to the
number of vcpus. Driver does the following optimizations to implement per-cpu
virt queue pairs:

- select the txq based on the smp processor id.
- smp affinity hint to the cpu that owns the queue pairs.

This could be used with the flow steering support of the device to guarantee the
packets of a single flow is handled by the same cpu.

Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c
include/uapi/linux/virtio_net.h