From: Alan Ott <alan-yzvJWuRpmD1zbRFIqnYvSA@public•gmane.org>
To: Alexander Smirnov
<alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public•gmane.org>
Cc: "open list:NETWORKING \[GENERAL\]"
<netdev-u79uwXL29TY76Z2rM5mHXA@public•gmane.org>,
"David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public•gmane.org>,
linux-zigbee-devel
<linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public•gmane.org>
Subject: Re: [PATCH 5/6] 6lowpan: handle dev_queue_xmit error code properly
Date: Tue, 02 Apr 2013 15:30:24 -0400 [thread overview]
Message-ID: <515B31D0.4050709@signal11.us> (raw)
In-Reply-To: <CAJmB2rB+9-gLV=SVvr4JUc2swjmTaWxD0gYM5VLw8PL1d455JA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 1649 bytes --]
On 04/02/2013 03:21 PM, Alexander Smirnov wrote:
>
>
>
> 2013/4/2 Alan Ott <alan-yzvJWuRpmD1zbRFIqnYvSA@public•gmane.org <mailto:alan-yzvJWuRpmD1zbRFIqnYvSA@public•gmane.org>>
>
> dev_queue_xmit() can return positive error codes, so check for
> nonzero.
>
> Signed-off-by: Alan Ott <alan-yzvJWuRpmD1zbRFIqnYvSA@public•gmane.org <mailto:alan-yzvJWuRpmD1zbRFIqnYvSA@public•gmane.org>>
> ---
> net/ieee802154/6lowpan.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
> index e1b4580..a68c792 100644
> --- a/net/ieee802154/6lowpan.c
> +++ b/net/ieee802154/6lowpan.c
> @@ -1139,7 +1139,7 @@ static netdev_tx_t lowpan_xmit(struct
> sk_buff *skb, struct net_device *dev)
> error:
> dev_kfree_skb(skb);
> out:
> - if (err < 0)
> + if (err)
>
> lets say ok....
>
> pr_debug("ERROR: xmit failed\n");
>
> return (err < 0 ? NETDEV_TX_BUSY : NETDEV_TX_OK);
>
> but here you still checks for negative error only, why?
That's fixed in the next patch (6/6). Maybe 5/6 and 6/6 should be
squashed? It's the same fundamental problem, but with different
implications (as described in the commit messages). 5/6 is about the
error (debug) message being not shown all the times it needs to be, and
6/6 is about returning the correct error code to the higher layer[1].
Alan.
[1] I'm never sure, given "make a patch do one thing only," where to
draw the line between having fewer patches which are larger, and having
more smaller patches which are easier to understand.
[-- Attachment #1.2: Type: text/html, Size: 3250 bytes --]
[-- Attachment #2: Type: text/plain, Size: 351 bytes --]
------------------------------------------------------------------------------
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
[-- Attachment #3: Type: text/plain, Size: 213 bytes --]
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public•gmane.org
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel
next prev parent reply other threads:[~2013-04-02 19:30 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
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 [this message]
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=515B31D0.4050709@signal11.us \
--to=alan-yzvjwurpmd1zbrfiqnyvsa@public$(echo .)gmane.org \
--cc=alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public$(echo .)gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@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