The core clears NETIF_F_GRO_HW before ndo_bpf runs and refuses to turn it back on while a program is attached, so neither of these can fire any more. That holds for a program an upper device pushes down as well, which is why this comes last - gve_verify_xdp_configuration() was the only thing standing between a bonded gve port and XDP running with RSC still on. The user visible behavior changes as intended: attaching XDP to a gve device with HW-GRO on used to fail with -EOPNOTSUPP and now succeeds with HW-GRO turned off, which is what bnxt and qede have always done. The header-data split refusal right below keys off priv->header_split_enabled and stays. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/google/gve/gve_main.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c index 0ee69bc11d83..8b65b8119662 100644 --- a/drivers/net/ethernet/google/gve/gve_main.c +++ b/drivers/net/ethernet/google/gve/gve_main.c @@ -1798,12 +1798,6 @@ 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_GRO_HW) { - NL_SET_ERR_MSG_MOD(extack, - "XDP is not supported when HW-GRO is on."); - return -EOPNOTSUPP; - } - if (priv->header_split_enabled) { NL_SET_ERR_MSG_MOD(extack, "XDP is not supported when header-data split is enabled."); @@ -2212,12 +2206,6 @@ static int gve_set_features(struct net_device *netdev, 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, - "HW-GRO is not supported when XDP is on."); - err = -EOPNOTSUPP; - goto revert_features; - } if (netif_running(netdev)) { err = gve_adjust_config(priv, &tx_alloc_cfg, &rx_alloc_cfg); if (err) -- 2.56.1