Re: [PATCH net] net: lan966x: Free skb when PTP TX timestamp request fails in xmit
From: Daniel Machon
Date: Wed Nov 25 2026 - 05:08:23 EST
On Tue, Nov 24, 2026 at 04:40:31PM -0800, Ian Rogers wrote:
> On Mon, Nov 23, 2026 at 10:43 AM <netdev-bot+sashiko@xxxxxxxxxx> wrote:
> >
> > [Severity: Medium]
> > Will this tx_dropped increment ever reach userspace? lan966x sets
> > .ndo_get_stats64 = lan966x_stats_get. dev_get_stats() adds only
> > dev->core_stats on top of what that callback returns, so legacy
> > dev->stats is never reported.
>
> Good point - dev_core_stats_tx_dropped_inc(dev) is needed so
> dev_get_stats() reports the software drop alongside lan966x_stats_get(),
> and it avoids an unlocked increment on dev->stats.tx_dropped as well.
Yes, only HW counters are reported, and the tx_dropped will not even show, so
converting to dev_core_stats_tx_dropped_inc() is right. There are 7 other call
sites that also need updating - let me pick that up for my series.
>
> Daniel, let me know if you'd like me to send a v2 with
> dev_core_stats_tx_dropped_inc(dev) (and netdev_tx_t return types for
> lan966x_port_ifh_xmit() / fdma_xmit) standalone, or if you prefer to
> fold it into your upcoming lan966x PTP TX series.
Please go ahead with a v2 with dev_core_stats_tx_dropped_inc(). The netdev_tx_t
change is hardly net material, so it also fits well within my series, please
drop that change. I will make sure to credit you on that patch.
>
> Thanks,
> Ian
pw-bot: cr