From: Alexander Aring <alex.aring@gmail.com>
To: Martin Townsend <martin.townsend@xsilon.com>
Cc: Martin Townsend <mtownsend1973@gmail.com>,
linux-bluetooth@vger.kernel.org, linux-wpan@vger.kernel.org,
marcel@holtmann.org, jukka.rissanen@linux.intel.com
Subject: Re: [PATCH bluetooth-next 0/5] Move skb delivery out of IPHC.
Date: Mon, 20 Oct 2014 11:10:46 +0200 [thread overview]
Message-ID: <20141020091043.GC5404@omega> (raw)
In-Reply-To: <5444CF99.4080305@xsilon.com>
On Mon, Oct 20, 2014 at 10:02:17AM +0100, Martin Townsend wrote:
> Hi Alex,
>
> I've completely forgotten what the original problem was it was so long ago :) , let me dig through the old emails and see if I can jog my memory.
>
> My intention was to do the kfree_skb patch in my next submission but I'll see what I can do.
>
yea, the problem a general error handling issue in mainly two parts:
- detection errors. Means the NET_RX_FOO conversion to errno. But you
put out the netif_rx call outside of lowpan_header_create which is
very well. I approve that one. Now it's important that the "lowpan
give to upper layer" functions not returning ERRNO's and NET_RX_FOO.
Again, errno is a negative value and NET_RX_FOO is 0 or 1. We can't
check on a error with if (ret < 0) or (ret == NET_RX_DROP). Also
(ret != NET_RX_SUCCESS) will not work because it's "1" and "0"
indicate successful or sometimes not successful because NET_RX_DROP
was returned and this is "0". Lot of confusing here.
For the "lowpan give to upper layer" functions doesn't matter if
errno is returned or NET_RX_FOO, but don't a mix of both!
The "lowpan_header_create" should return errno's.
- Second issue was a complete wrong reaction on error handling and
memory managment with "kfree_skb" which needs a fix of the above one
at first to introduce a correct error handling.
Now I see a little bit the fix of the first one. But not the second one.
Or should these things all fine now, otherwise I will take a more
careful review.
- Alex
next prev parent reply other threads:[~2014-10-20 9:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-18 7:09 [PATCH bluetooth-next 0/5] Move skb delivery out of IPHC Martin Townsend
2014-10-18 7:09 ` [PATCH bluetooth-next 1/5] Remove skb_deliver from IPHC Martin Townsend
2014-10-18 7:09 ` [PATCH bluetooth-next 2/5] Fix process_data return values Martin Townsend
2014-10-18 7:09 ` [PATCH bluetooth-next 3/5] Use consume_skb when packet processed successfully Martin Townsend
2014-10-18 7:09 ` [PATCH bluetooth-next 4/5] Remove unused skb_delivery_cb typedef Martin Townsend
2014-10-18 7:09 ` [PATCH bluetooth-next 5/5] Rename process_data and lowpan_process_data Martin Townsend
2014-10-20 7:25 ` [PATCH bluetooth-next 0/5] Move skb delivery out of IPHC Alexander Aring
2014-10-20 8:34 ` Martin Townsend
2014-10-20 8:55 ` Alexander Aring
2014-10-20 9:02 ` Martin Townsend
2014-10-20 9:10 ` Alexander Aring [this message]
2014-10-20 10:06 ` Martin Townsend
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=20141020091043.GC5404@omega \
--to=alex.aring@gmail.com \
--cc=jukka.rissanen@linux.intel.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=martin.townsend@xsilon.com \
--cc=mtownsend1973@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.