lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 18 Jan 2019 11:49:39 +0800
From:   Jason Wang <jasowang@...hat.com>
To:     Willem de Bruijn <willemdebruijn.kernel@...il.com>,
        netdev@...r.kernel.org
Cc:     davem@...emloft.net, mst@...hat.com,
        Willem de Bruijn <willemb@...gle.com>,
        Mark Hlady <mhlady@...gle.com>
Subject: Re: [PATCH net-next] virtio-net: per-queue RPS config


On 2019/1/18 上午9:08, Willem de Bruijn wrote:
> From: Willem de Bruijn <willemb@...gle.com>
>
> 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@...gle.com>
> Signed-off-by: Willem de Bruijn <willemb@...gle.com>
> ---
>   drivers/net/virtio_net.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index 0237250860467..236ba5d5fb4bb 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);


Acked-by: Jason Wang <jasowang@...hat.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