From: hayeswang <hayeswang@realtek.com>
To: 'David Miller' <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, 'nic_swsd' <nic_swsd@realtek.com>,
<linux-kernel@vger.kernel.org>, <linux-usb@vger.kernel.org>
Subject: RE: [PATCH net v4 3/4] r8152: support stopping/waking tx queue
Date: Wed, 20 Nov 2013 14:30:56 +0800 [thread overview]
Message-ID: <F013653E0841424DB3B68A223B07962D@realtek.com.tw> (raw)
In-Reply-To: <20131120.002223.1492430030566522391.davem@davemloft.net>
David Miller [mailto:davem@davemloft.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.
next prev parent reply other threads:[~2013-11-20 6:30 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-15 7:57 [PATCH net v3 0/4] r8152 bug fixes Hayes Wang
2013-11-15 7:57 ` [PATCH net v3 1/4] r8152: fix tx/rx memory overflow Hayes Wang
2013-11-15 22:39 ` David Miller
[not found] ` <20131115.173948.1712849813995511721.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2013-11-19 2:32 ` hayeswang
[not found] ` <1384502279-9959-1-git-send-email-hayeswang-Rasf1IRRPZFBDgjK7y7TUQ@public.gmane.org>
2013-11-15 7:57 ` [PATCH net v3 2/4] r8152: modify the tx flow Hayes Wang
2013-11-15 7:57 ` [PATCH net v3 3/4] r8152: support stopping/waking tx queue Hayes Wang
2013-11-15 7:57 ` [PATCH net v3 4/4] r8152: fix incorrect type in assignment Hayes Wang
2013-11-19 3:25 ` [PATCH net v4 0/4] r8152 bug fixes Hayes Wang
[not found] ` <1384831511-1625-1-git-send-email-hayeswang-Rasf1IRRPZFBDgjK7y7TUQ@public.gmane.org>
2013-11-19 3:25 ` [PATCH net v4 1/4] r8152: fix tx/rx memory overflow Hayes Wang
2013-11-19 3:25 ` [PATCH net v4 2/4] r8152: modify the tx flow Hayes Wang
2013-11-19 3:25 ` [PATCH net v4 3/4] r8152: support stopping/waking tx queue Hayes Wang
[not found] ` <1384831511-1625-4-git-send-email-hayeswang-Rasf1IRRPZFBDgjK7y7TUQ@public.gmane.org>
2013-11-19 20:25 ` David Miller
[not found] ` <20131119.152536.146706009595105149.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2013-11-20 3:28 ` hayeswang
[not found] ` <9C2E97E7BED9426ABE0FF4F63E12E33D-Rasf1IRRPZGoECsaD+WFmw@public.gmane.org>
2013-11-20 5:22 ` David Miller
2013-11-20 6:30 ` hayeswang [this message]
2013-11-19 3:25 ` [PATCH net v4 4/4] r8152: fix incorrect type in assignment Hayes Wang
2013-11-20 9:30 ` [PATCH net v5 0/4] r8152 bug fixes Hayes Wang
2013-11-20 9:30 ` [PATCH net v5 1/4] r8152: fix tx/rx memory overflow Hayes Wang
2013-11-20 9:30 ` [PATCH net v5 2/4] r8152: modify the tx flow Hayes Wang
2013-11-20 9:30 ` [PATCH net v5 3/4] r8152: support stopping/waking tx queue Hayes Wang
2013-11-20 9:30 ` [PATCH net v5 4/4] r8152: fix incorrect type in assignment Hayes Wang
2013-12-23 2:20 ` [PATCH net v5 0/4] r8152 bug fixes hayeswang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=F013653E0841424DB3B68A223B07962D@realtek.com.tw \
--to=hayeswang@realtek.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox