* [PATCH net-next v13 1/5] net: stmmac: selftests: Prevent RXC from being disabled in LPI
2026-11-25 14:48 [PATCH net-next v13 0/5] net: stmmac: introduce XDP rx multi-buff support Lorenzo Bianconi
@ 2026-11-25 14:48 ` Lorenzo Bianconi
2026-11-25 14:48 ` [PATCH net-next v13 2/5] net: stmmac: remove software VLAN tag stripping Lorenzo Bianconi
` (4 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Lorenzo Bianconi @ 2026-11-25 14:48 UTC (permalink / raw)
To: Maxime Chevallier, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Alexandre Torgue,
Alexei Starovoitov, Daniel Borkmann, Jesper Dangaard Brouer,
John Fastabend, Stanislav Fomichev, Jose Abreu, Ong Boon Leong,
Simon Horman, Andrii Nakryiko, Eduard Zingerman,
Kumar Kartikeya Dwivedi, Martin KaFai Lau, Song Liu,
Yonghong Song, Jiri Olsa, Emil Tsalapatis, Ihor Solodrai,
Matthew Gerlach, Boon Khai Ng
Cc: netdev, linux-arm-kernel, bpf, Peilin He
From: Maxime Chevallier <maxime.chevallier@bootlin.com>
RXC is critical to the RX path and some register banks in stmmac, so
it is blocked from being disabled in LPI when we know we're going
to need that clock.
During selftests, we're in MAC loopback so the PHY may enter LPI and
stop its RXC. This will prevent the RX path from properly receiving
the looped-back packets, hence failing the selftests.
As NETIF_F_VLAN_FEATURES may be empty on some platforms once the
software VLAN stripping is removed, the phylink config attribute
'eee_rx_clk_stop_enable' may no longer be unconditionally set to
false, hence allowing RXC to be disabled during LPI on platforms
that don't have any VLAN features. This is already the case for
CONFIG_VLAN_8021Q=n builds.
Fixes: 091810dbded9 ("net: stmmac: Introduce selftests support")
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: Peilin He <he.peilin@zte.com.cn>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
index df696e2c1528..41a8493cf9dd 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
@@ -1940,12 +1940,14 @@ void stmmac_selftest_run(struct net_device *dev,
return;
}
+ phylink_rx_clk_stop_block(priv->phylink);
for (i = 0; i < count; i++) {
ret = stmmac_selftests[i].fn(priv);
if (ret && (ret != -EOPNOTSUPP))
etest->flags |= ETH_TEST_FL_FAILED;
buf[i] = ret;
}
+ phylink_rx_clk_stop_unblock(priv->phylink);
stmmac_set_mac_loopback(priv, priv->ioaddr, false);
}
--
2.56.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH net-next v13 2/5] net: stmmac: remove software VLAN tag stripping
2026-11-25 14:48 [PATCH net-next v13 0/5] net: stmmac: introduce XDP rx multi-buff support Lorenzo Bianconi
2026-11-25 14:48 ` [PATCH net-next v13 1/5] net: stmmac: selftests: Prevent RXC from being disabled in LPI Lorenzo Bianconi
@ 2026-11-25 14:48 ` Lorenzo Bianconi
2026-11-26 14:50 ` netdev-bot+sashiko
2026-11-25 14:48 ` [PATCH net-next v13 3/5] net: xdp: add xdp_buff_shrink_tail() helper Lorenzo Bianconi
` (3 subsequent siblings)
5 siblings, 1 reply; 10+ messages in thread
From: Lorenzo Bianconi @ 2026-11-25 14:48 UTC (permalink / raw)
To: Maxime Chevallier, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Alexandre Torgue,
Alexei Starovoitov, Daniel Borkmann, Jesper Dangaard Brouer,
John Fastabend, Stanislav Fomichev, Jose Abreu, Ong Boon Leong,
Simon Horman, Andrii Nakryiko, Eduard Zingerman,
Kumar Kartikeya Dwivedi, Martin KaFai Lau, Song Liu,
Yonghong Song, Jiri Olsa, Emil Tsalapatis, Ihor Solodrai,
Matthew Gerlach, Boon Khai Ng
Cc: netdev, linux-arm-kernel, bpf, Peilin He, Lorenzo Bianconi
The software VLAN stripping logic in stmmac_rx_vlan() was originally
introduced in 2014 by commit b93819854d6e ("stmmac: Add vlan rx for
better GRO performance.") as a workaround to improve GRO performance,
since at that time GRO could not handle frames with VLAN tags. However,
this limitation was resolved in 2015 by commit 66e5133f19e9 ("vlan: Add
GRO support for non hardware accelerated vlan"), which added GRO support
for non-hardware-accelerated VLAN frames. Keeping a software fallback
path for VLAN stripping is no longer necessary and only adds complexity.
After removing it, VLAN tags remain in the packet, so
stmmac_has_ip_ethertype() has to keep recognising IPv4/IPv6 behind a
single in-payload VLAN tag. On RX the helper runs after eth_type_trans(),
which has already pulled the Ethernet header, so walk the tag chain with
skb_mac_offset() instead of __vlan_get_protocol(), which assumes the MAC
header still sits at skb->data. On TX the helper still runs before the
header is pulled.
Make the tolerated L2 depth explicit:
- on RX allow a single in-payload C-tag while the MAC is not stripping
tags (VLAN_ETH_HLEN); when HW stripping is active the payload must be
tag-free, so keep the ETH_HLEN limit and reject any tag that is still
there;
- in-payload S-tags are always rejected, as only an S-tag that the
hardware stripped (and whose type is reported through
get_rx_vlan_proto) is known to have been parsed by the checksum engine;
- on TX keep the old ETH_HLEN limit, so DSA-tagged frames that the
checksum engine ignores (see commit c2945c435c99 ("net: stmmac:
Prevent DSA tags from breaking COE")) remain excluded from hardware
checksum and TSO.
This intentionally changes the advertised features:
- dwmac100/dwmac1000 no longer advertise NETIF_F_HW_VLAN_CTAG_RX;
they have no hardware VLAN stripping.
- On xmac cores NETIF_F_HW_VLAN_CTAG_RX is advertised only when the
VLAN ops provide .set_hw_vlan_mode and .rx_hw_vlan, so DWXLGMAC no
longer falsely advertises RX VLAN offload.
- NETIF_F_HW_VLAN_STAG_RX is advertised only on cores that provide
hardware RX VLAN offload and whose descriptor ops report the stripped
tag protocol (get_rx_vlan_proto), i.e. DWXGMAC. DWXLGMAC loses it
because it has no RX VLAN offload, while cores without
get_rx_vlan_proto report stripped S-tags as C-tags.
The DWXLGMAC mis-advertisement was introduced when the RX VLAN offload
gate was widened to all xmac cores, so tag the fix accordingly.
With NETIF_F_VLAN_FEATURES possibly empty, EEE RX clock stop may be
enabled on some platforms; the preceding selftests patch blocks RX
clock stop while the ethtool selftests run.
This depends on the preceding selftests fix.
Fixes: 534df0c1724b ("net: stmmac: dwxgmac2: Add support for HW-accelerated VLAN stripping")
Suggested-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Co-developed-by: Peilin He <he.peilin@zte.com.cn>
Signed-off-by: Peilin He <he.peilin@zte.com.cn>
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac.h | 12 +++
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 89 ++++++++---------------
2 files changed, 44 insertions(+), 57 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
index fcc395321816..fa9ef4212982 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
@@ -478,4 +478,16 @@ static inline int stmmac_selftest_get_count(struct stmmac_priv *priv)
}
#endif /* CONFIG_STMMAC_SELFTESTS */
+static inline bool stmmac_rx_8021q_offload(struct stmmac_priv *priv)
+{
+ return priv->hw->vlan && priv->hw->vlan->set_hw_vlan_mode &&
+ priv->hw->vlan->rx_hw_vlan;
+}
+
+static inline bool stmmac_rx_8021ad_offload(struct stmmac_priv *priv)
+{
+ return stmmac_rx_8021q_offload(priv) &&
+ priv->hw->desc->get_rx_vlan_proto;
+}
+
#endif /* __STMMAC_H__ */
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index ca4c7fb11b73..7896364c43e9 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -4879,7 +4879,9 @@ static netdev_tx_t stmmac_tso_xmit(struct sk_buff *skb, struct net_device *dev)
/**
* stmmac_has_ip_ethertype() - Check if packet has IP ethertype
+ * @priv: driver private structure
* @skb: socket buffer to check
+ * @xmit: transmit path
*
* Check if a packet has an ethertype that will trigger the IP header checks
* and IP/TCP checksum engine of the stmmac core.
@@ -4887,16 +4889,25 @@ static netdev_tx_t stmmac_tso_xmit(struct sk_buff *skb, struct net_device *dev)
* Return: true if the ethertype can trigger the checksum engine, false
* otherwise
*/
-static bool stmmac_has_ip_ethertype(struct sk_buff *skb)
+static bool stmmac_has_ip_ethertype(struct stmmac_priv *priv,
+ struct sk_buff *skb, bool xmit)
{
- int depth = 0;
- __be16 proto;
+ __be16 proto, h_proto = eth_header_parse_protocol(skb);
+ int max_l2_hlen, depth = 0;
+
+ /* An S-tag still in the payload may not have been parsed by the
+ * checksum engine; only trust it when the hardware stripped it, in
+ * which case h_proto is no longer ETH_P_8021AD.
+ */
+ if (h_proto == htons(ETH_P_8021AD))
+ return false;
- proto = __vlan_get_protocol(skb, eth_header_parse_protocol(skb),
- &depth);
+ proto = vlan_get_protocol_offset_inline(skb, h_proto,
+ skb_mac_offset(skb), &depth);
- return (depth <= ETH_HLEN) &&
- (proto == htons(ETH_P_IP) || proto == htons(ETH_P_IPV6));
+ max_l2_hlen = xmit || priv->hw->hw_vlan_en ? ETH_HLEN : VLAN_ETH_HLEN;
+ return depth <= max_l2_hlen &&
+ (proto == htons(ETH_P_IP) || proto == htons(ETH_P_IPV6));
}
/**
@@ -5153,7 +5164,7 @@ static netdev_features_t stmmac_features_check(struct sk_buff *skb,
* harmonize_features() in net/core/dev.c
*/
if (priv->plat->tx_queues_cfg[queue].coe_unsupported ||
- !stmmac_has_ip_ethertype(skb))
+ !stmmac_has_ip_ethertype(priv, skb, true))
features &= ~(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM);
if (skb_is_gso(skb)) {
@@ -5175,37 +5186,6 @@ static netdev_features_t stmmac_features_check(struct sk_buff *skb,
return vlan_features_check(skb, features);
}
-static int stmmac_rx_vlan(struct net_device *dev, struct sk_buff *skb)
-{
- struct vlan_ethhdr *veth;
-
- if (!pskb_may_pull(skb, ETH_HLEN))
- return -EINVAL;
-
- veth = skb_vlan_eth_hdr(skb);
- if ((veth->h_vlan_proto == htons(ETH_P_8021Q) &&
- dev->features & NETIF_F_HW_VLAN_CTAG_RX) ||
- (veth->h_vlan_proto == htons(ETH_P_8021AD) &&
- dev->features & NETIF_F_HW_VLAN_STAG_RX)) {
- __be16 vlan_proto = veth->h_vlan_proto;
- u8 meta_len = skb_metadata_len(skb);
- u16 vlanid;
-
- /* pop the vlan tag */
- if (!pskb_may_pull(skb, VLAN_ETH_HLEN))
- return -EINVAL;
-
- veth = skb_vlan_eth_hdr(skb);
- vlanid = ntohs(veth->h_vlan_TCI);
- memmove(skb->data - meta_len + VLAN_HLEN,
- skb->data - meta_len, meta_len + ETH_ALEN * 2);
- skb_pull(skb, VLAN_HLEN);
- __vlan_hwaccel_put_tag(skb, vlan_proto, vlanid);
- }
-
- return 0;
-}
-
static bool stmmac_rx_need_ic(struct stmmac_priv *priv,
struct stmmac_rx_queue *rx_q, u32 queue)
{
@@ -5626,15 +5606,11 @@ static void stmmac_dispatch_skb_zc(struct stmmac_priv *priv, u32 queue,
if (priv->hw->hw_vlan_en) {
/* MAC level stripping. */
stmmac_rx_hw_vlan(priv, priv->hw, p, skb);
- } else if (stmmac_rx_vlan(priv->dev, skb)) {
- dev_kfree_skb_any(skb);
- priv->xstats.rx_dropped++;
- return;
}
skb->protocol = eth_type_trans(skb, priv->dev);
- if (unlikely(!coe) || !stmmac_has_ip_ethertype(skb) ||
+ if (unlikely(!coe) || !stmmac_has_ip_ethertype(priv, skb, false) ||
(status & csum_none))
skb_checksum_none_assert(skb);
else
@@ -6142,15 +6118,12 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
if (priv->hw->hw_vlan_en) {
/* MAC level stripping. */
stmmac_rx_hw_vlan(priv, priv->hw, p, skb);
- } else if (stmmac_rx_vlan(priv->dev, skb)) {
- dev_kfree_skb_any(skb);
- rx_dropped++;
- goto next;
}
skb->protocol = eth_type_trans(skb, priv->dev);
- if (unlikely(!coe) || !stmmac_has_ip_ethertype(skb) ||
+ if (unlikely(!coe) ||
+ !stmmac_has_ip_ethertype(priv, skb, false) ||
(status & csum_none))
skb_checksum_none_assert(skb);
else
@@ -6429,7 +6402,7 @@ static netdev_features_t stmmac_fix_features(struct net_device *dev,
if (priv->plat->bugged_jumbo && (dev->mtu > ETH_DATA_LEN))
features &= ~NETIF_F_CSUM_MASK;
- if (priv->plat->core_type == DWMAC_CORE_XGMAC) {
+ if (stmmac_rx_8021ad_offload(priv)) {
if (features & NETIF_F_HW_VLAN_CTAG_RX)
features |= NETIF_F_HW_VLAN_STAG_RX;
else
@@ -6462,7 +6435,7 @@ static int stmmac_set_features(struct net_device *netdev,
stmmac_enable_sph(priv, priv->ioaddr, sph_en, chan);
}
- if (features & NETIF_F_HW_VLAN_CTAG_RX)
+ if (features & (NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_HW_VLAN_STAG_RX))
priv->hw->hw_vlan_en = true;
else
priv->hw->hw_vlan_en = false;
@@ -8275,15 +8248,17 @@ static int __stmmac_dvr_probe(struct device *device,
ndev->features |= ndev->hw_features | NETIF_F_HIGHDMA;
ndev->watchdog_timeo = msecs_to_jiffies(watchdog);
#ifdef STMMAC_VLAN_TAG_USED
- /* Both mac100 and gmac support receive VLAN tag detection */
- ndev->features |= NETIF_F_HW_VLAN_CTAG_RX;
- if (priv->plat->core_type == DWMAC_CORE_XGMAC)
- ndev->features |= NETIF_F_HW_VLAN_STAG_RX;
-
- if (dwmac_is_xmac(priv->plat->core_type)) {
+ if (stmmac_rx_8021q_offload(priv)) {
+ ndev->features |= NETIF_F_HW_VLAN_CTAG_RX;
ndev->hw_features |= NETIF_F_HW_VLAN_CTAG_RX;
priv->hw->hw_vlan_en = true;
}
+
+ if (stmmac_rx_8021ad_offload(priv)) {
+ ndev->features |= NETIF_F_HW_VLAN_STAG_RX;
+ ndev->hw_features |= NETIF_F_HW_VLAN_STAG_RX;
+ }
+
if (priv->dma_cap.vlhash) {
ndev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
if (priv->plat->core_type == DWMAC_CORE_XGMAC)
--
2.56.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH net-next v13 2/5] net: stmmac: remove software VLAN tag stripping
2026-11-25 14:48 ` [PATCH net-next v13 2/5] net: stmmac: remove software VLAN tag stripping Lorenzo Bianconi
@ 2026-11-26 14:50 ` netdev-bot+sashiko
0 siblings, 0 replies; 10+ messages in thread
From: netdev-bot+sashiko @ 2026-11-26 14:50 UTC (permalink / raw)
To: lorenzo.bianconi
Cc: maxime.chevallier, andrew+netdev, davem, edumazet, kuba, pabeni,
mcoquelin.stm32, alexandre.torgue, ast, daniel, hawk,
john.fastabend, sdf, Jose.Abreu, boon.leong.ong, horms, andrii,
eddyz87, memxor, martin.lau, song, yonghong.song, jolsa, emil,
ihor.solodrai, matthew.gerlach, boon.khai.ng, netdev,
linux-arm-kernel, bpf, nb
Thank you for your contribution! Sashiko AI review found 3 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 2
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] In __stmmac_dvr_probe()
(drivers/net/ethernet/stmicro/stmmac/stmmac_main.c),…
- [Low] The patch carries 'Fixes: 534df0c1724b', which marks it for
stable backporting.
- [Low] On DWXGMAC (stmmac_rx_8021ad_offload() true),
__stmmac_dvr_probe() now adds NETIF_F_HW_VLAN_STAG_RX to…
--
net: stmmac: remove software VLAN tag stripping
This removes the software VLAN stripping in stmmac_rx_vlan() and changes
stmmac_has_ip_ethertype() so that it still recognises IPv4/IPv6 behind a
single in-payload C-tag on RX. NETIF_F_HW_VLAN_CTAG_RX and
NETIF_F_HW_VLAN_STAG_RX are now advertised only when the VLAN ops and the
descriptor ops provide real RX VLAN offload.
> The DWXLGMAC mis-advertisement was introduced when the RX VLAN offload
> gate was widened to all xmac cores, so tag the fix accordingly.
>
> With NETIF_F_VLAN_FEATURES possibly empty, EEE RX clock stop may be
> enabled on some platforms; the preceding selftests patch blocks RX
> clock stop while the ethtool selftests run.
>
> This depends on the preceding selftests fix.
>
> Fixes: 534df0c1724b ("net: stmmac: dwxgmac2: Add support for HW-accelerated VLAN stripping")
[Severity: Low]
Is the Fixes: tag in proportion to the change? On DWXLGMAC,
dwxlgmac2_vlan_ops has no .rx_hw_vlan:
const struct stmmac_vlan_ops dwxlgmac2_vlan_ops = {
.update_vlan_hash = dwxgmac2_update_vlan_hash,
.enable_vlan = vlan_enable,
.set_hw_vlan_mode = dwxlgmac2_set_hw_vlan_mode,
};
With the old hw_vlan_en = true, stmmac_rx_hw_vlan() did nothing, and
dwxlgmac2_set_hw_vlan_mode() only sets EDVLP. The tag stayed in the
payload and the VLAN core removed it in software. The only visible effect
seems to have been the wrong CTAG_RX/STAG_RX advertisement.
The same Fixes-tagged patch also does the following:
- removes the software stripping path;
- drops CTAG_RX on every dwmac100/dwmac1000;
- changes the RX checksum trust rules in stmmac_has_ip_ethertype();
- makes STAG_RX user-visible in hw_features;
- depends on the preceding selftests patch.
Through the NETIF_F_VLAN_FEATURES check in stmmac_phylink_setup(), it also
enables EEE RX clock stop on every such platform that does not set
STMMAC_FLAG_RX_CLK_RUNS_IN_LPI, not only on "some platforms".
Could the minimal DWXLGMAC advertisement fix be split out for net, with
the cleanup and its EEE side effects going to net-next?
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index ca4c7fb11b73f..7896364c43e95 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
[ ... ]
> @@ -8275,15 +8248,17 @@ static int __stmmac_dvr_probe(struct device *device,
> ndev->features |= ndev->hw_features | NETIF_F_HIGHDMA;
> ndev->watchdog_timeo = msecs_to_jiffies(watchdog);
> #ifdef STMMAC_VLAN_TAG_USED
> - /* Both mac100 and gmac support receive VLAN tag detection */
> - ndev->features |= NETIF_F_HW_VLAN_CTAG_RX;
> - if (priv->plat->core_type == DWMAC_CORE_XGMAC)
> - ndev->features |= NETIF_F_HW_VLAN_STAG_RX;
> -
> - if (dwmac_is_xmac(priv->plat->core_type)) {
> + if (stmmac_rx_8021q_offload(priv)) {
> + ndev->features |= NETIF_F_HW_VLAN_CTAG_RX;
> ndev->hw_features |= NETIF_F_HW_VLAN_CTAG_RX;
> priv->hw->hw_vlan_en = true;
> }
[Severity: Medium]
Does this make RX clock stop reachable from set_rx_mode again?
dwmac1000 has no .vlan ops, and neither does DWXLGMAC without
vlhash/vlins. With CONFIG_VLAN_8021Q enabled, these cores now end up with
no NETIF_F_VLAN_FEATURES. stmmac_phylink_setup() then does:
if (!(priv->plat->flags & STMMAC_FLAG_RX_CLK_RUNS_IN_LPI) &&
!(priv->dev->features & NETIF_F_VLAN_FEATURES))
config->eee_rx_clk_stop_enable = true;
As a result the PHY may stop RXC while the link is in LPI.
stmmac_set_rx_mode() runs with BH disabled under netif_addr_lock_bh(). It
cannot use phylink_rx_clk_stop_block(), which needs RTNL and a sleeping
MDIO access:
* FIXME: This may need RXC to be running, but it may be called with BH
* disabled, which means we can't call phylink_rx_clk_stop*().
*/
static void stmmac_set_rx_mode(struct net_device *dev)
{
struct stmmac_priv *priv = netdev_priv(dev);
stmmac_set_filter(priv, priv->hw, dev);
Commit c171e679ee66 notes that the hardware needs RXC when MAC address
configuration registers are written. On these platforms, could a
multicast join/leave, a promisc/allmulti change or a secondary unicast
address update reach stmmac_set_filter() while RXC is stopped? That would
leave the address or hash filter unprogrammed.
The selftests patch covers the ethtool selftests, but the commit message
does not mention this path. dwmac100 should not be affected because it
has no EEE.
These platforms did run with RX clock stop before c171e679ee66, and they
still do with CONFIG_VLAN_8021Q=n. Whether dwmac1000 filter writes
actually fail without RXC is therefore a hardware question.
> +
> + if (stmmac_rx_8021ad_offload(priv)) {
> + ndev->features |= NETIF_F_HW_VLAN_STAG_RX;
> + ndev->hw_features |= NETIF_F_HW_VLAN_STAG_RX;
> + }
[Severity: Low]
Should STAG_RX be added to hw_features here? On DWXGMAC this tells
userspace the bit can be toggled on its own, but stmmac_fix_features()
ties it to CTAG_RX:
if (stmmac_rx_8021ad_offload(priv)) {
if (features & NETIF_F_HW_VLAN_CTAG_RX)
features |= NETIF_F_HW_VLAN_STAG_RX;
else
features &= ~NETIF_F_HW_VLAN_STAG_RX;
}
stmmac_set_features() also has only one combined hw_vlan_en state.
So "ethtool -K <dev> rx-vlan-stag-hw-parse off" with rxvlan on, or "on"
with rxvlan off, is always undone. ethtool then reports [requested off]
or [requested on].
Before this patch STAG_RX was only in features and showed as [fixed],
which matched the coupling. The coupling in stmmac_fix_features() already
adds STAG_RX back when CTAG_RX is re-enabled.
> +
> if (priv->dma_cap.vlhash) {
> ndev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
> if (priv->plat->core_type == DWMAC_CORE_XGMAC)
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261125-stmmac-rx-mb-v13-0-0f6bac53e8d5%40oss.qualcomm.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH net-next v13 3/5] net: xdp: add xdp_buff_shrink_tail() helper
2026-11-25 14:48 [PATCH net-next v13 0/5] net: stmmac: introduce XDP rx multi-buff support Lorenzo Bianconi
2026-11-25 14:48 ` [PATCH net-next v13 1/5] net: stmmac: selftests: Prevent RXC from being disabled in LPI Lorenzo Bianconi
2026-11-25 14:48 ` [PATCH net-next v13 2/5] net: stmmac: remove software VLAN tag stripping Lorenzo Bianconi
@ 2026-11-25 14:48 ` Lorenzo Bianconi
2026-11-25 14:48 ` [PATCH net-next v13 4/5] net: xdp: add __xdp_return_buff() helper Lorenzo Bianconi
` (2 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Lorenzo Bianconi @ 2026-11-25 14:48 UTC (permalink / raw)
To: Maxime Chevallier, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Alexandre Torgue,
Alexei Starovoitov, Daniel Borkmann, Jesper Dangaard Brouer,
John Fastabend, Stanislav Fomichev, Jose Abreu, Ong Boon Leong,
Simon Horman, Andrii Nakryiko, Eduard Zingerman,
Kumar Kartikeya Dwivedi, Martin KaFai Lau, Song Liu,
Yonghong Song, Jiri Olsa, Emil Tsalapatis, Ihor Solodrai,
Matthew Gerlach, Boon Khai Ng
Cc: netdev, linux-arm-kernel, bpf, Lorenzo Bianconi
Move the XDP tail-shrink logic out of bpf_xdp_adjust_tail() into
net/core/xdp.c so it can be shared with drivers. The frag helpers
(bpf_xdp_shrink_data_zc(), bpf_xdp_shrink_data() and
bpf_xdp_frags_shrink_tail()) move along with it and are renamed to
xdp_buff_shrink_data_zc(), xdp_buff_shrink_data() and
xdp_frags_shrink_tail().
Add xdp_buff_shrink_tail(), which handles the linear case too and is
exported with EXPORT_SYMBOL_GPL() for driver use. Unlike
bpf_xdp_adjust_tail(), it takes the number of bytes to remove as a
positive value; bpf_xdp_adjust_tail() keeps its signed offset ABI and
passes -offset for the shrink case. Negative offsets are rejected.
bpf_xdp_pull_data() keeps using the frag helper under its new name.
Behavior for valid offsets is unchanged.
This lets stmmac use the common helper to strip the Ethernet FCS from
the xdp_buff it accumulates for a multi-descriptor frame.
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
---
include/net/xdp.h | 3 ++
net/core/filter.c | 80 +++----------------------------------------------
net/core/xdp.c | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 96 insertions(+), 76 deletions(-)
diff --git a/include/net/xdp.h b/include/net/xdp.h
index 07231adfb5f8..02289028044c 100644
--- a/include/net/xdp.h
+++ b/include/net/xdp.h
@@ -388,6 +388,9 @@ struct sk_buff *__xdp_build_skb_from_frame(struct xdp_frame *xdpf,
struct sk_buff *xdp_build_skb_from_frame(struct xdp_frame *xdpf,
struct net_device *dev);
struct xdp_frame *xdpf_clone(struct xdp_frame *xdpf);
+int xdp_buff_shrink_tail(struct xdp_buff *xdp, int offset);
+bool xdp_buff_shrink_data(struct xdp_buff *xdp, skb_frag_t *frag,
+ int shrink, bool tail);
static inline
void xdp_convert_frame_to_buff(const struct xdp_frame *frame,
diff --git a/net/core/filter.c b/net/core/filter.c
index f42ecfb5841f..cdbb54a10b0b 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -4438,88 +4438,16 @@ static int bpf_xdp_frags_increase_tail(struct xdp_buff *xdp, int offset)
return 0;
}
-static struct xdp_buff *bpf_xdp_shrink_data_zc(struct xdp_buff *xdp, int shrink,
- bool tail, bool release)
-{
- struct xdp_buff *zc_frag = tail ? xsk_buff_get_tail(xdp) :
- xsk_buff_get_head(xdp);
-
- if (release) {
- xsk_buff_del_frag(zc_frag);
- } else {
- if (tail)
- zc_frag->data_end -= shrink;
- else
- zc_frag->data += shrink;
- }
-
- return zc_frag;
-}
-
-static bool bpf_xdp_shrink_data(struct xdp_buff *xdp, skb_frag_t *frag,
- int shrink, bool tail)
-{
- enum xdp_mem_type mem_type = xdp->rxq->mem.type;
- bool release = skb_frag_size(frag) == shrink;
- netmem_ref netmem = skb_frag_netmem(frag);
- struct xdp_buff *zc_frag = NULL;
-
- if (mem_type == MEM_TYPE_XSK_BUFF_POOL) {
- netmem = 0;
- zc_frag = bpf_xdp_shrink_data_zc(xdp, shrink, tail, release);
- }
-
- if (release) {
- __xdp_return(netmem, mem_type, false, zc_frag);
- } else {
- if (!tail)
- skb_frag_off_add(frag, shrink);
- skb_frag_size_sub(frag, shrink);
- }
-
- return release;
-}
-
-static int bpf_xdp_frags_shrink_tail(struct xdp_buff *xdp, int offset)
-{
- struct skb_shared_info *sinfo = xdp_get_shared_info_from_buff(xdp);
- int i, n_frags_free = 0, len_free = 0;
-
- if (unlikely(offset > (int)xdp_get_buff_len(xdp) - ETH_HLEN))
- return -EINVAL;
-
- for (i = sinfo->nr_frags - 1; i >= 0 && offset > 0; i--) {
- skb_frag_t *frag = &sinfo->frags[i];
- int shrink = min_t(int, offset, skb_frag_size(frag));
-
- len_free += shrink;
- offset -= shrink;
- if (bpf_xdp_shrink_data(xdp, frag, shrink, true))
- n_frags_free++;
- }
- sinfo->nr_frags -= n_frags_free;
- sinfo->xdp_frags_size -= len_free;
-
- if (unlikely(!sinfo->nr_frags)) {
- xdp_buff_clear_frags_flag(xdp);
- xdp_buff_clear_frag_pfmemalloc(xdp);
- xdp->data_end -= offset;
- }
-
- return 0;
-}
-
BPF_CALL_2(bpf_xdp_adjust_tail, struct xdp_buff *, xdp, int, offset)
{
void *data_hard_end = xdp_data_hard_end(xdp); /* use xdp->frame_sz */
void *data_end = xdp->data_end + offset;
- if (unlikely(xdp_buff_has_frags(xdp))) { /* non-linear xdp buff */
- if (offset < 0)
- return bpf_xdp_frags_shrink_tail(xdp, -offset);
+ if (offset < 0)
+ return xdp_buff_shrink_tail(xdp, -offset);
+ if (unlikely(xdp_buff_has_frags(xdp))) /* non-linear xdp buff */
return bpf_xdp_frags_increase_tail(xdp, offset);
- }
/* Notice that xdp_data_hard_end have reserved some tailroom */
if (unlikely(data_end > data_hard_end))
@@ -12840,7 +12768,7 @@ __bpf_kfunc int bpf_xdp_pull_data(struct xdp_md *x, u32 len)
xdp->data_end += shrink;
sinfo->xdp_frags_size -= shrink;
delta -= shrink;
- if (bpf_xdp_shrink_data(xdp, frag, shrink, false))
+ if (xdp_buff_shrink_data(xdp, frag, shrink, false))
n_frags_free++;
}
diff --git a/net/core/xdp.c b/net/core/xdp.c
index 1d679e8fd649..055931263413 100644
--- a/net/core/xdp.c
+++ b/net/core/xdp.c
@@ -673,6 +673,95 @@ struct sk_buff *xdp_build_skb_from_buff(const struct xdp_buff *xdp)
}
EXPORT_SYMBOL_GPL(xdp_build_skb_from_buff);
+static struct xdp_buff *xdp_buff_shrink_data_zc(struct xdp_buff *xdp,
+ int shrink, bool tail,
+ bool release)
+{
+ struct xdp_buff *zc_frag = tail ? xsk_buff_get_tail(xdp) :
+ xsk_buff_get_head(xdp);
+
+ if (release) {
+ xsk_buff_del_frag(zc_frag);
+ } else {
+ if (tail)
+ zc_frag->data_end -= shrink;
+ else
+ zc_frag->data += shrink;
+ }
+
+ return zc_frag;
+}
+
+bool xdp_buff_shrink_data(struct xdp_buff *xdp, skb_frag_t *frag,
+ int shrink, bool tail)
+{
+ enum xdp_mem_type mem_type = xdp->rxq->mem.type;
+ bool release = skb_frag_size(frag) == shrink;
+ netmem_ref netmem = skb_frag_netmem(frag);
+ struct xdp_buff *zc_frag = NULL;
+
+ if (mem_type == MEM_TYPE_XSK_BUFF_POOL) {
+ netmem = 0;
+ zc_frag = xdp_buff_shrink_data_zc(xdp, shrink, tail, release);
+ }
+
+ if (release) {
+ __xdp_return(netmem, mem_type, false, zc_frag);
+ } else {
+ if (!tail)
+ skb_frag_off_add(frag, shrink);
+ skb_frag_size_sub(frag, shrink);
+ }
+
+ return release;
+}
+
+static int xdp_frags_shrink_tail(struct xdp_buff *xdp, int offset)
+{
+ struct skb_shared_info *sinfo = xdp_get_shared_info_from_buff(xdp);
+ int i, n_frags_free = 0, len_free = 0;
+
+ if (unlikely(offset > (int)xdp_get_buff_len(xdp) - ETH_HLEN))
+ return -EINVAL;
+
+ for (i = sinfo->nr_frags - 1; i >= 0 && offset > 0; i--) {
+ skb_frag_t *frag = &sinfo->frags[i];
+ int shrink = min_t(int, offset, skb_frag_size(frag));
+
+ len_free += shrink;
+ offset -= shrink;
+ if (xdp_buff_shrink_data(xdp, frag, shrink, true))
+ n_frags_free++;
+ }
+ sinfo->nr_frags -= n_frags_free;
+ sinfo->xdp_frags_size -= len_free;
+
+ if (unlikely(!sinfo->nr_frags)) {
+ xdp_buff_clear_frags_flag(xdp);
+ xdp_buff_clear_frag_pfmemalloc(xdp);
+ xdp->data_end -= offset;
+ }
+
+ return 0;
+}
+
+int xdp_buff_shrink_tail(struct xdp_buff *xdp, int offset)
+{
+ if (unlikely(offset < 0))
+ return -EINVAL;
+
+ if (unlikely(xdp_buff_has_frags(xdp))) /* non-linear xdp buff */
+ return xdp_frags_shrink_tail(xdp, offset);
+
+ if (unlikely(offset > xdp->data_end - xdp->data - ETH_HLEN))
+ return -EINVAL;
+
+ xdp->data_end = xdp->data_end - offset;
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(xdp_buff_shrink_tail);
+
/**
* xdp_copy_frags_from_zc - copy frags from XSk buff to skb
* @skb: skb to copy frags to
--
2.56.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH net-next v13 4/5] net: xdp: add __xdp_return_buff() helper
2026-11-25 14:48 [PATCH net-next v13 0/5] net: stmmac: introduce XDP rx multi-buff support Lorenzo Bianconi
` (2 preceding siblings ...)
2026-11-25 14:48 ` [PATCH net-next v13 3/5] net: xdp: add xdp_buff_shrink_tail() helper Lorenzo Bianconi
@ 2026-11-25 14:48 ` Lorenzo Bianconi
2026-11-25 14:48 ` [PATCH net-next v13 5/5] net: stmmac: rework stmmac_rx to support XDP rx multi-buff Lorenzo Bianconi
2026-11-25 14:53 ` [PATCH net-next v13 0/5] net: stmmac: introduce XDP rx multi-buff support netdev-bot+sinfo
5 siblings, 0 replies; 10+ messages in thread
From: Lorenzo Bianconi @ 2026-11-25 14:48 UTC (permalink / raw)
To: Maxime Chevallier, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Alexandre Torgue,
Alexei Starovoitov, Daniel Borkmann, Jesper Dangaard Brouer,
John Fastabend, Stanislav Fomichev, Jose Abreu, Ong Boon Leong,
Simon Horman, Andrii Nakryiko, Eduard Zingerman,
Kumar Kartikeya Dwivedi, Martin KaFai Lau, Song Liu,
Yonghong Song, Jiri Olsa, Emil Tsalapatis, Ihor Solodrai,
Matthew Gerlach, Boon Khai Ng
Cc: netdev, linux-arm-kernel, bpf, Lorenzo Bianconi
xdp_return_buff() always releases the fragments and the head with
napi_direct = true, which is only valid when the caller runs in the NAPI
context that owns the page pool. Drivers also need to release an
xdp_buff while tearing down or resetting a queue, where NAPI is not
running and direct recycling must be disabled.
Split the implementation into __xdp_return_buff(), which takes the
napi_direct argument and is exported for drivers, and keep
xdp_return_buff() as an inline wrapper that passes true, preserving the
behavior of the existing callers.
This lets stmmac use the common helper with napi_direct = false on the
teardown paths.
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
---
include/net/xdp.h | 7 ++++++-
net/core/xdp.c | 9 +++++----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/include/net/xdp.h b/include/net/xdp.h
index 02289028044c..f0946500c487 100644
--- a/include/net/xdp.h
+++ b/include/net/xdp.h
@@ -457,7 +457,12 @@ void __xdp_return(netmem_ref netmem, enum xdp_mem_type mem_type,
bool napi_direct, struct xdp_buff *xdp);
void xdp_return_frame(struct xdp_frame *xdpf);
void xdp_return_frame_rx_napi(struct xdp_frame *xdpf);
-void xdp_return_buff(struct xdp_buff *xdp);
+void __xdp_return_buff(struct xdp_buff *xdp, bool napi_direct);
+static inline void xdp_return_buff(struct xdp_buff *xdp)
+{
+ __xdp_return_buff(xdp, true);
+}
+
void xdp_return_frame_bulk(struct xdp_frame *xdpf,
struct xdp_frame_bulk *bq);
diff --git a/net/core/xdp.c b/net/core/xdp.c
index 055931263413..f35ae7e118f5 100644
--- a/net/core/xdp.c
+++ b/net/core/xdp.c
@@ -546,7 +546,7 @@ void xdp_return_frag(netmem_ref netmem, const struct xdp_buff *xdp)
}
EXPORT_SYMBOL_GPL(xdp_return_frag);
-void xdp_return_buff(struct xdp_buff *xdp)
+void __xdp_return_buff(struct xdp_buff *xdp, bool napi_direct)
{
struct skb_shared_info *sinfo;
@@ -556,12 +556,13 @@ void xdp_return_buff(struct xdp_buff *xdp)
sinfo = xdp_get_shared_info_from_buff(xdp);
for (u32 i = 0; i < sinfo->nr_frags; i++)
__xdp_return(skb_frag_netmem(&sinfo->frags[i]),
- xdp->rxq->mem.type, true, xdp);
+ xdp->rxq->mem.type, napi_direct, xdp);
out:
- __xdp_return(virt_to_netmem(xdp->data), xdp->rxq->mem.type, true, xdp);
+ __xdp_return(virt_to_netmem(xdp->data), xdp->rxq->mem.type,
+ napi_direct, xdp);
}
-EXPORT_SYMBOL_GPL(xdp_return_buff);
+EXPORT_SYMBOL_GPL(__xdp_return_buff);
void xdp_attachment_setup(struct xdp_attachment_info *info,
struct netdev_bpf *bpf)
--
2.56.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH net-next v13 5/5] net: stmmac: rework stmmac_rx to support XDP rx multi-buff
2026-11-25 14:48 [PATCH net-next v13 0/5] net: stmmac: introduce XDP rx multi-buff support Lorenzo Bianconi
` (3 preceding siblings ...)
2026-11-25 14:48 ` [PATCH net-next v13 4/5] net: xdp: add __xdp_return_buff() helper Lorenzo Bianconi
@ 2026-11-25 14:48 ` Lorenzo Bianconi
2026-11-26 14:50 ` netdev-bot+sashiko
2026-11-25 14:53 ` [PATCH net-next v13 0/5] net: stmmac: introduce XDP rx multi-buff support netdev-bot+sinfo
5 siblings, 1 reply; 10+ messages in thread
From: Lorenzo Bianconi @ 2026-11-25 14:48 UTC (permalink / raw)
To: Maxime Chevallier, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Alexandre Torgue,
Alexei Starovoitov, Daniel Borkmann, Jesper Dangaard Brouer,
John Fastabend, Stanislav Fomichev, Jose Abreu, Ong Boon Leong,
Simon Horman, Andrii Nakryiko, Eduard Zingerman,
Kumar Kartikeya Dwivedi, Martin KaFai Lau, Song Liu,
Yonghong Song, Jiri Olsa, Emil Tsalapatis, Ihor Solodrai,
Matthew Gerlach, Boon Khai Ng
Cc: netdev, linux-arm-kernel, bpf, Nicolai Buchwitz, Lorenzo Bianconi
An earlier commit dropped frames split across multiple descriptors, or
using a second buffer, while XDP was enabled. This prevented the
per-descriptor XDP path from re-parsing frame tails and from applying FCS
handling to truncated buffers.
Rework stmmac_rx() to accumulate all the descriptors that make up a frame
in an xdp_buff, so the XDP program runs on the full (possibly fragmented)
packet instead of just the first buffer. Frames split across descriptors
or buffers are now passed to programs loaded with BPF_F_XDP_HAS_FRAGS;
programs without that capability continue to drop fragmented frames. When
the frame is not consumed by the program, assemble the skb from the head
buffer and the collected fragments with xdp_build_skb_from_buff().
Note that XDP still rejects an MTU larger than ETH_DATA_LEN
(stmmac_xdp_set_prog(), stmmac_change_mtu()) and disables SPH, so an
ordinary frame fits in a single buffer. This path is therefore exercised
by frames that do span several descriptors (for example jumbo frames the
MAC admits through its jumbo-enable bit) and is groundwork for extending
XDP to jumbo/SPH; it does not enable XDP jumbo support by itself.
For the same reason, NETDEV_XDP_ACT_RX_SG is not advertised yet, so
userspace does not attempt multi-buffer XDP setups that the MTU and
program checks above would reject.
To do so, store the in-progress xdp_buff in rx_q->state instead of the
partially built skb, so the accumulated head and fragments survive a NAPI
poll boundary (mid-frame dma_own or dirty_rx break). The state is saved
only while a frame is in progress and cleared once it completes, leaving
it untouched when the poll does not process anything (e.g. netpoll invoked
with a zero budget).
In addition:
- register the xdp_rxq with the fragment allocation size, so
bpf_xdp_adjust_tail() can grow the tail of fragmented frames;
- build the skb with xdp_build_skb_from_buff(), which passes
xdp->frame_sz to napi_build_skb(), so skb_shinfo() lands on the same
shared_info the fragments were accumulated into. xdp->frame_sz is the
page_pool order-N allocation size (PAGE_SIZE << order, with
order_base_2() rounding num_pages up), so the head truesize grows from
num_pages * PAGE_SIZE: on 4K pages 12K -> 16K for an 8K buffer and
20K -> 32K for a 16K buffer. This is more accurate but also affects
non-XDP traffic and reduces the effective socket receive buffer for
jumbo MTU users;
- carry the XDP metadata written with bpf_xdp_adjust_meta() into the skb
from the accumulated xdp_buff via skb_metadata_set(), preserving the
existing linear PASS path behavior and extending it to fragmented frames,
so TC/BPF programs can read it through data_meta;
- attach fragments with xdp_buff_add_frag(), which initializes all the
shared_info fields and takes care of the pfmemalloc bit;
- charge fragments the whole page_pool page size (xdp->frame_sz) as
truesize instead of the old dma_buf_sz; with SPH/buf2 most frames carry
a fragment, so skb->truesize grows by roughly 1.5x on 4K pages and 2x on
64K pages, which reduces the effective socket receive buffer. The new
value is more accurate now that a fragment is a full page_pool page, but
it is a behavior change;
- release the buffers collected in the xdp_buff with __xdp_return_buff()
when a frame is dropped on RX errors, instead of relying on
dev_kfree_skb() recycling the skb frags; the latter no longer applies
now that the head and fragments live in an xdp_buff rather than a
partially built skb;
- drop the whole frame when it would exceed MAX_SKB_FRAGS, where the
previous skb_add_rx_frag() calls were unbounded;
- strip the Ethernet FCS from the accumulated xdp_buff with the common
xdp_buff_shrink_tail() helper for both linear and fragmented frames,
instead of trimming the skb or the first descriptor length.
Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de>
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac.h | 3 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 230 ++++++++++------------
2 files changed, 108 insertions(+), 125 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
index fa9ef4212982..d77e442249ab 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
@@ -133,7 +133,8 @@ struct stmmac_rx_queue {
dma_addr_t dma_rx_phy;
unsigned int state_saved;
struct {
- struct sk_buff *skb;
+ struct xdp_buff xdp;
+ unsigned int n_descs;
unsigned int len;
unsigned int error;
} state;
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 7896364c43e9..56355d80ba16 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2195,8 +2195,10 @@ static void __free_dma_rx_desc_resources(struct stmmac_priv *priv,
else
dma_free_rx_skbufs(priv, dma_conf, queue);
- dev_kfree_skb_any(rx_q->state.skb);
- rx_q->state.skb = NULL;
+ if (rx_q->state.n_descs && !rx_q->xsk_pool) {
+ __xdp_return_buff(&rx_q->state.xdp, false);
+ rx_q->state.n_descs = 0;
+ }
rx_q->state_saved = false;
rx_q->buf_alloc_num = 0;
rx_q->xsk_pool = NULL;
@@ -2316,10 +2318,6 @@ static int __alloc_dma_rx_desc_resources(struct stmmac_priv *priv,
SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
num_pages = DIV_ROUND_UP(dma_buf_sz_pad, PAGE_SIZE);
- rx_q->queue_index = queue;
- rx_q->priv_data = priv;
- rx_q->napi_skb_frag_size = num_pages * PAGE_SIZE;
-
pp_params.flags = PP_FLAG_DMA_MAP | PP_FLAG_DMA_SYNC_DEV;
pp_params.pool_size = dma_conf->dma_rx_size;
pp_params.order = order_base_2(num_pages);
@@ -2351,6 +2349,10 @@ static int __alloc_dma_rx_desc_resources(struct stmmac_priv *priv,
goto err_free_buf_pool;
}
+ rx_q->queue_index = queue;
+ rx_q->priv_data = priv;
+ rx_q->napi_skb_frag_size = PAGE_SIZE << pp_params.order;
+
if (priv->extend_desc)
rx_q->dma_erx = addr;
else
@@ -2362,7 +2364,8 @@ static int __alloc_dma_rx_desc_resources(struct stmmac_priv *priv,
else
napi_id = ch->rx_napi.napi_id;
- ret = xdp_rxq_info_reg(&rx_q->xdp_rxq, priv->dev, queue, napi_id);
+ ret = __xdp_rxq_info_reg(&rx_q->xdp_rxq, priv->dev, queue, napi_id,
+ rx_q->napi_skb_frag_size);
if (ret) {
netdev_err(priv->dev, "Failed to register xdp rxq info\n");
goto err_free_dma;
@@ -5534,8 +5537,8 @@ static int __stmmac_xdp_run_prog(struct stmmac_priv *priv,
static struct sk_buff *stmmac_xdp_run_prog(struct stmmac_priv *priv,
struct xdp_buff *xdp)
{
+ int res = STMMAC_XDP_CONSUMED;
struct bpf_prog *prog;
- int res;
prog = READ_ONCE(priv->xdp_prog);
if (!prog) {
@@ -5543,7 +5546,8 @@ static struct sk_buff *stmmac_xdp_run_prog(struct stmmac_priv *priv,
goto out;
}
- res = __stmmac_xdp_run_prog(priv, prog, xdp);
+ if (likely(!xdp_buff_has_frags(xdp) || prog->aux->xdp_has_frags))
+ res = __stmmac_xdp_run_prog(priv, prog, xdp);
out:
return ERR_PTR(-res);
}
@@ -5873,6 +5877,25 @@ static int stmmac_rx_zc(struct stmmac_priv *priv, int limit, u32 queue)
return failure ? limit : (int)count;
}
+static bool stmmac_build_xdp_frags(struct stmmac_priv *priv,
+ struct stmmac_rx_queue *rx_q,
+ unsigned int len, struct page *page,
+ unsigned int offset,
+ enum dma_data_direction dma_dir,
+ struct xdp_buff *xdp)
+{
+ dma_addr_t dma_addr = page_pool_get_dma_addr(page) + offset;
+
+ dma_sync_single_for_cpu(priv->device, dma_addr, len, dma_dir);
+ if (!xdp_buff_add_frag(xdp, page_to_netmem(page), offset, len,
+ xdp->frame_sz)) {
+ page_pool_put_full_page(rx_q->page_pool, page, true);
+ return false;
+ }
+
+ return true;
+}
+
/**
* stmmac_rx - manage the receive process
* @priv: driver private structure
@@ -5886,21 +5909,20 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
u32 rx_errors = 0, rx_dropped = 0, rx_bytes = 0, rx_packets = 0;
struct stmmac_rxq_stats *rxq_stats = &priv->xstats.rxq_stats[queue];
struct stmmac_rx_queue *rx_q = &priv->dma_conf.rx_queue[queue];
+ unsigned int n_descs = 0, next_entry = rx_q->cur_rx;
struct stmmac_channel *ch = &priv->channel[queue];
unsigned int count = 0, error = 0, len = 0;
- unsigned int next_entry = rx_q->cur_rx;
bool in_progress = rx_q->state_saved;
enum dma_data_direction dma_dir;
int coe = priv->hw->rx_csum;
- unsigned int desc_size;
- struct sk_buff *skb = NULL;
struct stmmac_xdp_buff ctx;
- bool fcs_stripped = false;
+ unsigned int desc_size;
int xdp_status = 0;
int bufsz;
dma_dir = page_pool_get_dma_dir(rx_q->page_pool);
- bufsz = DIV_ROUND_UP(priv->dma_conf.dma_buf_sz, PAGE_SIZE) * PAGE_SIZE;
+ bufsz = rx_q->napi_skb_frag_size;
+ ctx.priv = priv;
if (netif_msg_rx_status(priv)) {
void *rx_head = stmmac_get_rx_desc(priv, rx_q, 0);
@@ -5913,11 +5935,12 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
}
if (rx_q->state_saved) {
- skb = rx_q->state.skb;
+ ctx.xdp = rx_q->state.xdp;
error = rx_q->state.error;
+ n_descs = rx_q->state.n_descs;
len = rx_q->state.len;
- rx_q->state.skb = NULL;
rx_q->state_saved = false;
+ rx_q->state.n_descs = 0;
}
while (count < limit) {
@@ -5925,11 +5948,11 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
enum pkt_hash_types hash_type;
struct stmmac_rx_buffer *buf;
struct dma_desc *np, *p;
+ struct sk_buff *skb;
int entry, status;
u32 hash;
if (!in_progress) {
- skb = NULL;
error = 0;
len = 0;
}
@@ -5977,19 +6000,11 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
rx_errors++;
}
- /* We do not support SG in XDP mode */
- if (unlikely(!error && (status & rx_not_ls) &&
- stmmac_xdp_is_enabled(priv))) {
- rx_dropped++;
- error = 1;
- }
-
if (unlikely(error)) {
if (status & rx_not_ls)
goto read_again;
- dev_kfree_skb(skb);
- goto next;
+ goto error_free_frag;
}
/* Buffer is good. Go on. */
@@ -5999,120 +6014,79 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
buf2_len = stmmac_rx_buf2_len(priv, p, status, len);
len += buf2_len;
- /* Drop the packet if it is split over buf1 and buf2 on a
- * single descriptor if the interface is running in XDP mode.
- */
- if (unlikely(stmmac_xdp_is_enabled(priv) && buf2_len)) {
- rx_dropped++;
- goto next;
- }
-
- /* ACS is disabled; strip manually. */
- if (likely(!(status & rx_not_ls)))
- len -= ETH_FCS_LEN;
-
- if (!skb) {
- /* Each frame starts here: reset the FCS handling */
- fcs_stripped = false;
-
+ if (!n_descs) {
dma_sync_single_for_cpu(priv->device, buf->addr,
buf1_len, dma_dir);
net_prefetch(page_address(buf->page) +
buf->page_offset);
- if (stmmac_xdp_is_enabled(priv) && !buf2_len) {
- buf1_len -= ETH_FCS_LEN;
- fcs_stripped = true;
- }
-
xdp_init_buff(&ctx.xdp, bufsz, &rx_q->xdp_rxq);
xdp_prepare_buff(&ctx.xdp, page_address(buf->page),
buf->page_offset, buf1_len, true);
-
- ctx.priv = priv;
- ctx.desc = p;
- ctx.ndesc = np;
-
- skb = stmmac_xdp_run_prog(priv, &ctx.xdp);
- /* For Not XDP_PASS verdict */
- if (IS_ERR(skb)) {
- unsigned int xdp_res = -PTR_ERR(skb);
-
- if (xdp_res & STMMAC_XDP_CONSUMED) {
- page_pool_recycle_direct(rx_q->page_pool,
- virt_to_head_page(ctx.xdp.data));
- buf->page = NULL;
+ buf->page = NULL;
+ } else if (buf1_len) {
+ if (!stmmac_build_xdp_frags(priv, rx_q, buf1_len,
+ buf->page,
+ buf->page_offset,
+ dma_dir, &ctx.xdp)) {
+ if (!error)
rx_dropped++;
- goto next;
- } else if (xdp_res & (STMMAC_XDP_TX |
- STMMAC_XDP_REDIRECT)) {
- xdp_status |= xdp_res;
- buf->page = NULL;
- goto next;
- }
- }
- }
-
- if (!skb) {
- unsigned int metasize;
-
- /* XDP program may expand or reduce tail */
- buf1_len = ctx.xdp.data_end - ctx.xdp.data;
-
- skb = napi_build_skb(page_address(buf->page),
- rx_q->napi_skb_frag_size);
- if (!skb) {
- page_pool_recycle_direct(rx_q->page_pool,
- buf->page);
- buf->page = NULL;
- rx_dropped++;
error = 1;
- goto drain_data;
}
-
- /* XDP program may adjust header */
- skb_reserve(skb,
- ctx.xdp.data - ctx.xdp.data_hard_start);
- skb_put(skb, buf1_len);
- skb_mark_for_recycle(skb);
-
- metasize = ctx.xdp.data - ctx.xdp.data_meta;
- if (metasize)
- skb_metadata_set(skb, metasize);
- buf->page = NULL;
- } else if (buf1_len) {
- dma_sync_single_for_cpu(priv->device, buf->addr,
- buf1_len, dma_dir);
- skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
- buf->page, buf->page_offset, buf1_len,
- priv->dma_conf.dma_buf_sz);
buf->page = NULL;
}
if (buf2_len) {
- dma_sync_single_for_cpu(priv->device, buf->sec_addr,
- buf2_len, dma_dir);
- skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
- buf->sec_page, 0, buf2_len,
- priv->dma_conf.dma_buf_sz);
+ if (!stmmac_build_xdp_frags(priv, rx_q, buf2_len,
+ buf->sec_page, 0,
+ dma_dir, &ctx.xdp)) {
+ if (!error)
+ rx_dropped++;
+ error = 1;
+ }
buf->sec_page = NULL;
}
+ n_descs++;
-drain_data:
if (likely(status & rx_not_ls))
goto read_again;
- if (!skb)
- goto next;
- /* Got entire packet into SKB. Finish it. */
+ /* ACS is disabled; strip manually. */
+ len -= ETH_FCS_LEN;
+ if (xdp_buff_shrink_tail(&ctx.xdp, ETH_FCS_LEN)) {
+ if (!error)
+ rx_dropped++;
+ error = 1;
+ }
- /* Remove FCS if needed */
- if (!fcs_stripped && pskb_trim(skb, len)) {
- dev_kfree_skb_any(skb);
- rx_dropped++;
+ if (unlikely(error))
+ goto error_free_frag;
+
+ ctx.desc = p;
+ ctx.ndesc = np;
+
+ skb = stmmac_xdp_run_prog(priv, &ctx.xdp);
+ /* For Not XDP_PASS verdict */
+ if (IS_ERR(skb)) {
+ unsigned int xdp_res = -PTR_ERR(skb);
+
+ if (xdp_res & STMMAC_XDP_CONSUMED) {
+ __xdp_return_buff(&ctx.xdp, true);
+ rx_dropped++;
+ } else if (xdp_res & (STMMAC_XDP_TX |
+ STMMAC_XDP_REDIRECT)) {
+ xdp_status |= xdp_res;
+ }
goto next;
}
+ skb = xdp_build_skb_from_buff(&ctx.xdp);
+ if (!skb) {
+ rx_dropped++;
+ goto error_free_frag;
+ }
+
+ /* Got entire packet into SKB. Finish it. */
stmmac_get_rx_hwtstamp(priv, p, np, skb);
if (priv->hw->hw_vlan_en) {
@@ -6120,8 +6094,6 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
stmmac_rx_hw_vlan(priv, priv->hw, p, skb);
}
- skb->protocol = eth_type_trans(skb, priv->dev);
-
if (unlikely(!coe) ||
!stmmac_has_ip_ethertype(priv, skb, false) ||
(status & csum_none))
@@ -6132,21 +6104,28 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
if (!stmmac_get_rx_hash(priv, p, &hash, &hash_type))
skb_set_hash(skb, hash, hash_type);
- skb_record_rx_queue(skb, queue);
napi_gro_receive(&ch->rx_napi, skb);
rx_packets++;
rx_bytes += len;
next:
in_progress = false;
- skb = NULL;
+ n_descs = 0;
+ count++;
+ continue;
+error_free_frag:
+ if (n_descs)
+ __xdp_return_buff(&ctx.xdp, true);
+ in_progress = false;
+ n_descs = 0;
count++;
}
- if (in_progress || skb) {
- rx_q->state_saved = true;
- rx_q->state.skb = skb;
+ if (in_progress || n_descs) {
+ rx_q->state.xdp = ctx.xdp;
+ rx_q->state.n_descs = n_descs;
rx_q->state.error = error;
rx_q->state.len = len;
+ rx_q->state_saved = true;
}
stmmac_finalize_xdp_rx(priv, xdp_status);
@@ -8519,9 +8498,12 @@ static void stmmac_reset_rx_queue(struct stmmac_priv *priv, u32 queue)
{
struct stmmac_rx_queue *rx_q = &priv->dma_conf.rx_queue[queue];
- dev_kfree_skb_any(rx_q->state.skb);
- rx_q->state.skb = NULL;
+ if (rx_q->state.n_descs && !rx_q->xsk_pool) {
+ __xdp_return_buff(&rx_q->state.xdp, false);
+ rx_q->state.n_descs = 0;
+ }
rx_q->state_saved = false;
+
rx_q->cur_rx = 0;
rx_q->dirty_rx = 0;
}
--
2.56.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH net-next v13 5/5] net: stmmac: rework stmmac_rx to support XDP rx multi-buff
2026-11-25 14:48 ` [PATCH net-next v13 5/5] net: stmmac: rework stmmac_rx to support XDP rx multi-buff Lorenzo Bianconi
@ 2026-11-26 14:50 ` netdev-bot+sashiko
0 siblings, 0 replies; 10+ messages in thread
From: netdev-bot+sashiko @ 2026-11-26 14:50 UTC (permalink / raw)
To: lorenzo.bianconi
Cc: maxime.chevallier, andrew+netdev, davem, edumazet, kuba, pabeni,
mcoquelin.stm32, alexandre.torgue, ast, daniel, hawk,
john.fastabend, sdf, Jose.Abreu, boon.leong.ong, horms, andrii,
eddyz87, memxor, martin.lau, song, yonghong.song, jolsa, emil,
ihor.solodrai, matthew.gerlach, boon.khai.ng, netdev,
linux-arm-kernel, bpf, nb
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] In stmmac_rx()
(drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6056), the FCS is…
Pre-existing issues:
- [High] This problem wasn't introduced by this patch, but the patch
extends it.
--
net: stmmac: rework stmmac_rx to support XDP rx multi-buff
This reworks stmmac_rx() to collect all the descriptors of a frame in an
xdp_buff. XDP programs loaded with BPF_F_XDP_HAS_FRAGS now see the whole
fragmented packet, and the skb is built with xdp_build_skb_from_buff().
The in-progress xdp_buff is saved in rx_q->state across NAPI polls, and
the FCS is stripped with xdp_buff_shrink_tail().
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 7896364c43e95..56355d80ba161 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
[ ... ]
> @@ -5999,120 +6014,79 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
[ ... ]
> + n_descs++;
>
> -drain_data:
> if (likely(status & rx_not_ls))
> goto read_again;
> - if (!skb)
> - goto next;
>
> - /* Got entire packet into SKB. Finish it. */
> + /* ACS is disabled; strip manually. */
> + len -= ETH_FCS_LEN;
> + if (xdp_buff_shrink_tail(&ctx.xdp, ETH_FCS_LEN)) {
> + if (!error)
> + rx_dropped++;
> + error = 1;
> + }
[Severity: Low]
Is skb->truesize overstated when a frame spans several buffers and the
last buffer holds only FCS bytes (1 to 4 bytes)?
For a fragmented xdp_buff, xdp_buff_shrink_tail() calls
xdp_frags_shrink_tail(). That function returns the FCS-only page to the
pool through xdp_buff_shrink_data(), but it only adjusts nr_frags and
xdp_frags_size:
net/core/xdp.c:xdp_frags_shrink_tail() {
...
sinfo->nr_frags -= n_frags_free;
sinfo->xdp_frags_size -= len_free;
...
}
sinfo->xdp_frags_truesize still counts the xdp->frame_sz that
stmmac_build_xdp_frags() charged for that page through
xdp_buff_add_frag(). If at least one fragment is left,
xdp_build_skb_from_buff() uses that value unchanged:
net/core/xdp.c:xdp_build_skb_from_buff() {
...
tsize = sinfo->xdp_frags_truesize ? : nr_frags * xdp->frame_sz;
...
}
As a result, skb->truesize includes a full page_pool allocation
(PAGE_SIZE << order) for a page that has already been released.
In the common case the old code fixed this up. pskb_trim(), removed
below, went through ___pskb_trim()->skb_condense() (skb->sk is NULL on
RX), which pulled small leftover frags into the head and recomputed
truesize.
The commit message says the new truesize "is more accurate". Does that
hold for this case?
>
> - /* Remove FCS if needed */
> - if (!fcs_stripped && pskb_trim(skb, len)) {
> - dev_kfree_skb_any(skb);
> - rx_dropped++;
> + if (unlikely(error))
> + goto error_free_frag;
> +
> + ctx.desc = p;
> + ctx.ndesc = np;
> +
> + skb = stmmac_xdp_run_prog(priv, &ctx.xdp);
> + /* For Not XDP_PASS verdict */
> + if (IS_ERR(skb)) {
> + unsigned int xdp_res = -PTR_ERR(skb);
> +
> + if (xdp_res & STMMAC_XDP_CONSUMED) {
> + __xdp_return_buff(&ctx.xdp, true);
> + rx_dropped++;
> + } else if (xdp_res & (STMMAC_XDP_TX |
> + STMMAC_XDP_REDIRECT)) {
> + xdp_status |= xdp_res;
> + }
> goto next;
> }
[Severity: High]
This issue was not introduced by this patch, but the patch makes it
wider. With the stmmac_xdp_run_prog() change, programs with
xdp_has_frags can now return XDP_TX on fragmented buffs. Is the direct
recycling done when the TX completes safe here?
stmmac_tx_clean() returns XDP_TX frames like this:
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:stmmac_tx_clean() {
...
if (xdpf &&
tx_q->tx_skbuff_dma[entry].buf_type == STMMAC_TXBUF_T_XDP_TX) {
xdp_return_frame_rx_napi(xdpf);
...
}
xdp_return_frame_rx_napi() calls __xdp_return() with napi_direct set to
true. That path ends in page_pool_recycle_in_cache(), which writes
pool->alloc.cache[pool->alloc.count++] with no locking.
stmmac_tx_clean() runs from stmmac_napi_poll_tx() on ch->tx_napi. That
is not the ch->rx_napi which owns and refills rx_q->page_pool.
stmmac_xdp_xmit_back() also picks the TX queue by CPU through
stmmac_xdp_get_tx_queue(priv, smp_processor_id()). The completion can
therefore run on a different channel's tx_napi.
The pool is created without pp_params.napi, so page_pool has no way to
detect the foreign context.
Some setups put the two NAPI contexts on different CPUs:
- MSI with independent rx/tx IRQ affinity, for example 4 RX and 2 TX
queues on 4 CPUs
- irqbalance
- threaded NAPI
- busy polling
In those setups rx_napi can pop from pool->alloc.cache while tx_napi
pushes into it from another CPU. With this patch, rx_napi uses that
cache more, through __xdp_return_buff(&ctx.xdp, true) and
page_pool_put_full_page(..., true).
Could the racing alloc.count updates lose a page, so that the pool never
drains? Could they also hand the same page out twice, so that two RX
descriptors DMA into it, or a page is DMA-written while the stack still
owns it?
This race already exists for head pages. With fragmented XDP_TX,
xdp_return_frame_rx_napi() now also direct-recycles every fragment page
from that context.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261125-stmmac-rx-mb-v13-0-0f6bac53e8d5%40oss.qualcomm.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net-next v13 0/5] net: stmmac: introduce XDP rx multi-buff support
2026-11-25 14:48 [PATCH net-next v13 0/5] net: stmmac: introduce XDP rx multi-buff support Lorenzo Bianconi
` (4 preceding siblings ...)
2026-11-25 14:48 ` [PATCH net-next v13 5/5] net: stmmac: rework stmmac_rx to support XDP rx multi-buff Lorenzo Bianconi
@ 2026-11-25 14:53 ` netdev-bot+sinfo
2026-11-26 8:48 ` Lorenzo Bianconi
5 siblings, 1 reply; 10+ messages in thread
From: netdev-bot+sinfo @ 2026-11-25 14:53 UTC (permalink / raw)
To: Lorenzo Bianconi
Cc: Maxime Chevallier, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Alexandre Torgue,
Alexei Starovoitov, Daniel Borkmann, Jesper Dangaard Brouer,
John Fastabend, Stanislav Fomichev, Jose Abreu, Ong Boon Leong,
Simon Horman, Andrii Nakryiko, Eduard Zingerman,
Kumar Kartikeya Dwivedi, Martin KaFai Lau, Song Liu,
Yonghong Song, Jiri Olsa, Emil Tsalapatis, Ihor Solodrai,
Matthew Gerlach, Boon Khai Ng, netdev, linux-arm-kernel, bpf,
Peilin He, Nicolai Buchwitz
Hi!
This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:
- How the issue was discovered, e.g. hit in production, hit during
development, syzbot report, manual code inspection, LLM or static
analysis tool scan.
- Whether the issue was actually triggered, or is only theoretical
(e.g. found by LLM and not proven at runtime). If it was triggered
please include the symptoms, like the stack trace or kernel messages.
- What hardware the change was tested on. For driver fixes please
mention the device (and if relevant firmware version) used for
testing, or say that the change was not tested on real hardware.
Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account.
*IMPORTANT*: If you do repost (for other reasons) - please include
the relevant info in the cover letter or commit messages.
--
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH net-next v13 0/5] net: stmmac: introduce XDP rx multi-buff support
2026-11-25 14:53 ` [PATCH net-next v13 0/5] net: stmmac: introduce XDP rx multi-buff support netdev-bot+sinfo
@ 2026-11-26 8:48 ` Lorenzo Bianconi
0 siblings, 0 replies; 10+ messages in thread
From: Lorenzo Bianconi @ 2026-11-26 8:48 UTC (permalink / raw)
To: netdev-bot+sinfo
Cc: Maxime Chevallier, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Alexandre Torgue,
Alexei Starovoitov, Daniel Borkmann, Jesper Dangaard Brouer,
John Fastabend, Stanislav Fomichev, Jose Abreu, Ong Boon Leong,
Simon Horman, Andrii Nakryiko, Eduard Zingerman,
Kumar Kartikeya Dwivedi, Martin KaFai Lau, Song Liu,
Yonghong Song, Jiri Olsa, Emil Tsalapatis, Ihor Solodrai,
Matthew Gerlach, Boon Khai Ng, netdev, linux-arm-kernel, bpf,
Peilin He, Nicolai Buchwitz
[-- Attachment #1: Type: text/plain, Size: 1386 bytes --]
> Hi!
>
> This is an automated message. This series looks like a fix, but its
> commit messages seem to be missing some information:
>
> - How the issue was discovered, e.g. hit in production, hit during
> development, syzbot report, manual code inspection, LLM or static
> analysis tool scan.
The issue has been discovered during code development.
>
> - Whether the issue was actually triggered, or is only theoretical
> (e.g. found by LLM and not proven at runtime). If it was triggered
> please include the symptoms, like the stack trace or kernel messages.
This is a theoretical issue spotted during code development.
>
> - What hardware the change was tested on. For driver fixes please
> mention the device (and if relevant firmware version) used for
> testing, or say that the change was not tested on real hardware.
I tested this patch using a Qualcomm rb3-gen2 board.
Regards,
Lorenzo
>
> Please do not repost the series just to address the above. Instead,
> reply to this email with the missing information, so that reviewers
> can take it into account.
>
> *IMPORTANT*: If you do repost (for other reasons) - please include
> the relevant info in the cover letter or commit messages.
> --
> The evaluation is done by an LLM so it may be wrong, if you think
> that is the case please reply and explain.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread