[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130813103331.20946af6@nehalam.linuxnetplumber.net>
Date: Tue, 13 Aug 2013 10:33:31 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Yannick Koehler <yannick@...hler.name>
Cc: netdev@...r.kernel.org
Subject: Re: tun always return NETDEV_TX_OK, why?
On Tue, 13 Aug 2013 10:39:02 -0400
Yannick Koehler <yannick@...hler.name> wrote:
> Hello,
>
> I hit a problem recently with the tun interface, it looks like when
> this interface reach its txqueuelen it will then drop the packet and
> return NETDEV_TX_OK unconditionally.
>
> That, from my little understanding of the netdev framework, appears
> to be wrong and will simply eat up any pending buffer and discard them
> until the queue frees itself. That seems to be against the flow
> control design in the tx queue system of the kernel.
>
> So, is this a bug or a misunderstanding? Would it be ok for tun to
> return NETDEV_TX_BUSY when the txqueuelen is reach and call
> netif_stop_queue() so that the layer above stop sending frame to this
> interface until it can cope it's current queue content?
>
NETDEV_TX_BUSY won't work well for this because it basically
causes kernel to spin waiting for the transmit queue.
A better way is to figure out how to do proper flow control
with start/stop queue.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists