On Wed, 8 Mar 2023 07:21:07 -0500 Michael S. Tsirkin wrote: > > > * netdev_tx_t (*ndo_start_xmit)(struct sk_buff *skb, > > > * struct net_device *dev); > > > * Called when a packet needs to be transmitted. > > > * Returns NETDEV_TX_OK. Can return NETDEV_TX_BUSY, but you should stop > > > * the queue before that can happen; it's for obsolete devices and weird > > > * corner cases, but the stack really does a non-trivial amount > > > * of useless work if you return NETDEV_TX_BUSY. > > > * Required; cannot be NULL. > > > > Thanks for the pointer. It is intersting, it seems most driver is not flollowing > > the suggestion. > > Yes - I don't know why. Most modern drivers don't stop the queue upfront? We try to catch it in review, so anything remotely recent should. But a lot of people DTRT *and* check at the start of .xmit if the skb fits (return BUSY if it doesn't) - defensive programming. But the BUSY path should never hit.