From: Alan Ott <alan-yzvJWuRpmD1zbRFIqnYvSA@public•gmane.org>
To: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public•gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public•gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public•gmane.org,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public•gmane.org
Subject: Re: [PATCH 1/6] mac802154: Immediately retry sending failed packets
Date: Tue, 02 Apr 2013 22:25:28 -0400 [thread overview]
Message-ID: <515B9318.8090101@signal11.us> (raw)
In-Reply-To: <20130402.220315.1782012687105065631.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
On 04/02/2013 10:03 PM, David Miller wrote:
> From: Alan Ott <alan-yzvJWuRpmD1zbRFIqnYvSA@public•gmane.org>
> Date: Tue, 02 Apr 2013 21:59:37 -0400
>
>> On 04/02/2013 09:56 PM, David Miller wrote:
>>> From: Alan Ott <alan-yzvJWuRpmD1zbRFIqnYvSA@public•gmane.org>
>>> Date: Tue, 02 Apr 2013 21:24:59 -0400
>>>
>>>> I like it for a couple of reasons.
>>>> 1. Most supported devices have only single packet output buffer, so
>>>> blocking in the driver is the most straight-forward way to handle it.
>>>> The alternative is to make each driver have a workqueue for xmit() (to
>>>> lift the blocking out from atomic context). This makes each driver simpler.
>>>>
>>>> 2. All of the flow control can be handled one time in the mac802154 layer.
>>> We have a perfectly working flow control mechanism in the generic
>>> networking queuing layer. Please use it instead of inventing things.
>> I'm pretty sure that's what I'm doing in [1]. When I say "flow control
>> can be handled," I mean managing calls to netif_stop_queue() and
>> netif_wake_queue(). Is there something else I should be doing instead?
> Then you shouldn't need workqueues if the generic netdev facilities
> can do the flow control properly.
The workqueue in mac802154 is only needed because the current mac802154
xmit() function is designed to be blocking and synchronous.
Prior to my patch (#3/6), that very same workqueue would actually queue
up packets (without bound). That's what my patch fixes.
The workqueue in mac802154 also serializes the access to the device for
other functions like setting the channel, ensuring that in the driver
code, one doesn't have to mutex everything. I'm not sure if that's the
"right" way to do it, but that's the way it was when I got here.
> There are several ethernet devices that have a single transmit buffer
> and function just fine, and optimally, solely using the transmit queue
> stop/start/wake infrastructure.
Yes, that does work. enc28j60 works like this. However, since it's an
SPI device (and can sleep), its ndo_start_xmit() _does_ use a workqueue
(to remove it from atomic context), the same as ours (mac802154) does.
The difference is that we do it at the mac802154 layer, while Ethernet
devices do it in the driver.
I guess one advantage to the way it currently is in mac802154, with the
synchronous xmit(), is that a return code can be had from the driver for
each packet. With my new idea that we don't need to retransmit on
failure, I'm not sure we need this return code at all.
Alan.
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
next prev parent reply other threads:[~2013-04-03 2:25 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-02 18:47 [PATCH 0/6] 802.15.4 and 6LoWPAN Buffering Fixes Alan Ott
[not found] ` <1364928481-1813-1-git-send-email-alan-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
2013-04-02 18:47 ` [PATCH 1/6] mac802154: Immediately retry sending failed packets Alan Ott
[not found] ` <1364928481-1813-2-git-send-email-alan-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
2013-04-02 19:11 ` Alexander Smirnov
[not found] ` <CAJmB2rCr5ds11+iN=W5GCKsUgdfb57uKg+mH4NY4CWw6EFCTbg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-04-02 20:28 ` Alan Ott
2013-04-02 21:28 ` Alan Ott
[not found] ` <515B4D79.40805-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
2013-04-02 22:35 ` Alan Ott
2013-04-02 23:13 ` Werner Almesberger
2013-04-03 1:24 ` Alan Ott
2013-04-03 1:56 ` [Linux-zigbee-devel] " David Miller
[not found] ` <20130402.215625.1555279506975246223.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2013-04-03 1:59 ` Alan Ott
[not found] ` <515B8D09.9050304-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
2013-04-03 2:03 ` David Miller
[not found] ` <20130402.220315.1782012687105065631.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2013-04-03 2:25 ` Alan Ott [this message]
[not found] ` <515B9318.8090101-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
2013-04-03 2:30 ` David Miller
2013-04-03 2:57 ` [Linux-zigbee-devel] " Alan Ott
2013-04-03 2:38 ` Werner Almesberger
2013-04-02 18:47 ` [PATCH 2/6] mac802154: Move xmit_attemps to stack Alan Ott
2013-04-02 18:47 ` [PATCH 3/6] mac802154: Use netif flow control Alan Ott
2013-04-02 21:21 ` Sergei Shtylyov
2013-04-02 18:47 ` [PATCH 4/6] mac802154: Increase tx_buffer_len Alan Ott
2013-04-02 18:48 ` [PATCH 5/6] 6lowpan: handle dev_queue_xmit error code properly Alan Ott
[not found] ` <1364928481-1813-6-git-send-email-alan-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
2013-04-02 19:21 ` Alexander Smirnov
[not found] ` <CAJmB2rB+9-gLV=SVvr4JUc2swjmTaWxD0gYM5VLw8PL1d455JA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-04-02 19:30 ` Alan Ott
2013-04-02 18:48 ` [PATCH 6/6] 6lowpan: return the dev_queue_xmit() return value from lowpan_xmit() Alan Ott
[not found] ` <1364928481-1813-7-git-send-email-alan-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
2013-04-02 19:27 ` Alexander Smirnov
2013-04-03 14:00 ` [PATCH v2 0/4] 802.15.4 and 6LoWPAN Buffering Fixes Alan Ott
2013-04-03 14:00 ` [PATCH v2 1/4] mac802154: Do not try to resend failed packets Alan Ott
[not found] ` <1364997658-16498-1-git-send-email-alan-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
2013-04-03 14:00 ` [PATCH v2 2/4] mac802154: Use netif flow control Alan Ott
2013-04-03 14:00 ` [PATCH v2 3/4] mac802154: Increase tx_buffer_len Alan Ott
2013-04-03 14:00 ` [PATCH v2 4/4] 6lowpan: handle dev_queue_xmit() error code properly Alan Ott
2013-04-07 21:06 ` [PATCH v2 0/4] 802.15.4 and 6LoWPAN Buffering Fixes David Miller
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=515B9318.8090101@signal11.us \
--to=alan-yzvjwurpmd1zbrfiqnyvsa@public$(echo .)gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public$(echo .)gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
--cc=linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public$(echo .)gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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