Re: [PATCH net-next v3 3/6] net: bcmgenet: add basic XDP support (PASS/DROP)

Mohsin Bashir
2026-03-30T18:15:39Z

> +static int bcmgenet_xdp_setup(struct net_device *dev,
> + struct netdev_bpf *xdp)
> +{
> + struct bcmgenet_priv *priv = netdev_priv(dev);
> + struct bpf_prog *old_prog;
> + struct bpf_prog *prog = xdp->prog;
> +
> + if (prog && dev->mtu > PAGE_SIZE - GENET_RX_HEADROOM -
> + SKB_DATA_ALIGN(sizeof(struct skb_shared_info))) {
> + NL_SET_ERR_MSG_MOD(xdp->extack,
> + "MTU too large for single-page XDP buffer");
> + return -EOPNOTSUPP;
> + }

The MTU check here is great. But I do not see support for
.ndo_change_mtu. This would allow users to change MTU size AFTER the
program is attached.