From: Nicolai Buchwitz <nb@tipi-net.de>
To: Mohsin Bashir <mohsin.bashr@gmail.com>
Cc: netdev@vger.kernel.org, Doug Berger <opendmb@gmail.com>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Jesper Dangaard Brouer <hawk@kernel.org>,
John Fastabend <john.fastabend@gmail.com>,
Stanislav Fomichev <sdf@fomichev.me>,
linux-kernel@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH net-next v3 3/6] net: bcmgenet: add basic XDP support (PASS/DROP)
Date: Tue, 31 Mar 2026 00:01:27 +0200 [thread overview]
Message-ID: <56270d59e5e5e79fcd3d104817679d70@tipi-net.de> (raw)
In-Reply-To: <1d551008-3c42-4b7b-9507-03072740a54a@gmail.com>
On 30.3.2026 20:15, Mohsin Bashir wrote:
>> +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.
Good point. I had planned to add ndo_change_mtu in a follow-up series,
but this leaves a gap where MTU can be changed while XDP is attached.
Options:
1. Add a minimal ndo_change_mtu to this series that only rejects MTU
changes incompatible with XDP, default behavior otherwise
2. Reject any MTU change while XDP is attached
3. Defer to the ndo_change_mtu follow-up series
Thoughts?
Thanks
Nicolai
next prev parent reply other threads:[~2026-03-30 22:01 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-19 11:53 [PATCH net-next v3 0/6] net: bcmgenet: add XDP support Nicolai Buchwitz
2026-03-19 11:53 ` [PATCH net-next v3 1/6] net: bcmgenet: convert RX path to page_pool Nicolai Buchwitz
2026-03-20 17:02 ` Simon Horman
2026-03-30 18:15 ` Mohsin Bashir
2026-03-30 21:03 ` Nicolai Buchwitz
2026-03-19 11:53 ` [PATCH net-next v3 2/6] net: bcmgenet: register xdp_rxq_info for each RX ring Nicolai Buchwitz
2026-03-19 21:18 ` Justin Chen
2026-03-19 11:53 ` [PATCH net-next v3 3/6] net: bcmgenet: add basic XDP support (PASS/DROP) Nicolai Buchwitz
2026-03-19 21:23 ` Justin Chen
2026-03-30 18:15 ` Mohsin Bashir
2026-03-30 22:01 ` Nicolai Buchwitz [this message]
2026-03-30 22:06 ` Florian Fainelli
2026-03-19 11:53 ` [PATCH net-next v3 4/6] net: bcmgenet: add XDP_TX support Nicolai Buchwitz
2026-03-19 21:31 ` Justin Chen
2026-03-20 17:02 ` Simon Horman
2026-03-30 18:15 ` Mohsin Bashir
2026-03-30 21:28 ` Nicolai Buchwitz
2026-03-19 11:53 ` [PATCH net-next v3 5/6] net: bcmgenet: add XDP_REDIRECT and ndo_xdp_xmit support Nicolai Buchwitz
2026-03-19 21:34 ` Justin Chen
2026-03-19 11:53 ` [PATCH net-next v3 6/6] net: bcmgenet: add XDP statistics counters Nicolai Buchwitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56270d59e5e5e79fcd3d104817679d70@tipi-net.de \
--to=nb@tipi-net.de \
--cc=andrew+netdev@lunn.ch \
--cc=ast@kernel.org \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=florian.fainelli@broadcom.com \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mohsin.bashr@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=opendmb@gmail.com \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox