From: Lennert Buytenhek <buytenh@wantstofly.org>
To: Alexander Aring <alex.aring@gmail.com>
Cc: linux-wpan@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH bluetooth-next 1/4] mac802154: iface: fix hrtimer cancel on ifdown
Date: Sat, 20 Jun 2015 08:19:20 +0300 [thread overview]
Message-ID: <20150620051920.GJ1897@wantstofly.org> (raw)
In-Reply-To: <1434226554-1450-1-git-send-email-alex.aring@gmail.com>
On Sat, Jun 13, 2015 at 10:15:51PM +0200, Alexander Aring wrote:
> The interframe spacing timer is a per phy definition and is part of a
> ieee802154_local structure. If we have possible multiple interfaces
> ifdown one interface then the timer should not be cancled. First if the
> last interface is down and the receive handling is stopped we should be
> sure that the interframe spacing timer isn't run anymore.
What is the ifs timer handling in the core code needed for in the
first place?
I understand that the 802.15.4 code keeps the interface queue stopped
as long as the PHY is transmitting the packet, and this makes sense,
given that probably none of the hardware involved contains a DMA ring
or anything like that, but I don't think that a (hr)timer is the way
to do it.
The right way to trigger transmit queue waking would be to do it when
receiving a transmit completion interrupt, or if the hardware doesn't
support that, by setting up a timer and possibly doing some polling in
the driver itself, to see if the packet has gone out on the wire yet
(which can be delayed for a multitude of reasons).
Or, just have the driver xmit() function check on entry whether the
previous packet has been transmitted yet and if not, stop the queue
and set a polling timer -- this way you won't get any transmit
completion interrupts or timer expirations if the transmit rate is
low, which would save a little bit of CPU time and CPU wakeups.
The current ifs timer handling logic does not, and by definition
cannot, take into account time needed for things such as clear channel
assessment, packet retransmissions, etc, and this isn't really fixable.
--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
next prev parent reply other threads:[~2015-06-20 5:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-13 20:15 [PATCH bluetooth-next 1/4] mac802154: iface: fix hrtimer cancel on ifdown Alexander Aring
2015-06-13 20:15 ` [PATCH bluetooth-next 2/4] mac802154: iface: flush workqueue before stop Alexander Aring
2015-06-14 23:24 ` Marcel Holtmann
2015-06-13 20:15 ` [PATCH bluetooth-next 3/4] at86rf230: use level high as fallback default Alexander Aring
2015-06-14 23:24 ` Marcel Holtmann
2015-06-13 20:15 ` [PATCH bluetooth-next 4/4] at86rf230: add support for sleep state Alexander Aring
2015-06-14 23:24 ` Marcel Holtmann
2015-06-14 23:24 ` [PATCH bluetooth-next 1/4] mac802154: iface: fix hrtimer cancel on ifdown Marcel Holtmann
2015-06-20 5:19 ` Lennert Buytenhek [this message]
2015-06-20 9:10 ` Alexander Aring
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=20150620051920.GJ1897@wantstofly.org \
--to=buytenh@wantstofly.org \
--cc=alex.aring@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-wpan@vger.kernel.org \
/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