Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Networking Response and pci-bios Image: (5 Items)
   
Networking Response and pci-bios Image  
We've created a QNX 6.6 image to use with an axiomtek mano500 board Despite a BSP exiting for the mano500 board, we've 
had better success with the generic QN 6.6 BSP. I've taken over this project from the original developer and understand 
enough to make things works, but I still wouldn't consider myself an expert, so I appreciate your patience.

I'm having problems getting the network response to the same level as other machines on the network. On a local network 
the ping response times to the QNX 6.6 machine are in the range of 5 - 45 ms. Pinging a QNX 6.3, or any other device on 
the network the response time is less than 0.3 ms. The slow response seen in ping is also evident in other network 
applications on QNX 6.6, ping is just an easy way of demonstrating the issue.

The QNX 6.6 image with the slow response time is being created using startup-bios and pci-bios, using the devnp-e1000 
driver. If I use startup-apic and pci-bios-v2 the ping response time matches what is seen with all the other devices on 
the network, less than 0.3 ms.

However, the computer must use a particular PCI card which doesn't work properly when using startup-apic and pci-bios-v2
, so we are forced to use startup-bios and pci-bios.

I also notice that when using startup-bios and pci-bios all the interrupts for the (PCI) devices are shared, which is 
not the case for startup-apic and pci-bios-v2. I have a feeling that the slow respose time might be related to the 
shared interrupts, but I'm not knowledgable enough to know if that is true, or what to do about it.

I'm not sure what other relevant information I can add. So, is there anything I can do or try to get better performance 
from the networking on QNX 6.6? Or am I just out of luck?

Thanks
Re: Networking Response and pci-bios Image  
Given that it works well when using startup-apic and pci-bios-v2, I think your problem is with the interrupts rather 
than the network driver itself.

I suspect the wrong interrupt is being identified for the network card and you are being saved by something else 
triggering the network driver code - probably one of the other devices that is sharing that interrupt.

Alternatively with shared interrupts, one of the other device drivers that is sharing that interrupt isn't handling 
things properly - possibly masking and then taking a long time to determine that it the interrupt isn't for it before 
unmasking so that the network driver can see it.

Regards,
Nick
Re: Networking Response and pci-bios Image  
> Given that it works well when using startup-apic and pci-bios-v2, I think your
>  problem is with the interrupts rather than the network driver itself.
> 
> I suspect the wrong interrupt is being identified for the network card and you
>  are being saved by something else triggering the network driver code - 
> probably one of the other devices that is sharing that interrupt.
> 
> Alternatively with shared interrupts, one of the other device drivers that is 
> sharing that interrupt isn't handling things properly - possibly masking and 
> then taking a long time to determine that it the interrupt isn't for it before
>  unmasking so that the network driver can see it.
> 
> Regards,
> Nick

Thanks for the info. I suppose if it is an interrupt issue I don't have much, if any, control over how they are setup or
 handled. That would require bios code changes?
Re: Networking Response and pci-bios Image  
Hi Aaron,

I concur with Nick's assessment -- it's probably an incorrect IRQ assignment or an unfriendly shared IRQ.  Given that 
you're reporting that it doesn't work with apic either, that's some evidence pointing to the idea that the operating 
system isn't getting the correct IRQ.  I've had this happen when there were PCI-to-PCI bridges in the communications 
chain.    You can use the output of pci -vv to determine if your card is behind such a bridge: there would be an entry "
Class = Bridge (PCI/PCI)", and the "Secondary bus number" for the bridge entry would match the "Bus number" for your 
network controller.

Here are some things you could try:
- Manually override the interrupt assignment when launching the network driver with the 'irq=x' argument.   It's lame, 
but you could just try all possible values (1-15) to see if there's one where you consistently get back your 0.3s ping.
- Another way to find the correct IRQ: if the BIOS doesn't print out a page with the IRQ assignments, you could try and 
find out what the BIOS thought the IRQ should be by writing a little test program that manually invokes a PCI BIOS call 
to read the IRQ register on the card, and then run this program in your boot script before launching pci-bios.
- Alternately, I can pass along a patch I wrote for pci-bios-v2 from the 6.6 x86 BSP that adds the ability to map IRQs 
properly through PCI-to-PCI bridges.  If that is your problem, this patch might fix it for you.

If the problem is an unfriendly shared IRQ, you can use 'pidin irqs' to find out what other drivers are active on your 
IRQ line, and then try shutting them off one by one until you find the cuplrit.  You can sometimes influence IRQ sharing
 assignments by enabling or disabling various hardware in the BIOS, such as PS/2 mouse support or unused serial or 
ethernet ports.

Hope this is of some help,
-Will
Re: Networking Response and pci-bios Image  
Its always frustrating when answers to questions aren't responded to, or the original poster doesn't provide an update. 
So I apologize for taking so long to follow-up. Other more urgent projects have been taking up my time since I posted 
this question, but I've finally had some time to go back and try some of the suggestions.

Thanks for the suggestions Will. Using your idea of manually overriding the assigned interrupt one irq at a time 
eventually resolved the issue. So it seems the mapping of the irq through the PCI bridges doesn't work properly.

It's cumbersome, but in the end we can find the correct IRQ through trial and error, and configure the network driver to
 use that IRQ. Response times are in the expected and required range.

Once again, thanks for the help.