Re: [PATCH v3 net 1/7] net: enetc: consistenly track dropped frames in enetc_xdp_xmit()

Vladimir Oltean <[email protected]>
Newsgroups gmane.linux.network,gmane.linux.kernel,gmane.linux.kernel.bpf
Message-ID <20260918102753.kjxfgmediwq5erba@skbuf>
On Wed, Sep 16, 2026 at 05:16:28AM +0300, Wei Fang wrote:
> > diff --git a/drivers/net/ethernet/freescale/enetc/enetc.c
> > b/drivers/net/ethernet/freescale/enetc/enetc.c
> > index 80f0082f6c63..e7ecdf8ef67c 100644
> > --- a/drivers/net/ethernet/freescale/enetc/enetc.c
> > +++ b/drivers/net/ethernet/freescale/enetc/enetc.c
> > @@ -1843,7 +1843,6 @@ int enetc_xdp_xmit(struct net_device *ndev, int
> > num_frames,
> >  			for (i = 0; i < xdp_tx_bd_cnt; i++)
> >  				enetc_unmap_tx_buff(tx_ring,
> >  						    &xdp_redirect_arr[i]);
> > -			tx_ring->stats.xdp_tx_drops++;
> >  			break;
> >  		}
> > 
> > @@ -1854,6 +1853,7 @@ int enetc_xdp_xmit(struct net_device *ndev, int
> > num_frames,
> >  		enetc_update_tx_ring_tail(tx_ring);
> > 
> >  	tx_ring->stats.xdp_tx += xdp_tx_frm_cnt;
> > +	tx_ring->stats.xdp_tx_drops += num_frames - xdp_tx_frm_cnt;
> > 
> >  	enetc_unlock_mdio();
> > 
> > --
> > 2.43.0
> 
> Reviewed-by: Wei Fang <[email protected]>
>

Thanks for the review, but I'm not picking up your tag because I need to
expand the patch to also cover the situation uncovered by Sashiko (the
-ENETDOWN case not incrementing the drop counters).
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.