]> git.baikalelectronics.ru Git - kernel.git/commit
macvtap: avoid hash calculating for single queue
authorJason Wang <jasowang@redhat.com>
Fri, 15 Jul 2016 07:46:30 +0000 (03:46 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Jul 2016 21:40:39 +0000 (14:40 -0700)
commite5e65bfb0c48751f91c6c09763e51a41cff1313d
treececa5157fc452af785e30c34259478f3038bc475
parentc58149f28a16e3e8d2bda1f45b0d4e13e45ac1a1
macvtap: avoid hash calculating for single queue

We decide the rxq through calculating its hash which is not necessary
if we only have one rx queue. So this patch skip this and just return
queue 0. Test shows 22% improving on guest rx pps.

Before: 1201504 pkts/s
After:  1472731 pkts/s

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macvtap.c