Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Udp packet lost: Page 1 of 3 (51 Items)
   
Udp packet lost  
Hello Friends.

I had very strange issue recently. I have two embedded computers (vp7 and vp9). Vp9 machine have intel i82544 network 
adapter , on the vp7 machine - pcnet32.
Qnx version 6.4.0.

On the vp9 machine I don't lost udp packets, but on vp7 I regulary lost packets.

If I invoke "pidin -p io-pkt-v4-hc mem" I see , that pcnet32 network driver (devn-pcnet.so) is work via devnp-shim.so. 
But on vp9 machine network adapter (devnp-i82544.so) work without devnp-shim.so. May be this is a core of the problem???
 And how I can play with network adapter options??????????
Re: Udp packet lost  
The devnp-shim.so is required for the pcnet driver as is is an io-net
driver. The e1000 driver is an io-pkt driver and doesn't require the shim.
The pcnet driver is a 10/100 driver, so if you are trying to push lots of
UDP packets through it, you could quite easily drop packets.




On 2012-11-27 9:35 PM, "Oleg Gopov" <community-noreply@qnx.com> wrote:

>Hello Friends.
>
>I had very strange issue recently. I have two embedded computers (vp7 and
>vp9). Vp9 machine have intel i82544 network adapter , on the vp7 machine
>- pcnet32.
>Qnx version 6.4.0.
>
>On the vp9 machine I don't lost udp packets, but on vp7 I regulary lost
>packets.
>
>If I invoke "pidin -p io-pkt-v4-hc mem" I see , that pcnet32 network
>driver (devn-pcnet.so) is work via devnp-shim.so. But on vp9 machine
>network adapter (devnp-i82544.so) work without devnp-shim.so. May be this
>is a core of the problem??? And how I can play with network adapter
>options??????????
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post97532
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Re: Udp packet lost  
I see nicinfo output - > pcnet32 network adapter work in half-duplex. How I can lost packets??? I don't understand.
Re: Udp packet lost  
And out traffic is light.
Re: Udp packet lost  
And our network traffic is light
Re: Udp packet lost  
Oleg,

please provide a kernel trace showing the status of the interrupt used 
by the ethernet driver (and probably shared by other devices).

--Armin



Oleg Gopov wrote:
> And our network traffic is light
>
>
>
> _______________________________________________
>
> Networking Drivers
> http://community.qnx.com/sf/go/post97595
> To cancel your subscription to this discussion, please e-mail drivers-networking-unsubscribe@community.qnx.com
>

Re: Udp packet lost  
> 
> Oleg,
> 
> please provide a kernel trace showing the status of the interrupt used 
> by the ethernet driver (and probably shared by other devices).
> 
> --Armin
> 
> 
> 
> Oleg Gopov wrote:
> > And our network traffic is light
> >
> >
> >
> > _______________________________________________
> >
> > Networking Drivers
> > http://community.qnx.com/sf/go/post97595
> > To cancel your subscription to this discussion, please e-mail drivers-
> networking-unsubscribe@community.qnx.com
> >
> 

How I can make kernel trace????? Please, suggest.
Re: Udp packet lost  
Oleg Gopov wrote:
>> How I can make kernel trace????? Please, suggest.

Please RTFM -> tracelogger 
->http://www.qnx.com/developers/docs/6.4.1/neutrino/utilities/t/tracelogger.html

--Armin

Re: Udp packet lost  
I had write kernel log. I attach tracebuffer.kev file.

I noticed another feature. If I invoke "sloginfo -w -c" then I have three times in second 
message -> "pcnet memory error" 
Attachment: Text tracebuffer.kev 11.66 MB
Re: Udp packet lost  
Maybe someone have pcnet32 network adapter sources. What is the case when "pcnet memory error" message generated?????? 
Re: Udp packet lost  
I invoke "top" command and see that 28M of memory are available.
Re: Udp packet lost  
Oleg Gopov wrote:
> I had write kernel log. I attach tracebuffer.kev file.
>
> I noticed another feature. If I invoke "sloginfo -w -c" then I have three times in second
> message -> "pcnet memory error"

You have a corrupted board sharing the same IRQ with io-usb -> that's 
the best wayto loose interrupts.
io-usb is known for blocking/disabling its (shared) interrupt for a 
longer time !

--Armin

Re: Udp packet lost  
Ok, Armin. I will try to "slay io-usb" or disable usb from bios. I will write results to this post.
Re: Udp packet lost  
Oleg Gopov wrote:
> Ok, Armin. I will try to "slay io-usb" or disable usb from bios. I will write results to this post.
     Yes, this would be very interesting !

--Armin

>
>
>
> _______________________________________________
>
> Networking Drivers
> http://community.qnx.com/sf/go/post98301
> To cancel your subscription to this discussion, please e-mail drivers-networking-unsubscribe@community.qnx.com
>

Re: Udp packet lost  
> You have a corrupted board sharing the same IRQ with io-usb -> that's 
> the best wayto loose interrupts.
> io-usb is known for blocking/disabling its (shared) interrupt for a 
> longer time !
> 
> --Armin
> 
But, Armin. How You conclude this??? You find out issue in tracebuffer.kev file??????????
I analyze tracelog and see that io-usb thread eat processor time only ~ 30us. Nothing criminal in that.
 
Re: Udp packet lost  
Oleg Gopov wrote:
>> You have a corrupted board sharing the same IRQ with io-usb -> that's
>> the best wayto loose interrupts.
>> io-usb is known for blocking/disabling its (shared) interrupt for a
>> longer time !
>>
>> --Armin
>>
> But, Armin. How You conclude this??? You find out issue in tracebuffer.kev file??????????
> I analyze tracelog and see that io-usb thread eat processor time only ~ 30us.
Using the CPU has nothing to with a false handling of the interrupt !!!!
A disabled interrupt remains disabled if you use the CPU ot not ...

Yes, USB is not very active in your case ... but what about the error 
messages related to the hardware of ethernet board ????
Isn't it criminal ??

> Nothing criminal in that.
>   
>
>
>
>
> _______________________________________________
>
> Networking Drivers
> http://community.qnx.com/sf/go/post98305
> To cancel your subscription to this discussion, please e-mail drivers-networking-unsubscribe@community.qnx.com
>

Re: Udp packet lost  
> Using the CPU has nothing to with a false handling of the interrupt !!!!
> A disabled interrupt remains disabled if you use the CPU ot not ...
> 
> Yes, USB is not very active in your case ... but what about the error 
> messages related to the hardware of ethernet board ????
> Isn't it criminal ??

Ok. Then, How you conclude that io-usb share interrupt with network driver?????????

Re: Udp packet lost  
Oleg Gopov wrote:
>> Using the CPU has nothing to with a false handling of the interrupt !!!!
>> A disabled interrupt remains disabled if you use the CPU ot not ...
>>
>> Yes, USB is not very active in your case ... but what about the error
>> messages related to the hardware of ethernet board ????
>> Isn't it criminal ??
> Ok. Then, How you conclude that io-usb share interrupt with network driver?????????

t:0xe875a9f0 CPU:00 INT_ENTR:0x00000000 (0)       IP:0xf007dbd6
t:0xe875ab69 CPU:00 INT_HANDLER_ENTR:0x00000000 (0)       pkt-mgr 
IP:0x080b7a34 AREA:0x0812baa0
t:0xe875af0f CPU:00 INT_HANDLER_EXIT:0x00000000 (0) SIGEVENT:NONE
t:0xe875b1b2 CPU:00 INT_HANDLER_ENTR:0x00000000 (0)       PID:1 
IP:0xf0052620 AREA:0x00000000
t:0xe875b545 CPU:00 INT_HANDLER_EXIT:0x00000000 (0) SIGEVENT:NONE
t:0xe875b82e CPU:00 INT_EXIT:0x00000000 (0) inkernel:0x00000001
t:0xe87d4ed9 CPU:00 INT_ENTR:0x00000000 (0)       IP:0xf007dbd6
t:0xe87d4ff7 CPU:00 INT_HANDLER_ENTR:0x00000000 (0)       pkt-mgr 
IP:0x080b7a34 AREA:0x0812baa0
t:0xe87d52e5 CPU:00 INT_HANDLER_EXIT:0x00000000 (0) SIGEVENT:NONE
t:0xe87d5527 CPU:00 INT_HANDLER_ENTR:0x00000000 (0)       PID:1 
IP:0xf0052620 AREA:0x00000000
t:0xe87d597e CPU:00 INT_HANDLER_EXIT:0x00000000 (0) SIGEVENT:NONE
t:0xe87d5c2d CPU:00 INT_EXIT:0x00000000 (0) inkernel:0x00000001
t:0xe87d6313 CPU:00 THREAD  :THRUNNING     io-usb tid:5
t:0xe87d6468 CPU:00 THREAD  :THREADY       pid:1 tid:1
t:0xe87d8885 CPU:00 KER_CALL:TIMER_TIMEOUT/75 timeout_flags:0x00001000 
ntime(sec):0
t:0xe87d8b05 CPU:00 THREAD  :THNANOSLEEP   io-usb tid:5
t:0xe87d8e4b CPU:00 THREAD  :THRUNNING     pid:1 tid:1
t:0xe884f46d CPU:00 INT_ENTR:0x00000000 (0)       IP:0xf007dbd6
t:0xe884f5e3 CPU:00 INT_HANDLER_ENTR:0x00000000 (0)       pkt-mgr 
IP:0x080b7a34 AREA:0x0812baa0
t:0xe884f90c CPU:00 INT_HANDLER_EXIT:0x00000000 (0) SIGEVENT:NONE
t:0xe884fb6c CPU:00 INT_HANDLER_ENTR:0x00000000 (0)       PID:1 
IP:0xf0052620 AREA:0x00000000
t:0xe8850138 CPU:00 INT_HANDLER_EXIT:0x00000000 (0) SIGEVENT:NONE
t:0xe8850419 CPU:00 INT_EXIT:0x00000000 (0) inkernel:0x00000001



