RE: [PATCH net v6 1/3] igb: do not let XDP frames span more than one Rx buffer

From: Tjerk Kusters

Date: Fri Nov 27 2026 - 03:51:20 EST


> - [High] igb: missing IGB_TS_HDR_LEN room in 2 KiB build_skb buffers with
> XDP

That is the first older issue in the cover letter, and this patch does
not introduce it or make it easier to hit. igb_skb_pad() has left
exactly IGB_MAX_FRAME_BUILD_SKB bytes before skb_shared_info since
9cbc948b5a20 ("igb: add XDP support"), and the receive length limit
(RLPML, or the PF pool limit with VFs) on these rings was
IGB_MAX_FRAME_BUILD_SKB before this patch, with and without XDP. With
XDP attached, this patch lowers the limit to the maximum frame size, so
the overlap can only get smaller. Without XDP the limit does not change.

The commit message says that the build_skb frame limit is kept; the
header room is only added where the limit is the hardware buffer size.
The comment above igb_xdp_frame_fits() means that the frame and the
header do not need a second hardware buffer, not that they fit before
skb_shared_info. I can make the comment say that if there is a v8.

Requiring the header room in the build_skb branch would refuse XDP at
the default MTU 1500, as v4 did. The real fix reserves the header in
igb_skb_pad() for all igb users, also without XDP, so I posted it
separately; it applies with or without this series:
https://lore.kernel.org/all/20261127-igb-skb-pad-v1-1-7e069eaf16d7@xxxxxxxx/

> - [Medium] igb_xdp_setup() now calls
> pm_runtime_get_sync(&adapter->pdev->dev) while holding RTNL (ndo_bpf…

The race is real, but not specific to this call. igb_xdp_setup() already
waits in the same way when the interface is up: igb_close() and
igb_open() both call pm_runtime_get_sync() under RTNL. __igb_open() does
so for "ip link set dev ethX up" on a down port, and the core resumes
the device under RTNL for ethtool requests. All of these can race with
the start of the same delayed runtime suspend. The root cause is that
igb_runtime_suspend() takes RTNL in __igb_shutdown(). That needs its own
fix, which covers this call too.

Dropping the resume alone is not an option: netdev_update_features()
ends in igb_reset() on a down interface, which writes the registers of
a suspended device. Skipping the update on a suspended device would
leave rx-all off although it was requested.

> - [High] This problem wasn't introduced by this patch, but it touches the
> same VMOLR.RLPML field the patch now manages, and it crosses a guest-…

Fixed separately, the patch is in Intel's net-queue (dev-queue):
https://lore.kernel.org/all/20261104-igb-vf-rlpml-v1-1-729621b60eee@xxxxxxxx/