Re: What causes a recv syscall for a socket to sometimes return less than the request len?

2016-09-21 Thread Andrey Utkin
On Wed, Sep 21, 2016 at 05:20:30PM -0700, Daniel Ellis wrote:
> I've changed the underlying code to correctly call recv until all the data
> has been received, but I am curious as to what's going on under the hood
> that made this so sporadic (and a bit of a headache to track down).  Any
> help would be appreciated!

Splitting and merging of chunks may happen anywhere in the pipeline
between sending and receiving _applications_. Networking stacks of
operation systems of endpoints, as well as of intermediate nodes, are
free to do whatever they decide with these chunk boundaries, because
these boundaries are not part of TCP connection user interface. Again,
it is by design that you cannot rely on these boundaries. Just always
read up to complete message if you are using TCP, or use something other
than TCP - for example, UDP seems to preserve boundaries (however there
is even more headache with UDP).

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


What causes a recv syscall for a socket to sometimes return less than the request len?

2016-09-21 Thread Daniel Ellis
Howdy,

I understand that data fragmentation happens across TCP packets, and in my
case that is what is happening.  The packets I'm seeing usually run around
1450 in length, and are always cut into two packets at the 1400 mark.  This
works fine most of the time, since the call to recv is being passed a len
of 4096 (via Python's socket.recv, which I'm assuming is just a wrapper
around the system call).  But sometimes I'll get all of the data I request,
even across TCP packet boundaries (so the full 1450 bytes), and other
times, it stops at a single packet, at which point I need to make another
recv call.

This seems to be happening more when the box is under more load (both in a
network and CPU sense), but that might be a coincidence.  Are there some
internal buffers that I could be monitoring that would correlate with these
packets being flushed out quicker?

I've changed the underlying code to correctly call recv until all the data
has been received, but I am curious as to what's going on under the hood
that made this so sporadic (and a bit of a headache to track down).  Any
help would be appreciated!

Dan
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: How to search topics in The Kernelnewbies Archives?

2016-09-21 Thread Greg Freemyer
On Wed, Sep 21, 2016 at 2:58 AM,   wrote:
> On Wed, 21 Sep 2016 14:27:03 +0800, Chi Wang said:
>
>> https://lists.kernelnewbies.org/pipermail/kernelnewbies/
>>
>> Is there a general way to do searching in this archive?
>> Or I have to download all the packages?
>
> Google can do wonders.
>
> Say you're trying to find the discussion 2 years ago about how to
> write a frobnizz driver.   Go to google, and enter:
>
> frobnizz site:kernelnewbies.org
>
> and that should do the heavy lifting for you.


That's pretty sad.

It doesn't work for kernelnewbies, but markmail.org is a much better
search engine for mailing lists in supports (thousands of them).

Definitely what I use for the main kernel list archives.

You can use a similar "list:" syntax if you know what list you want to search.

Greg

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: RF class driver

2016-09-21 Thread Daniel.
I was trying to make it out-of-tree, but seems not possible or not
easy spottable for me :)

