Since the RX path now builds multi-buffer xdp_buffs, XDP can operate on frames bigger than ETH_DATA_LEN (jumbo frames and scatter-gather frames). Drop the checks that rejected attaching an XDP program when the MTU is larger than ETH_DATA_LEN, and that refused to increase the MTU while XDP is enabled. Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 ------ drivers/net/ethernet/stmicro/stmmac/stmmac_xdp.c | 8 -------- 2 files changed, 14 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index be2cba8fcbc6..cbeb43011c4b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -6351,12 +6351,6 @@ static int stmmac_change_mtu(struct net_device *dev, int new_mtu) txfifosz = priv->dma_cap.tx_fifo_size; txfifosz /= priv->plat->tx_queues_to_use; - - if (stmmac_xdp_is_enabled(priv) && new_mtu > ETH_DATA_LEN) { - netdev_dbg(priv->dev, "Jumbo frames not supported for XDP\n"); - return -EINVAL; - } - new_mtu = STMMAC_ALIGN(new_mtu); /* If condition true, FIFO is too small or MTU too large */ diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_xdp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_xdp.c index 9af9e0cb366c..f6b3e8628a7c 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_xdp.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_xdp.c @@ -109,14 +109,6 @@ int stmmac_xdp_set_prog(struct stmmac_priv *priv, struct bpf_prog *prog, if_running = netif_running(dev); - if (prog && dev->mtu > ETH_DATA_LEN) { - /* For now, the driver doesn't support XDP functionality with - * jumbo frames so we return error. - */ - NL_SET_ERR_MSG_MOD(extack, "Jumbo frames not supported"); - return -EOPNOTSUPP; - } - if (!prog) xdp_features_clear_redirect_target(dev); -- 2.56.0