netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Alan Ott <alan@signal11.us>
Cc: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>,
	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	linux-zigbee-devel@lists.sourceforge.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/6] mac802154: Use netif flow control
Date: Wed, 03 Apr 2013 01:21:39 +0400	[thread overview]
Message-ID: <515B4BE3.7060606@cogentembedded.com> (raw)
In-Reply-To: <1364928481-1813-4-git-send-email-alan@signal11.us>

Hello.

On 04/02/2013 10:47 PM, Alan Ott wrote:

> Use netif_stop_queue() and netif_wake_queue() to control the flow of
> packets to mac802154 devices.  Since many IEEE 802.15.4 devices have no
> output buffer, and since the mac802154 xmit() function is designed to
> block, netif_stop_queue() is called after each packet.
>
> Signed-off-by: Alan Ott <alan@signal11.us>
> ---
>   net/mac802154/tx.c | 16 ++++++++++++++++
>   1 file changed, 16 insertions(+)
>
> diff --git a/net/mac802154/tx.c b/net/mac802154/tx.c
> index a248246..fe3e02c 100644
> --- a/net/mac802154/tx.c
> +++ b/net/mac802154/tx.c
[...]
> @@ -71,6 +73,12 @@ static void mac802154_xmit_worker(struct work_struct *work)
>   out:
>   	mutex_unlock(&xw->priv->phy->pib_lock);
>   
> +	/* Restart the netif queue on each sub_if_data object. */
> +	rcu_read_lock();
> +	list_for_each_entry_rcu(sdata, &xw->priv->slaves, list) {
> +		netif_wake_queue(sdata->dev);
> +	}


    Are {} really necessary here?

> @@ -108,6 +117,13 @@ netdev_tx_t mac802154_tx(struct mac802154_priv *priv, struct sk_buff *skb,
>   		return NETDEV_TX_BUSY;
>   	}
>   
> +	/* Stop the netif queue on each sub_if_data object. */
> +	rcu_read_lock();
> +	list_for_each_entry_rcu(sdata, &priv->slaves, list) {
> +		netif_stop_queue(sdata->dev);
> +	}

    And here?

WBR, Sergei

  reply	other threads:[~2013-04-02 21:21 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
     [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 [this message]
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=515B4BE3.7060606@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=alan@signal11.us \
    --cc=alex.bluesman.smirnov@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dbaryshkov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-zigbee-devel@lists.sourceforge.net \
    --cc=netdev@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;
as well as URLs for NNTP newsgroup(s).