2016-09-21 10:05 GMT-03:00 Daniel. :
> I look into it,
>
> Still I need to patch if_ether.h and add some ETH_P_*
>
> 2016-09-21 9:57 GMT-03:00 Hayward, Shaun :
>> It might be worth taking a look at the Socket CAN drivers 
>> (https://www.kernel.org/doc/Documentation/networking/can.txt). It’s not the 
>> same type of hardware as the RF devices you’re working with, but it is a 
>> case where a network interface was created for devices that are very 
>> different than Ethernet.
>>
>> Shaun
>>
>> On 9/21/16, 8:43 AM, "kernelnewbies-boun...@kernelnewbies.org on behalf of 
>> Daniel." > danielhi...@gmail.com> wrote:
>>
>> I have a driver for nRF24L01+ (not L0) I'm planing to submit it to
>> main line but before that I was trying to make it a network device. My
>> dificult was to make it fit in the ethernet world since it does not
>> have anything in common to a network card. This one can be found here:
>> https://bitbucket.org/danielhilst/nrf24 the network try is here, but
>> is not finished: https://bitbucket.org/danielhilst/nrf24l01p
>>
>> 2016-09-21 7:08 GMT-03:00 Greg KH :
>> > On Wed, Sep 21, 2016 at 03:09:09PM +0530, Raul Piper wrote:
>> >> On Wed, Sep 21, 2016 at 1:13 PM, Greg KH  wrote:
>> >>  I wanted to know in which class RF Transceivers - (Sub 1 -Ghz
>> >> devices) Linux drivers will fall and where to find them in Linux
>> >> kernel ,
>> >>  I grepped keywords like Ghz, Sub , and it leads me to the folder
>> >> drivers/net/wireless/* but I am not getting whether they refer to the
>> >> RF class of drivers or something else.
>> >
>> > Those are wireless networking drivers.
>> >
>> >> Is there a framework for them or
>> >> all will come under Wireless device drivers or network device
>> >> drivers?What is the appropriate mailing list for the same?
>> >
>> > linux-wirel...@vger.kernel.org
>> >
>> >> Few example of such devices are -
>> >>
>> >> Sub-1 GHz CC1120-CC1190 - From Texas Instruments
>> >>
>> >> nRF905 - From Nordic Semiconductor
>> >>
>> >> nRF9E5 - From Nordic Semiconductor
>> >>
>> >> nRF24L01 - From Texas Instruments
>> >>
>> >> Si4455  - From Silicon Labs
>> >> OL23xx  - From Nxp.
>> >
>> > Those are almost always integrated directly into a wifi chipset, and 
>> not
>> > independant.  If you have an independant device, the GNU Radio project
>> > might be a good thing to look into.
>> >
>> > good luck!
>> >
>> > greg k-h
>> >
>> > ___
>> > Kernelnewbies mailing list
>> > Kernelnewbies@kernelnewbies.org
>> > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>>
>>
>> --
>> "Do or do not. There is no try"
>>   Yoda Master
>>
>> ___
>> Kernelnewbies mailing list
>> Kernelnewbies@kernelnewbies.org
>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>>
>
>
>
> --
> "Do or do not. There is no try"
>   Yoda Master



-- 
"Do or do not. There is no try"
  Yoda Master

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: RF class driver

2016-09-21 Thread Daniel.
I look into it,

Still I need to patch if_ether.h and add some ETH_P_*

2016-09-21 9:57 GMT-03:00 Hayward, Shaun :
> It might be worth taking a look at the Socket CAN drivers 
> (https://www.kernel.org/doc/Documentation/networking/can.txt). It’s not the 
> same type of hardware as the RF devices you’re working with, but it is a case 
> where a network interface was created for devices that are very different 
> than Ethernet.
>
> Shaun
>
> On 9/21/16, 8:43 AM, "kernelnewbies-boun...@kernelnewbies.org on behalf of 
> Daniel."  danielhi...@gmail.com> wrote:
>
> I have a driver for nRF24L01+ (not L0) I'm planing to submit it to
> main line but before that I was trying to make it a network device. My
> dificult was to make it fit in the ethernet world since it does not
> have anything in common to a network card. This one can be found here:
> https://bitbucket.org/danielhilst/nrf24 the network try is here, but
> is not finished: https://bitbucket.org/danielhilst/nrf24l01p
>
> 2016-09-21 7:08 GMT-03:00 Greg KH :
> > On Wed, Sep 21, 2016 at 03:09:09PM +0530, Raul Piper wrote:
> >> On Wed, Sep 21, 2016 at 1:13 PM, Greg KH  wrote:
> >>  I wanted to know in which class RF Transceivers - (Sub 1 -Ghz
> >> devices) Linux drivers will fall and where to find them in Linux
> >> kernel ,
> >>  I grepped keywords like Ghz, Sub , and it leads me to the folder
> >> drivers/net/wireless/* but I am not getting whether they refer to the
> >> RF class of drivers or something else.
> >
> > Those are wireless networking drivers.
> >
> >> Is there a framework for them or
> >> all will come under Wireless device drivers or network device
> >> drivers?What is the appropriate mailing list for the same?
> >
> > linux-wirel...@vger.kernel.org
> >
> >> Few example of such devices are -
> >>
> >> Sub-1 GHz CC1120-CC1190 - From Texas Instruments
> >>
> >> nRF905 - From Nordic Semiconductor
> >>
> >> nRF9E5 - From Nordic Semiconductor
> >>
> >> nRF24L01 - From Texas Instruments
> >>
> >> Si4455  - From Silicon Labs
> >> OL23xx  - From Nxp.
> >
> > Those are almost always integrated directly into a wifi chipset, and not
> > independant.  If you have an independant device, the GNU Radio project
> > might be a good thing to look into.
> >
> > good luck!
> >
> > greg k-h
> >
> > ___
> > Kernelnewbies mailing list
> > Kernelnewbies@kernelnewbies.org
> > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
>
> --
> "Do or do not. There is no try"
>   Yoda Master
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>



-- 
"Do or do not. There is no try"
  Yoda Master

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: RF class driver

2016-09-21 Thread Daniel.
I have a driver for nRF24L01+ (not L0) I'm planing to submit it to
main line but before that I was trying to make it a network device. My
dificult was to make it fit in the ethernet world since it does not
have anything in common to a network card. This one can be found here:
https://bitbucket.org/danielhilst/nrf24 the network try is here, but
is not finished: https://bitbucket.org/danielhilst/nrf24l01p

2016-09-21 7:08 GMT-03:00 Greg KH :
> On Wed, Sep 21, 2016 at 03:09:09PM +0530, Raul Piper wrote:
>> On Wed, Sep 21, 2016 at 1:13 PM, Greg KH  wrote:
>>  I wanted to know in which class RF Transceivers - (Sub 1 -Ghz
>> devices) Linux drivers will fall and where to find them in Linux
>> kernel ,
>>  I grepped keywords like Ghz, Sub , and it leads me to the folder
>> drivers/net/wireless/* but I am not getting whether they refer to the
>> RF class of drivers or something else.
>
> Those are wireless networking drivers.
>
>> Is there a framework for them or
>> all will come under Wireless device drivers or network device
>> drivers?What is the appropriate mailing list for the same?
>
> linux-wirel...@vger.kernel.org
>
>> Few example of such devices are -
>>
>> Sub-1 GHz CC1120-CC1190 - From Texas Instruments
>>
>> nRF905 - From Nordic Semiconductor
>>
>> nRF9E5 - From Nordic Semiconductor
>>
>> nRF24L01 - From Texas Instruments
>>
>> Si4455  - From Silicon Labs
>> OL23xx  - From Nxp.
>
> Those are almost always integrated directly into a wifi chipset, and not
> independant.  If you have an independant device, the GNU Radio project
> might be a good thing to look into.
>
> good luck!
>
> greg k-h
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
"Do or do not. There is no try"
  Yoda Master

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: RF class driver

2016-09-21 Thread Greg KH
On Wed, Sep 21, 2016 at 03:09:09PM +0530, Raul Piper wrote:
> On Wed, Sep 21, 2016 at 1:13 PM, Greg KH  wrote:
>  I wanted to know in which class RF Transceivers - (Sub 1 -Ghz
> devices) Linux drivers will fall and where to find them in Linux
> kernel ,
>  I grepped keywords like Ghz, Sub , and it leads me to the folder
> drivers/net/wireless/* but I am not getting whether they refer to the
> RF class of drivers or something else.

Those are wireless networking drivers.

> Is there a framework for them or
> all will come under Wireless device drivers or network device
> drivers?What is the appropriate mailing list for the same?

linux-wirel...@vger.kernel.org

> Few example of such devices are -
> 
> Sub-1 GHz CC1120-CC1190 - From Texas Instruments
> 
> nRF905 - From Nordic Semiconductor
> 
> nRF9E5 - From Nordic Semiconductor
> 
> nRF24L01 - From Texas Instruments
> 
> Si4455  - From Silicon Labs
> OL23xx  - From Nxp.

Those are almost always integrated directly into a wifi chipset, and not
independant.  If you have an independant device, the GNU Radio project
might be a good thing to look into.

good luck!

greg k-h

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: RF class driver

2016-09-21 Thread Raul Piper
On Wed, Sep 21, 2016 at 1:13 PM, Greg KH  wrote:
>
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
>
> A: No.
> Q: Should I include quotations after my reply?
>
>
> http://daringfireball.net/2007/07/on_top
>
> On Tue, Sep 20, 2016 at 06:15:46PM +0530, Raul Piper wrote:
>> Tree,before that want to have a look at example RF drivers - Sub Ghz
>> Transcievers
>
> I can not understand what you are saying here, please explain further.
 I wanted to know in which class RF Transceivers - (Sub 1 -Ghz
devices) Linux drivers will fall and where to find them in Linux
kernel ,
 I grepped keywords like Ghz, Sub , and it leads me to the folder
drivers/net/wireless/* but I am not getting whether they refer to the
RF class of drivers or something else.Is there a framework for them or
all will come under Wireless device drivers or network device
drivers?What is the appropriate mailing list for the same?

Few example of such devices are -

Sub-1 GHz CC1120-CC1190 - From Texas Instruments

nRF905 - From Nordic Semiconductor

nRF9E5 - From Nordic Semiconductor

nRF24L01 - From Texas Instruments

Si4455  - From Silicon Labs
OL23xx  - From Nxp.


I am writing a device driver for the one of the new RF device and
wanted to refer few examples before that.
Rgds,
Rp

> thanks,
>
> greg k-h

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: How to search topics in The Kernelnewbies Archives?

2016-09-21 Thread Valdis . Kletnieks
On Wed, 21 Sep 2016 14:27:03 +0800, Chi Wang said:

> https://lists.kernelnewbies.org/pipermail/kernelnewbies/
>
> Is there a general way to do searching in this archive?
> Or I have to download all the packages?

Google can do wonders.

Say you're trying to find the discussion 2 years ago about how to
write a frobnizz driver.   Go to google, and enter:

frobnizz site:kernelnewbies.org

and that should do the heavy lifting for you.


pgp1dF2zDNomo.pgp
Description: PGP signature
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: RF class driver

2016-09-21 Thread Greg KH

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

A: No.
Q: Should I include quotations after my reply?


http://daringfireball.net/2007/07/on_top

On Tue, Sep 20, 2016 at 06:15:46PM +0530, Raul Piper wrote:
> Tree,before that want to have a look at example RF drivers - Sub Ghz
> Transcievers

I can not understand what you are saying here, please explain further.

thanks,

greg k-h

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: How to search topics in The Kernelnewbies Archives?

2016-09-21 Thread Hao Lee
Hi,
In fact, you don't need to download all archives to search
information. Instead, you can use google.
For example:
if you want to search something about mm_struct,  you can search
mm_struct   site:lists.kernelnewbies.org

On Wed, Sep 21, 2016 at 2:27 PM, Chi Wang  wrote:
> Hello everyone,
>
> I have just subscribed to this mail list,
> and trying browsing history topics in this page:
> https://lists.kernelnewbies.org/pipermail/kernelnewbies/
>
> Is there a general way to do searching in this archive?
> Or I have to download all the packages?
>
>
> Regards,
>
> Chi Wang
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


How to search topics in The Kernelnewbies Archives?

2016-09-21 Thread Chi Wang
Hello everyone,

I have just subscribed to this mail list,
and trying browsing history topics in this page:
https://lists.kernelnewbies.org/pipermail/kernelnewbies/

Is there a general way to do searching in this archive?
Or I have to download all the packages?


Regards,

Chi Wang
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies