Lasse Skov(deleted)
|
Re: Optimise performance to io-pkt or should i not use the stack?
|
Lasse Skov(deleted)
10/30/2009 3:10 AM
post41034
|
Re: Optimise performance to io-pkt or should i not use the stack?
Hi Robert
And thanks for your answer.
Okay i think that i will try your 2. option.
And if i should make it at little bit clear of what I trying to do. :)
I have my own protocol (EtherCAT) implemented on QNX. And it working with the BPC device i send packages through now.
I'm simply taking all traffic from the ethernet port, (always the same port, and really hardware near in my situation).
My EtherCAT program has it's own FIFO it insert the EtherCAT telegrams in, dont know if you know the protocol but it's
pretty simple.
So my point is that i will try to get more performance out of my program, with trying to do something on the network
side.
In the start i chose the bpf because it was pretty simple to send and recive packages with.
As i know BPF taking packages out of the stack, so i think it will be faster if i use the nraw interface. So packages
not should be processed there.
But still i think i will be faster if i setup the network device in my program. But I know that this not will be a
simple workaround, but I still see this like the best solution if it should preform freaky. :)
Is there some example in the core networking code where I can see what I should do for loading and setting the network
driver up.?
I know that if I do this Im not having any function there take care of the network interface, and all statics and
package loss should be calculated and watched in my program.
First I think that I will try the solution with the nraw interface an se how this will work.
And maybe look on how to load the driver if nraw still take too much time with task switching and etc.
Hope this make it a bit more clear of what I trying to do.
/Lasse
> Hi Lasse:
>
> I really don't think that you want to do that. You'd have to duplicate the
> stack interface into the drivers and that would be, to say the least,
> difficult.
>
> I'd recommend looking at two alternatives:
>
> 1) Writing your own filter
> http://community.qnx.com/sf/wiki/do/viewPage/projects.networking/wiki/
> Filtering_wiki_page
>
> This is essentially the same as putting your application in the same context
> as the stack (almost the same as working with the driver directly). The down
> side of this is that you are operating in the same processing context as the
> stack so you may find it too restrictive.
>
> 2) Try using the nraw interface (it's an unsupported example of a filter that
> provides a resource manager interface to read and write raw ethernet packets).
> See
> http://community.qnx.com/integration/viewvc/viewvc.cgi/trunk/lib/io-pkt/sys/
> lsm/nraw/?root=core_networking&system=exsy1001
>
> This bypasses the stack processing altogether.
>
> Out of curiosity, are you incurring any packet loss that may be resulting in
> re-transmissions or are you strictly trying to send your own formatted packets
> ?
>
> Robert
|
|
|