All of lore.kernel.org
 help / color / mirror / Atom feed
[parent not found: <5419ABD6.70607@xsilon.com>]
* Re: 6lowpan raw socket problems
@ 2014-09-18  7:46 Simon Vincent
  2014-09-18  8:33 ` Alexander Aring
  0 siblings, 1 reply; 53+ messages in thread
From: Simon Vincent @ 2014-09-18  7:46 UTC (permalink / raw)
  To: Alexander Aring; +Cc: linux-wpan

I think what is happening is similar to your theory. The packets are getting sent to the 802.15.4 driver and the compress header function but as we have the raw socket recvmsg the packet is also sent internally to this socket. 
This is because a raw socket receives all messages that are sent and received. 
It does appear to be a complex problem. I just need to prove that this is what is happening by inserting more debug.

Simon

On 17 Sep 2014 17:17, Alexander Aring <alex.aring@gmail.com> wrote:
>
> Hi, 
>
> On Wed, Sep 17, 2014 at 06:03:53PM +0200, Alexander Aring wrote: 
> > On Wed, Sep 17, 2014 at 04:33:49PM +0100, Simon Vincent wrote: 
> > > Hi Alex, 
> > > 
> > > It looks like the problem is internal to Linux. I am running on a single 
> > > Linux box, outputting a RPL message which is put onto a 802154 fakelb 
> > > driver. The RPL message is also picked up by the code in my application that 
> > > is listening on a RAW socket. This is where the corrupt addresses are seen. 
> > > 
> > > All addresses are local link. Short addressing is used for the broadcast 
> > > address only. I am not using stateful compression. 
> > > 
> > > Is the same buffer used for the 6lowpan and ipv6 or is a copy taken to do 
> > > the ipv6 header compression? If so the message is output on the 802154 but 
> > > first the ipv6 header is compressed. The message is also passed to my RAW 
> > > ipv6 socket from the ipv6 layer using the same buffer which now contains the 
> > > compressed header? 
> > > 
> > > 
> > >                     |--->   recvmsg RAW skt 
> > > sendmsg RAW skt --->| 
> > >                     |--->   6lowpan/802.15.4 
> > > 
> > > My debug can see the header getting compressed at the 6lowpan layer but 
> > 
> > <--- compressed means tx working and no rx. 
> > 
> > > there is no receive debug triggered so the RAW socket is getting the message 
> > > from the ipv6 layer. 
> > > 
> > 
> > mhhh, I have a theory. The linux networking stack is too clever. It see's 
> > that these addresses are on the _same_ HOST and running it only one some 
> > loopback interfaces. It's like ping6 ::1 on a lowpan interface, if you 
> > want to do that, we never replace the IPv6 header with an 6LoWPAN header 
> > because the current behaviour doesn't send it to the lower layers. 
> > In this case "linux networking stack" see's "ahhh the same host -> doing 
> > magic optimization". Then the IPv6 stack doesn't call the necessary 
> > callbacks to do 6LoWPAN magic. 
> > 
> > Please instrument some driver layer of fakelb driver [1] then we can check 
> > this theory, When you instrument some printk's at driver layer we can 
> > see if your frames ever reached the lower layer. I am right not sure if 
> > this could be true, I never tested so much the fakelb driver. 
> > 
> > Also please instrument this function [0], it's necessary to run 
> > decompression when receiving. If my theory is true, then it's a 
> > complicated issue and don't know right now a easy workaround. 
> > 
>
> I also remembered an other guy/girl which had some issues with 6lowpan 
> and fakelb driver, but I did a quick test and it worked for me. 
>
> Which kernel version do you using, net-next kernel? 
>
> - Alex 

^ permalink raw reply	[flat|nested] 53+ messages in thread

end of thread, other threads:[~2014-09-19 14:22 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1409567774.3120.57.camel@jrissane-mobl.ger.corp.intel.com>
2014-09-01 11:38 ` 6lowpan status Alexander Aring
2014-09-02  6:08   ` Jukka Rissanen
2014-09-02  7:12     ` Alexander Aring
2014-09-02  7:26       ` Alexander Aring
2014-09-02 14:21         ` 6lowpan raw socket problems Simon Vincent
2014-09-02 14:43           ` Alexander Aring
2014-09-02 14:51             ` Simon Vincent
2014-09-02 15:18               ` Alexander Aring
2014-09-02 15:37               ` Alexander Aring
2014-09-02 16:06                 ` Simon Vincent
2014-09-02 16:26                   ` Alexander Aring
2014-09-02 18:53                     ` Martin Townsend
2014-09-08 10:43                       ` Alexander Aring
2014-09-17 13:30                         ` Simon Vincent
2014-09-17 13:57                           ` Alexander Aring
     [not found]                             ` <5419A9DD.5070804@xsilon.com>
2014-09-17 16:03                               ` Alexander Aring
2014-09-17 16:17                                 ` Alexander Aring
2014-09-18  7:55                                   ` Simon Vincent
     [not found] <5419ABD6.70607@xsilon.com>
2014-09-17 15:43 ` Simon Vincent
2014-09-18  7:46 Simon Vincent
2014-09-18  8:33 ` Alexander Aring
2014-09-18  8:37   ` Simon Vincent
2014-09-18  8:45     ` Alexander Aring
2014-09-18  8:54       ` Alexander Aring
2014-09-18  9:03         ` Simon Vincent
2014-09-18  9:44           ` Alexander Aring
2014-09-18  9:45             ` Alexander Aring
2014-09-18 14:02               ` Simon Vincent
2014-09-18 14:19                 ` Alexander Aring
2014-09-18 15:54                   ` Simon Vincent
2014-09-18 16:30                     ` Alexander Aring
2014-09-18 16:37                       ` Alexander Aring
2014-09-18 17:03                       ` Simon Vincent
2014-09-18 17:09                         ` Alexander Aring
2014-09-19  8:27                           ` Simon Vincent
2014-09-19  9:33                             ` Alexander Aring
2014-09-19  9:57                               ` Simon Vincent
2014-09-19 10:15                                 ` Alexander Aring
2014-09-19 10:39                                   ` Alexander Aring
2014-09-19 11:08                   ` Alexander Aring
2014-09-19 11:27                     ` Simon Vincent
2014-09-19 11:45                       ` Alexander Aring
2014-09-19 11:50                         ` Alexander Aring
2014-09-19 11:59                           ` Alexander Aring
2014-09-19 12:00                         ` Simon Vincent
2014-09-19 12:06                           ` Alexander Aring
2014-09-19 12:38                             ` Alexander Aring
2014-09-19 12:44                               ` Simon Vincent
2014-09-19 12:55                                 ` Alexander Aring
2014-09-19 12:57                                   ` Alexander Aring
2014-09-19 14:14                                     ` Simon Vincent
2014-09-19 14:21                                       ` Alexander Aring
2014-09-19 14:22                                         ` Alexander Aring

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.