Hi, I am having some trouble using pktgen with certain NICs. When running pktgen on some NICs, the test stalls because the worker thread is waiting for the driver to free the last skb. If a send a few pings out the interface, the worker thread will eventually unblock.
Below is the snippet of code from pktgen_xmit(): while (atomic_read(&(pkt_dev->skb->users)) != 1) { if (signal_pending(current)) { break; } schedule(); } It seems that some drivers do not immediately free skbs on transmit complete. They will hold the skb until there are more packets to free. One example is the sis900 driver which uses TX_IDLE (tx state-machine idle) instead of TX_OK (tx completed) as a way of coalescing interrupts. I've also seen another driver which does something similar. Not sure how prevalent this technique is. So is this a bug in the drivers or a bug in pktgen? If deferring skb cleanup is OK, then a potential way to fix pktgen would be to not wait and just live with a little inaccuracy bounded by the size of the Tx ring. So for a 1K ring and a 10E6 packet test an error of 0.1%. Another approach would be to send a configurable amount of extra packets to force a kfree_skb() of the last packet you want to measure. Thoughts? Regards, Mandeep - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html