From: Eric Dumazet <eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Alan Ott <alan-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: RFC: mac802154 Packet Queueing and Slave Devices
Date: Mon, 10 Sep 2012 08:12:27 +0200 [thread overview]
Message-ID: <1347257547.1234.1110.camel@edumazet-glaptop> (raw)
In-Reply-To: <504D37A7.60109-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
On Sun, 2012-09-09 at 20:43 -0400, Alan Ott wrote:
> Hi,
>
> Tony and I were recently talking about packet queueing on 802.15.4. What
> currently happens (in net/mac802154/tx.c) is that each tx packet (skb)
> is stuck on a work queue, and the worker function then sends each packet
> to the hardware driver in order.
>
> The problem with this is that it defeats the netif flow control.
And qdisc ability to better control bufferbloat...
By the way, mac802154_tx() looks buggy :
if (!(priv->phy->channels_supported[page] & (1 << chan))) {
WARN_ON(1);
// Here, a kfree_skb(skb) is missing.
return NETDEV_TX_OK;
}
if (skb_cow_head(skb, priv->hw.extra_tx_headroom)) {
dev_kfree_skb(skb); // should be kfree_skb(skb)
return NETDEV_TX_OK;
}
work = kzalloc(sizeof(struct xmit_work), GFP_ATOMIC);
if (!work)
return NETDEV_TX_BUSY;
NETDEV_TX_BUSY is going to loop. So if there is really no more memory,
its a deadlock. You should instead kfree_skb(skb) and return
NETDEV_TX_OK.
Also mac802154_wpan_xmit() returns NETDEV_TX_OK without kfree_skb(skb)
here :
if (chan == MAC802154_CHAN_NONE ||
page >= WPAN_NUM_PAGES ||
chan >= WPAN_NUM_CHANNELS)
return NETDEV_TX_OK;
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
next prev parent reply other threads:[~2012-09-10 6:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-10 0:43 RFC: mac802154 Packet Queueing and Slave Devices Alan Ott
[not found] ` <504D37A7.60109-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
2012-09-10 6:12 ` Eric Dumazet [this message]
2012-09-11 3:00 ` Alan Ott
2012-11-30 1:55 ` [PATCH] 6lowpan: consider checksum bytes in fragmentation threshold Alan Ott
2012-11-30 1:58 ` Alan Ott
2012-11-30 17:19 ` David Miller
2012-11-30 4:25 ` [PATCH 1/2] mac802154: fix memory leaks Alan Ott
2012-11-30 4:25 ` [PATCH 2/2] mac802154: use kfree_skb() instead of dev_kfree_skb() Alan Ott
2012-11-30 17:19 ` David Miller
2012-11-30 17:19 ` [PATCH 1/2] mac802154: fix memory leaks David Miller
2013-03-21 16:09 ` RFC: mac802154 Packet Queueing and Slave Devices Alan Ott
2013-03-22 5:33 ` Alan Ott
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=1347257547.1234.1110.camel@edumazet-glaptop \
--to=eric.dumazet-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=alan-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org \
--cc=linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.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