Patch "virtio_net: Sync rss config to device when virtnet_probe" has been added to the 6.11-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    virtio_net: Sync rss config to device when virtnet_probe

to the 6.11-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     virtio_net-sync-rss-config-to-device-when-virtnet_pr.patch
and it can be found in the queue-6.11 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit add8d6eb048e566b6730a14b48c85f5204976497
Author: Philo Lu <lulie@xxxxxxxxxxxxxxxxx>
Date:   Mon Nov 4 16:57:05 2024 +0800

    virtio_net: Sync rss config to device when virtnet_probe
    
    [ Upstream commit dc749b7b06082ccaacc602e724445da19cd03e9f ]
    
    During virtnet_probe, default rss configuration is initialized, but was
    not committed to the device. This patch fix this by sending rss command
    after device ready in virtnet_probe. Otherwise, the actual rss
    configuration used by device can be different with that read by user
    from driver, which may confuse the user.
    
    If the command committing fails, driver rss will be disabled.
    
    Fixes: c7114b1249fa ("drivers/net/virtio_net: Added basic RSS support.")
    Signed-off-by: Philo Lu <lulie@xxxxxxxxxxxxxxxxx>
    Signed-off-by: Xuan Zhuo <xuanzhuo@xxxxxxxxxxxxxxxxx>
    Acked-by: Joe Damato <jdamato@xxxxxxxxxx>
    Acked-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
    Signed-off-by: Paolo Abeni <pabeni@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 545dda8ec0775..b3232b8baa256 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -6584,6 +6584,15 @@ static int virtnet_probe(struct virtio_device *vdev)
 
 	virtio_device_ready(vdev);
 
+	if (vi->has_rss || vi->has_rss_hash_report) {
+		if (!virtnet_commit_rss_command(vi)) {
+			dev_warn(&vdev->dev, "RSS disabled because committing failed.\n");
+			dev->hw_features &= ~NETIF_F_RXHASH;
+			vi->has_rss_hash_report = false;
+			vi->has_rss = false;
+		}
+	}
+
 	virtnet_set_queues(vi, vi->curr_queue_pairs);
 
 	/* a random MAC address has been assigned, notify the device.




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux