Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - io-pkt crash on MPC8548 with two interfaces and prioritized RX path: Page 1 of 15 (15 Items)
   
io-pkt crash on MPC8548 with two interfaces and prioritized RX path  
We use io-pkt (Milestone 3) with QNX 6.3.2 Kernel on a MPC8548 board with two network interfaces. We run one stack 
instance for both interfaces because later a layer 2 bridge is needed (not operational for this testcase). On tsec1 we 
want to receive and send UDP frames with low latency and do layer 2 bridging to and from tsec0. Especially the latency 
should not be influenced by "normal" traffic on tsec0. Because the stack is single threaded internally, we use the BPF 
(pcap library) to capture and send the UDP frames on tsec1. In our testcase a PC sends UDP frame and our MPC8548 board 
(tsec1) loops it back with the attached test program. The PC sends the next UDP frame (128 bytes UDP data) immediately 
after receipt of the response.

In this setup, io-pkt either terminates after a few frames with blown stack handling 0 or hangs with high CPU load (only
 restricted by the Adaptive Partitioning). Increasing the stacksize didn't help.

The stack is started with the following options:

io-pkt-v4-hc -t4 -dmpc85xx mac=xxx,pci=0,phy=0 -ptcpip

mount -Tio-pkt -o mac=yyy,pci=1,phy=1,rx_delay=0,rx_frame=0, priority=185 /lib/dll/devnp-mpc85xx.so

ifconfig tsec0 up
ifconfig tsec1 192.168.44.2 up

I have made the following observations:

1.) It works, if the -t4 option is omitted. But then the interrupt received thread is running on default priority -> no 
solution because of jitter

2.) It works, if only tsec1 is configured and used. It is not sufficient to have no network cable connected to a 
configured tsec0 -> no solution - both interfaces are needed

3.) It works, if the UDP frames are received and sent via the socket interface (#define VIA_SOCKET in the test program) 
and not over pcap_loop() and pcap_inject() -> no solution because of jitter when the single threaded stack is occupied 
by traffic from tsec0


Am I doing something wrong or is this a bug in io-pkt, the pcap library or the network driver ?

Thanks,
    Guenther

Attachment: Compressed file test_bpf.zip 215.18 KB