]> www.infradead.org Git - users/jedix/linux-maple.git/commit
virtio_net: Update rss when set queue
authorPhilo Lu <lulie@linux.alibaba.com>
Mon, 4 Nov 2024 08:57:06 +0000 (16:57 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 7 Nov 2024 11:40:10 +0000 (12:40 +0100)
commit50bfcaedd78e53135ec0504302269b3b65bf1eff
treeb32b09ef04e63aed1b363d4e628088f8d045d5a4
parentdc749b7b06082ccaacc602e724445da19cd03e9f
virtio_net: Update rss when set queue

RSS configuration should be updated with queue number. In particular, it
should be updated when (1) rss enabled and (2) default rss configuration
is used without user modification.

During rss command processing, device updates queue_pairs using
rss.max_tx_vq. That is, the device updates queue_pairs together with
rss, so we can skip the sperate queue_pairs update
(VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET below) and return directly.

Also remove the `vi->has_rss ?` check when setting vi->rss.max_tx_vq,
because this is not used in the other hash_report case.

Fixes: c7114b1249fa ("drivers/net/virtio_net: Added basic RSS support.")
Signed-off-by: Philo Lu <lulie@linux.alibaba.com>
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/virtio_net.c