From: Alexander Aring <alex.aring@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: alex.bluesman.smirnov@gmail.com, dbaryshkov@gmail.com,
linux-zigbee-devel@lists.sourceforge.net, netdev@vger.kernel.org,
martin.townsend@xsilon.com
Subject: Re: [PATCH net-next v2 2/6] 6lowpan: fix fragmentation on sending side
Date: Tue, 25 Feb 2014 02:21:57 +0100 [thread overview]
Message-ID: <20140225012155.GA16712@omega> (raw)
In-Reply-To: <20140224.185213.1069306984692624378.davem@davemloft.net>
Hi David,
On Mon, Feb 24, 2014 at 06:52:13PM -0500, David Miller wrote:
> From: Alexander Aring <alex.aring@gmail.com>
> Date: Fri, 21 Feb 2014 19:58:58 +0100
>
> > + err = lowpan_fragment_xmit(skb, head, header_length,
> > + frag_plen + lowpan_size, 0,
> > + LOWPAN_DISPATCH_FRAG1);
> > if (err) {
> > pr_debug("%s unable to send FRAG1 packet (tag: %d)",
> > __func__, tag);
> > goto exit;
> > }
> >
> > - offset = LOWPAN_FRAG_SIZE;
> > + offset = lowpan_size + frag_plen;
> > + dgram_offset = mac_cb(skb)->frag_info.d_offset + frag_plen;
>
> This isn't going to work.
>
> Once you call dev_queue_xmit(), the skb control block can be reused by
> other layers. In particular the device qdisc layer is going to
> scramble the control block on you.
>
> Once a packet travels from one layer to another, SKB control block
> is likewise transferred.
thanks for your reply. If I understand it correctly so I can't be sure
that some other layer overwrites my skb control block with others
information.
In this case I can be sure we talking with ARPHRD_IEEE802154 devices only.
Which means I know that ARPHRD_IEEE802154 mac layer doesn't overwrites the
control block. Btw. at the moment the whole ieee802154 6lowpan implementation
is working on ARPHRD_IEEE802154 devices only, because the mac layer sets
many control block information for the upper layer. That's why we added
a check on this, see [1]. Simple put "The mac802154 layer and 6lowpan
layer share the same control block structure to make some 'layer
communication'".
The upper layer (6lowpan) use these information in control block which
is set by mac802154 layer. So we have a similar issue there.
The whole implementation is working only because the mac802154 and
6lowpan implementation share the control block information. A more
"correct" solution would be to drop the control block information and
evaluate the mac layer in 6lowpan also.
But you are right, that's a ugly solution. Anyway I can get the
mac_cb(skb)->frag_info.d_offset value when I evaluate the 6lowpan header
there aswell. So I will add a little helper function to get this information
and drop the unecessary information in mac_cb there.
Thanks.
- Alex
[1] http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/tree/net/ieee802154/6lowpan.c#n662
next prev parent reply other threads:[~2014-02-25 1:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-21 18:58 [PATCH net-next v2 0/6] 6lowpan: reimplementation of fragmentation handling Alexander Aring
2014-02-21 18:58 ` [PATCH net-next v2 1/6] 6lowpan: add frag information struct Alexander Aring
2014-02-21 18:58 ` [PATCH net-next v2 2/6] 6lowpan: fix fragmentation on sending side Alexander Aring
2014-02-24 23:52 ` David Miller
2014-02-25 1:21 ` Alexander Aring [this message]
2014-02-25 1:31 ` David Miller
2014-02-25 2:38 ` Alexander Aring
2014-02-21 18:58 ` [PATCH net-next v2 3/6] 6lowpan: move 6lowpan.c to 6lowpan_rtnl.c Alexander Aring
[not found] ` <1393009142-1694-1-git-send-email-alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-02-21 18:59 ` [PATCH net-next v2 4/6] 6lowpan: fix some checkpatch issues Alexander Aring
2014-02-21 18:59 ` [PATCH net-next v2 5/6] net: ns: add ieee802154_6lowpan namespace Alexander Aring
2014-02-21 18:59 ` [PATCH net-next v2 6/6] 6lowpan: handling 6lowpan fragmentation via inet_frag api Alexander Aring
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=20140225012155.GA16712@omega \
--to=alex.aring@gmail.com \
--cc=alex.bluesman.smirnov@gmail.com \
--cc=davem@davemloft.net \
--cc=dbaryshkov@gmail.com \
--cc=linux-zigbee-devel@lists.sourceforge.net \
--cc=martin.townsend@xsilon.com \
--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).