]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
gve: Advertise NETIF_F_GRO_HW instead of NETIF_F_LRO
authorAnkit Garg <nktgrg@google.com>
Tue, 3 Mar 2026 19:55:46 +0000 (11:55 -0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 5 Mar 2026 14:49:51 +0000 (15:49 +0100)
The device behind DQO format has always coalesced packets per stricter
hardware GRO spec even though it was being advertised as LRO.

Update advertised capability to match device behavior.

Signed-off-by: Ankit Garg <nktgrg@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Harshitha Ramamurthy <hramamurthy@google.com>
Signed-off-by: Joshua Washington <joshwash@google.com>
Link: https://patch.msgid.link/20260303195549.2679070-2-joshwash@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/google/gve/gve_adminq.c
drivers/net/ethernet/google/gve/gve_main.c

index b5f105709e49b832796fac3c953933f536fb9e24..8bd0ceadd927b806da0eff462261cc81263e442a 100644 (file)
@@ -791,7 +791,7 @@ static void gve_adminq_get_create_rx_queue_cmd(struct gve_priv *priv,
                cmd->create_rx_queue.rx_buff_ring_size =
                        cpu_to_be16(priv->rx_desc_cnt);
                cmd->create_rx_queue.enable_rsc =
-                       !!(priv->dev->features & NETIF_F_LRO);
+                       !!(priv->dev->features & NETIF_F_GRO_HW);
                if (priv->header_split_enabled)
                        cmd->create_rx_queue.header_buffer_size =
                                cpu_to_be16(priv->header_buf_size);
@@ -1117,9 +1117,9 @@ int gve_adminq_describe_device(struct gve_priv *priv)
 
        gve_set_default_rss_sizes(priv);
 
-       /* DQO supports LRO. */
+       /* DQO supports HW-GRO. */
        if (!gve_is_gqi(priv))
-               priv->dev->hw_features |= NETIF_F_LRO;
+               priv->dev->hw_features |= NETIF_F_GRO_HW;
 
        priv->max_registered_pages =
                                be64_to_cpu(descriptor->max_registered_pages);
index c654cf503c1a27c4119671ffe2ce52a187d1b5d9..424d973c97f246c983e00cbfdbffd950490c1602 100644 (file)
@@ -1758,9 +1758,9 @@ static int gve_verify_xdp_configuration(struct net_device *dev,
        struct gve_priv *priv = netdev_priv(dev);
        u16 max_xdp_mtu;
 
-       if (dev->features & NETIF_F_LRO) {
+       if (dev->features & NETIF_F_GRO_HW) {
                NL_SET_ERR_MSG_MOD(extack,
-                                  "XDP is not supported when LRO is on.");
+                                  "XDP is not supported when HW-GRO is on.");
                return -EOPNOTSUPP;
        }
 
@@ -2177,12 +2177,13 @@ static int gve_set_features(struct net_device *netdev,
 
        gve_get_curr_alloc_cfgs(priv, &tx_alloc_cfg, &rx_alloc_cfg);
 
-       if ((netdev->features & NETIF_F_LRO) != (features & NETIF_F_LRO)) {
-               netdev->features ^= NETIF_F_LRO;
-               if (priv->xdp_prog && (netdev->features & NETIF_F_LRO)) {
+       if ((netdev->features & NETIF_F_GRO_HW) !=
+           (features & NETIF_F_GRO_HW)) {
+               netdev->features ^= NETIF_F_GRO_HW;
+               if (priv->xdp_prog && (netdev->features & NETIF_F_GRO_HW)) {
                        netdev_warn(netdev,
-                                   "XDP is not supported when LRO is on.\n");
-                       err =  -EOPNOTSUPP;
+                                   "HW-GRO is not supported when XDP is on.");
+                       err = -EOPNOTSUPP;
                        goto revert_features;
                }
                if (netif_running(netdev)) {