> This is incorrect, and definitely an issue that needs to be addressed.
> As I said, the model is, the driver calls netif_stop_queue() after
> queueing a packet, when it knows there is no more room for a full
> packet. The tg3 driver does it like this:
> ...queue an skb to hardware...
> if (TX_BUFFS_AVAIL(tp) <= (MAX_SKB_FRAGS + 1))
> Therefore you guarantee the queue is stopped until you are
> 100% certain that another skb (up to MAX_SKB_FRAGS + "main frag"
> fragments) may be queued to hardware.
> You do -not- want to figure out "after the fact" that you
> cannot queue the skb you were just passed.
But tg3 checks this case also and returns 1:
/* This is a hard error, log it. */
if (unlikely(TX_BUFFS_AVAIL(tp) <= (skb_shinfo(skb)->nr_frags +
Does this code path happen?
Using tg3 for reference, can we say this is the ideal model?
if(queue_stopped && space_avail)