Patch "gve: Cache link_speed value from device" has been added to the 6.1-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

    gve: Cache link_speed value from device

to the 6.1-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:
     gve-cache-link_speed-value-from-device.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 685ee8cf5cf09aee395b980594745c54ddee4bc2
Author: Joshua Washington <joshwash@xxxxxxxxxx>
Date:   Tue Mar 21 10:23:32 2023 -0700

    gve: Cache link_speed value from device
    
    [ Upstream commit 68c3e4fc8628b1487c965aabb29207249657eb5f ]
    
    The link speed is never changed for the uptime of a VM, and the current
    implementation sends an admin queue command for each call. Admin queue
    command invocations have nontrivial overhead (e.g., VM exits), which can
    be disruptive to users if triggered frequently. Our telemetry data shows
    that there are VMs that make frequent calls to this admin queue command.
    Caching the result of the original admin queue command would eliminate
    the need to send multiple admin queue commands on subsequent calls to
    retrieve link speed.
    
    Fixes: 7e074d5a76ca ("gve: Enable Link Speed Reporting in the driver.")
    Signed-off-by: Joshua Washington <joshwash@xxxxxxxxxx>
    Reviewed-by: Simon Horman <simon.horman@xxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230321172332.91678-1-joshwash@xxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/google/gve/gve_ethtool.c b/drivers/net/ethernet/google/gve/gve_ethtool.c
index 7b9a2d9d96243..38df602f2869c 100644
--- a/drivers/net/ethernet/google/gve/gve_ethtool.c
+++ b/drivers/net/ethernet/google/gve/gve_ethtool.c
@@ -535,7 +535,10 @@ static int gve_get_link_ksettings(struct net_device *netdev,
 				  struct ethtool_link_ksettings *cmd)
 {
 	struct gve_priv *priv = netdev_priv(netdev);
-	int err = gve_adminq_report_link_speed(priv);
+	int err = 0;
+
+	if (priv->link_speed == 0)
+		err = gve_adminq_report_link_speed(priv);
 
 	cmd->base.speed = priv->link_speed;
 	return err;



[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