Re: Q: sock output serialization

From: Andi Kleen (ak@suse.de)
Date: Sat Sep 16 2000 - 18:54:35 EST


On Sat, Sep 16, 2000 at 11:39:45PM +0200, Henner Eisen wrote:
> int netif_would_drop(dev)
> {
> return (queue->input_pkt_queue.qlen > netdev_max_backlog)
> || ( (queue->input_pkt_queue.qlen) && (queue->throttle) )
> }
>
> would fulfil those requirements.

It would just be racy. You test, get a not drop and then another different
interrupt would deliver another packet before you can and fill the queue.
Jamal's extended netif_rx probably makes more sense, because it can be
atomic.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 21:00:14 EST