[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <F013653E0841424DB3B68A223B07962D@realtek.com.tw>
Date: Wed, 20 Nov 2013 14:30:56 +0800
From: hayeswang <hayeswang@...ltek.com>
To: 'David Miller' <davem@...emloft.net>
CC: <netdev@...r.kernel.org>, 'nic_swsd' <nic_swsd@...ltek.com>,
<linux-kernel@...r.kernel.org>, <linux-usb@...r.kernel.org>
Subject: RE: [PATCH net v4 3/4] r8152: support stopping/waking tx queue
David Miller [mailto:davem@...emloft.net]
[...]
> > If the situation occurs, it means there is no tx buffer at
> that time. If the
> > netif_wake_queue() is called, only one more packet would be
> queued and the tx
> > queue would be stopped again after calling
> rtl8152_start_xmit(). That is, it
> > is not necessary to wake the queue. Besides, after the tx
> is completed, another
> > tasklet would be scheduled if there is any packet which is
> queued in the list.
> > That is, the r8152_tx_agg_fill() would be called and the
> netif_queue_stopped()
> > would be check againg, so the tx queue would not be stopped forever.
>
> Then the queue can be woken when in fact r8152_start_xmit()
> is not able to
> actually queue packets. It is just as equally problematic.
>
> You have to synchronize this state, somehow.
>
> tg3 driver does this by taking netif tx queue lock during the wake
> test sequence in TX reclaim. This works because ->ndo_start_xmit() is
> run with this lock held.
Thanks for your answer. I would modify it.
--
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