> > +static int rtsn_tx_free(struct net_device *ndev, bool free_txed_only) > > +{ > > + struct rtsn_private *priv = netdev_priv(ndev); > > + struct rtsn_ext_desc *desc; > > + struct sk_buff *skb; > > + int free_num = 0; > > + int entry, size; > > + > > + for (; priv->cur_tx - priv->dirty_tx > 0; priv->dirty_tx++) { > > + entry = priv->dirty_tx % priv->num_tx_ring; > > + desc = &priv->tx_ring[entry]; > > + if (free_txed_only && (desc->die_dt & DT_MASK) != DT_FEMPTY) > > + break; > > + > > + dma_rmb(); > > + size = le16_to_cpu(desc->info_ds) & TX_DS; > > + skb = priv->tx_skb[entry]; > > + if (skb) { > > + if (skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) { > > + struct skb_shared_hwtstamps shhwtstamps; > > + struct timespec64 ts; > > + > > + rtsn_get_timestamp(priv, &ts); > > + memset(&shhwtstamps, 0, sizeof(shhwtstamps)); > > + shhwtstamps.hwtstamp = timespec64_to_ktime(ts); > > + skb_tstamp_tx(skb, &shhwtstamps); > > + } > > + dma_unmap_single(ndev->dev.parent, > > + le32_to_cpu(desc->dptr), > > + size, DMA_TO_DEVICE); > > + dev_kfree_skb_any(priv->tx_skb[entry]); > > + free_num++; > > + } > > + desc->die_dt = DT_EEMPTY; > > + priv->stats.tx_packets++; > if (!skb) case also, incrementing the tx_packets. Is this correct ? Please trim the text when replying. Is this the only comment in this 1500 line email? Did i miss more with my page-down, page-down, page-down..... Andrew