Thread (20 messages) 20 messages, 5 authors, 2026-03-30

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

From: Mohsin Bashir <hidden>
Date: 2026-03-30 18:15:39
Also in: bpf, lkml

+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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help