diff options
author | Willem de Bruijn <willemb@google.com> | 2019-01-18 04:08:53 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-01-19 21:05:30 +0300 |
commit | 133bbb18ab1a2f5549435c5a3126413344ddbcb8 (patch) | |
tree | 7744a3f5a38ce587b6f7bf4348e008b3187db865 /drivers/net | |
parent | 5f2939d933e9616b8b779fa46963689000f1a8f4 (diff) | |
download | linux-133bbb18ab1a2f5549435c5a3126413344ddbcb8.tar.xz |
virtio-net: per-queue RPS config
On multiqueue network devices, RPS maps are configured independently
for each receive queue through /sys/class/net/$DEV/queues/rx-*.
On virtio-net currently all packets use the map from rx-0, because the
real rx queue is not known at time of map lookup by get_rps_cpu.
Call skb_record_rx_queue in the driver rx path to make lookup work.
Recording the receive queue has ramifications beyond RPS, such as in
sticky load balancing decisions for sockets (skb_tx_hash) and XPS.
Reported-by: Mark Hlady <mhlady@google.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/virtio_net.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 023725086046..236ba5d5fb4b 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1035,6 +1035,7 @@ static void receive_buf(struct virtnet_info *vi, struct receive_queue *rq, goto frame_err; } + skb_record_rx_queue(skb, vq2rxq(rq->vq)); skb->protocol = eth_type_trans(skb, dev); pr_debug("Receiving skb proto 0x%04x len %i type %i\n", ntohs(skb->protocol), skb->len, skb->pkt_type); |