>
>
>
>
>
> _______________________________________________
>
> Networking Drivers
> http://community.qnx.com/sf/go/post98307
> To cancel your subscription to this discussion, please e-mail drivers-networking-unsubscribe@community.qnx.com
>

Re: Udp packet lost  
Armin, What is IRQ that shared???? I don't understand. In tracelog that you present I see that trigger IRQ 0 ( timer ) 
and scheduler change state of io-usb to RUNNING. And all. 
Re: Udp packet lost  
Oleg Gopov wrote:
> Armin, What is IRQ that shared???? I don't understand. In tracelog that you present I see that trigger IRQ 0 ( timer )
 and scheduler change state of io-usb to RUNNING.

Seems so that io-usb is using InterruptAttachEvent ??

>   And all.
  IRQ

   0:    IO-APIC-*edge*   timer
   1:    IO-APIC-*edge*   i8042

Only these interupts are active in your kernel trace ... I don't see any real PCI interrupts!
Is your Ethernet board broken ????????????

One of the shared interrupts is just the IRQ 0 ....


>
>
>
> _______________________________________________
>
> Networking Drivers
> http://community.qnx.com/sf/go/post98310
> To cancel your subscription to this discussion, please e-mail drivers-networking-unsubscribe@community.qnx.com
>

Attachment: HTML sf-attachment-mime8625 1.7 KB
Re: Udp packet lost  
> Seems so that io-usb is using InterruptAttachEvent ??

As you remember, USB subsystem is not interrupt-driven. Poll engine is the base of USB.
Io-usb simply wake up every 100 ms (as say tracebuffer.kev) and all. And I have no usb devices inserted to my computer.
> Is your Ethernet board broken ????????????
Yes of course. "Pcnet memory error" message just overload (3 times in second) my slog. Therefore I lost packets. 
Re: Udp packet lost  
Oleg Gopov wrote:
>> Seems so that io-usb is using InterruptAttachEvent ??
> As you remember, USB subsystem is not interrupt-driven. Poll engine is the base of USB.

AFAIK ... every UHCI controller works interrupt based!

> Io-usb simply wake up every 100 ms (as say tracebuffer.kev) and all. And I have no usb devices inserted to my computer
.
>> Is your Ethernet board broken ????????????
> Yes of course. "Pcnet memory error" message just overload (3 times in second) my slog. Therefore I lost packets.
>
>
>
>
> _______________________________________________
>
> Networking Drivers
> http://community.qnx.com/sf/go/post98312
> To cancel your subscription to this discussion, please e-mail drivers-networking-unsubscribe@community.qnx.com
>

Re: Udp packet lost  
>   IRQ
> 
>    0:    IO-APIC-*edge*   timer
>    1:    IO-APIC-*edge*   i8042
Hello Armin. Please say, where you get this. In /proc ????????? 

Re: Udp packet lost  
Oleg Gopov wrote:
>>    IRQ
>>
>>     0:    IO-APIC-*edge*   timer
>>     1:    IO-APIC-*edge*   i8042
> Hello Armin. Please say, where you get this. In /proc ?????????

These are the interrupts of my host OS (Suse 12.1/ 32bit) mapped to the 
interrupts of QNX 6.5) (-> *virtualized version* 6.5SP1 as provided by 
QSS !!

What *host OS* are you using ?
Could it be that the UDP packets are lost by the host OS ? ( Windows ?)
Are you using NAT or bridging with your guest OS (QNX) ?

Here are my results after a ftp transfer from the host to the guest:

# nicinfo
en0:
*AMD PCNET-32 Ethernet Controller*

   Physical Node ID ........................... 000C29 794934
   Current Physical Node ID ................... 000C29 794934
   Current Operation Rate ..................... 10.00 Mb/s
   Active Interface Type ...................... UTP
   Maximum Transmittable data Unit ............ 1514
   Maximum Receivable data Unit ............... 1514
   Hardware Interrupt ......................... 0xa
   I/O Aperture ............................... 0x2000 - 0x207f
   Memory Aperture ............................ 0x0
   Promiscuous Mode ........................... Off
   Multicast Support .......................... Enabled

   Packets Transmitted OK ..................... 99
   Bytes Transmitted OK ....................... 8003
   Memory Allocation Failures on Transmit ..... 0

   Packets Received OK ........................ 603
   Bytes Received OK .......................... 251077
   Memory Allocation Failures on Receive ...... 0

   Single Collisions on Transmit .............. 0
   Deferred Transmits ......................... 0
   Late Collision on Transmit errors .......... 0
   Transmits aborted (excessive collisions) ... 0
   Transmit Underruns ......................... 0
   No Carrier on Transmit ..................... 0
   Receive Alignment errors ................... 0
   Received packets with CRC errors ........... 0
   Packets Dropped on receive ................. 0

No errors at all ...





Attachment: HTML sf-attachment-mime8638 2.98 KB
Re: Udp packet lost  
Hello Armin. I use native OS. There is neither host OS nor guest OS.

I try to "slay io-usb", there is no effect.